| |
- DVDClose(*args)
- DVDClose(dvd)
Closes and cleans up the DVD reader object.
NOTE: You must close all open files before calling this function.
- DVDCloseFile(*args)
- DVDCloseFile(dvd_file)
Closes a file and frees the associated structure.
- DVDDiscID(dvd)
- Get a unique 128 bit disc ID.
This is the MD5 sum of VIDEO_TS.IFO and the VTS_0?_0.IFO files
in title order (those that exist).
If you need a 'text' representation of the id, print it as a
hexadecimal number, using lowercase letters, discid[0] first.
I.e. the same format as the command-line 'md5sum' program uses.
On success, returns a 16 char string.
On error, raises a RuntimeError exception.
- DVDFileSeek(*args)
- DVDFileSeek(dvd_file, seek_offset) -> offset_set
Seek to the given position in the file.
Returns the resulting position in bytes from the beginning of the file.
The seek position is only used for byte reads from the file,
the block read call always reads from the given offset.
- DVDFileSize(*args)
- DVDFileSize(dvd_file) -> blocks
Returns the file size in blocks.
If an error occurs, RuntimeError is raised.
- DVDFileStat(*args)
- DVDFileStat(dvd, titlenum, domain) -> dvd_stat_t
Stats a file on the DVD given the title number and domain.
This function is only of use if you want to get the size of each file
in the filesystem. These sizes are not needed to use any other functions.
RuntimeError is raised on failure.
- DVDFinish(*args)
- DVDFinish()
Frees any dlopened objects.
NOTE: You must DVDClose all handles opened with DVDOpen before calling this.
- DVDISOVolumeInfo(dvd)
- Get the ISO9660 VolumeIdentifier and VolumeSetIdentifier
* Only use this function as fallback if DVDUDFVolumeInfo fails *
* This will happen on a disc mastered only with a iso9660 filesystem *
* All video DVD discs have UDF filesystem *
On success, a tuple containing the VolumeIdentifier and VolumeSetIdentifier is returned.
On failure, RuntimeError is raised.
- DVDInit(*args)
- DVDInit()
Initializes support for multiple threads.
NOTE: You must call DVDInit before using any of the other functions
if you are going to use them in a multithreading app.
- DVDOpen(*args)
- DVDOpen(path) -> dvd
Opens a block device of a DVD-ROM file, or an image file, or a directory
name for a mounted DVD or HD copy of a DVD.
If the given file is a block device, or is the mountpoint for a block
device, then that device is used for CSS authentication using libdvdcss.
If no device is available, then no CSS authentication is performed,
and we hope that the image is decrypted.
If the path given is a directory, then the files in that directory may be
in any one of these formats:
path/VIDEO_TS/VTS_01_1.VOB
path/video_ts/vts_01_1.vob
path/VTS_01_1.VOB
path/vts_01_1.vob
On failure, RuntimeError is raised.
Threads: this function uses chdir() and getcwd().
The current working directory is global to all threads,
so using chdir/getcwd in another thread could give unexpected results.
- DVDOpenFile(*args)
- DVDOpenFile(dvd, titlenum, domain) -> dvd_file
Opens a file on the DVD, given the title number and domain.
If the title number is 0, the video manager information is opened
(VIDEO_TS.[IFO,BUP,VOB]).
On success, returns a file structure which may be used for reads.
On failure, raises a RuntimeError.
- DVDReadBlocks(dvd_file, offset, block_count)
- Reads block_count number of blocks from the file at the given block offset.
On failure, raises RuntimeError.
This call is only for reading VOB data, and should not be used when reading the IFO files.
When reading from an encrypted drive, blocks are decrypted using libdvdcss where required.
- DVDReadBytes(dvd_file, bytes)
- Reads the given number of bytes from the file.
This call can only be used on the information files,
and may not be used for reading from a VOB.
This reads from and increments the current seek position for the file.
On failure, raises RuntimeError.
- DVDUDFCacheLevel(*args)
- DVDUDFCacheLevel(dvd, level) -> set_level
Sets the level of caching that is done when reading from a device.
The level parameter can take any of the following values:
-1 - returns the current setting.
0 - UDF Cache turned off.
1 - (default level) Pointers to IFO files and some data from
PrimaryVolumeDescriptor are cached.
- DVDUDFVolumeInfo(dvd)
- Get the UDF VolumeIdentifier and VolumeSetIdentifier from the PrimaryVolumeDescriptor.
On success, a tuple containing the VolumeIdentifier and VolumeSetIdentifier is returned.
On failure, RuntimeError is raised.
- DVDVersion(*args)
- DVDVersion() -> int
Returns the version of libdvdread.
|