Go to the source code of this file.
Defines | |
#define | DVDCSS_BLOCK_SIZE 2048 |
#define | DVDCSS_NOFLAGS 0 |
#define | DVDCSS_READ_DECRYPT (1 << 0) |
#define | DVDCSS_SEEK_MPEG (1 << 0) |
#define | DVDCSS_SEEK_KEY (1 << 1) |
Typedefs | |
typedef dvdcss_s * | dvdcss_t |
Functions | |
dvdcss_t | dvdcss_open (char *psz_target) |
Open a DVD device or directory and return a dvdcss instance. | |
int | dvdcss_close (dvdcss_t) |
Close the DVD and clean up the library. | |
int | dvdcss_seek (dvdcss_t, int i_blocks, int i_flags) |
Seek in the disc and change the current key if requested. | |
int | dvdcss_read (dvdcss_t, void *p_buffer, int i_blocks, int i_flags) |
Read from the disc and decrypt data if requested. | |
int | dvdcss_readv (dvdcss_t, void *p_iovec, int i_blocks, int i_flags) |
Read from the disc into multiple buffers and decrypt data if requested. | |
char * | dvdcss_error (dvdcss_t) |
Return a string containing the latest error that occured in the given libdvdcss instance. | |
Variables | |
char * | dvdcss_interface_2 |
Symbol for version checks. |
This header contains the public types and functions that applications using libdvdcss may use.
#define DVDCSS_BLOCK_SIZE 2048 |
The block size of a DVD.
#define DVDCSS_NOFLAGS 0 |
The default flag to be used by libdvdcss functions.
#define DVDCSS_READ_DECRYPT (1 << 0) |
Flag to ask dvdcss_read() to decrypt the data it reads.
#define DVDCSS_SEEK_KEY (1 << 1) |
Flag to ask dvdcss_seek() to check the current title key.
#define DVDCSS_SEEK_MPEG (1 << 0) |
Flag to tell dvdcss_seek() it is seeking in MPEG data.
typedef struct dvdcss_s* dvdcss_t |
Library instance handle, to be used for each library call.
int dvdcss_close | ( | dvdcss_t | dvdcss | ) |
Close the DVD and clean up the library.
dvdcss | a libdvdcss instance. |
char* dvdcss_error | ( | dvdcss_t | dvdcss | ) |
Return a string containing the latest error that occured in the given libdvdcss instance.
dvdcss | a libdvdcss instance. |
dvdcss_t dvdcss_open | ( | char * | psz_target | ) |
Open a DVD device or directory and return a dvdcss instance.
psz_target | a string containing the target name, for instance "/dev/hdc" or "E:". |
dvdcss_open() returns a handle to be used for all subsequent libdvdcss calls. If an error occured, NULL is returned.
int dvdcss_read | ( | dvdcss_t | dvdcss, | |
void * | p_buffer, | |||
int | i_blocks, | |||
int | i_flags | |||
) |
Read from the disc and decrypt data if requested.
dvdcss | a libdvdcss instance. | |
p_buffer | a buffer that will contain the data read from the disc. | |
i_blocks | the amount of blocks to read. | |
i_flags | DVDCSS_NOFLAGS, optionally ored with DVDCSS_READ_DECRYPT. |
i_blocks
logical blocks from the DVD.
You typically set i_flags
to DVDCSS_NOFLAGS when reading data from a .IFO file on the DVD.
If DVDCSS_READ_DECRYPT is specified in i_flags
, dvdcss_read() will automatically decrypt scrambled sectors. This flag is typically used when reading data from a .VOB file on the DVD. It has no effect on unscrambled discs or unscrambled sectors, and can be safely used on those.
i_blocks
* DVDCSS_BLOCK_SIZE bytes in p_buffer
. int dvdcss_readv | ( | dvdcss_t | dvdcss, | |
void * | p_iovec, | |||
int | i_blocks, | |||
int | i_flags | |||
) |
Read from the disc into multiple buffers and decrypt data if requested.
dvdcss | a libdvdcss instance. | |
p_iovec | a pointer to an array of iovec structures that will contain the data read from the disc. | |
i_blocks | the amount of blocks to read. | |
i_flags | DVDCSS_NOFLAGS, optionally ored with DVDCSS_READ_DECRYPT. |
i_blocks
logical blocks from the DVD and writes them to an array of iovec structures.
You typically set i_flags
to DVDCSS_NOFLAGS when reading data from a .IFO file on the DVD.
If DVDCSS_READ_DECRYPT is specified in i_flags
, dvdcss_readv() will automatically decrypt scrambled sectors. This flag is typically used when reading data from a .VOB file on the DVD. It has no effect on unscrambled discs or unscrambled sectors, and can be safely used on those.
i_blocks
* DVDCSS_BLOCK_SIZE bytes in the buffers pointed by p_iovec
. Moreover, all iov_len members of the iovec structures should be multiples of DVDCSS_BLOCK_SIZE. int dvdcss_seek | ( | dvdcss_t | dvdcss, | |
int | i_blocks, | |||
int | i_flags | |||
) |
Seek in the disc and change the current key if requested.
dvdcss | a libdvdcss instance. | |
i_blocks | an absolute block offset to seek to. | |
i_flags | DVDCSS_NOFLAGS, optionally ored with one of DVDCSS_SEEK_KEY or DVDCSS_SEEK_MPEG. |
You typically set i_flags
to DVDCSS_NOFLAGS when seeking in a .IFO.
If DVDCSS_SEEK_MPEG is specified in i_flags
and if libdvdcss finds it reasonable to do so (ie, if the dvdcss method is not "title"), the current title key will be checked and a new one will be calculated if necessary. This flag is typically used when reading data from a VOB.
If DVDCSS_SEEK_KEY is specified, the title key will be always checked, even with the "title" method. This is equivalent to using the now deprecated dvdcss_title() call. This flag is typically used when seeking in a new title.
char* dvdcss_interface_2 |
Symbol for version checks.
The name of this symbol contains the library major number, which makes it easy to check which libdvdcss development headers are installed on the system with tools such as autoconf.
The variable itself contains the exact version number of the library, which can be useful for specific feature needs.