Safe Haskell | None |
---|
Example:
do may <- dvdRead "/path/to/dvd/" (do Just s <- fileStat 1 TitleVobs liftIO (print s) file 1 TitleVobs (readBlocks 0 100) ) case may of Just b -> writeFile "tmp.vob" b Nothing -> putStrLn "Could not read file"
- data DVDRead a
- data File a
- data Status
- type Offset = Word32
- type Size = Word64
- type Title = Word8
- data ReadDomain
- = InfoFile
- | InfoBackupFile
- | MenuVobs
- | TitleVobs
- data VolumeIdentifier
- data VolumeSetIdentifier
- dvdRead :: FilePath -> DVDRead a -> IO a
- fileStat :: Title -> ReadDomain -> DVDRead (Maybe Status)
- getUDFCacheLevel :: DVDRead Bool
- setUDFCacheLevel :: Bool -> DVDRead ()
- udfVolumeInfo :: DVDRead (Maybe (VolumeIdentifier, VolumeSetIdentifier))
- isoVolumeInfo :: DVDRead (Maybe (VolumeIdentifier, VolumeSetIdentifier))
- blockSize :: Word64
- file :: Title -> ReadDomain -> File a -> DVDRead a
- size :: File Size
- readBlocks :: Offset -> Size -> File (Maybe ByteString)
- readBytes :: Offset -> Size -> File (Maybe ByteString)
- readVMGInfoFile :: DVDRead ByteString
- readVMGInfoBackupFile :: DVDRead ByteString
- readVMGMenu :: DVDRead ByteString
- readVTSInfoFile :: Title -> DVDRead ByteString
- readVTSInfoBackupFile :: Title -> DVDRead ByteString
- readVTSMenu :: Title -> DVDRead ByteString
Datatypes
This is the main data type in this module and represent an action in the underlying C library
is a list containing the sizes in bytes of each file
corresponding to a given Status
/ Title
.
ReadDomain
The number of bytes or blocks since the beginning of the file
(offset 0). A block equals
bytes.
blockSize
Size in bytes or blocks of a file corresponding to a given
/ Title
. A block equals ReadDomain
bytes.
blockSize
The number of the title inside a DVD, between 0 and 99, with 0 referring to the Video Manager (VIDEO_TS.*).
data ReadDomain Source
Specifies a file type inside a Title
Enum ReadDomain | |
Eq ReadDomain | |
Read ReadDomain | |
Show ReadDomain |
data VolumeIdentifier Source
Volume Identifier as described in ECMA-167.
Eq VolumeIdentifier | |
Read VolumeIdentifier | |
Show VolumeIdentifier |
data VolumeSetIdentifier Source
Volume Set Identifier as described in ECMA-167.
Eq VolumeSetIdentifier | |
Read VolumeSetIdentifier | |
Show VolumeSetIdentifier |
:: FilePath | A block device, mount point, image file or directory containing a copy of a DVD |
-> DVDRead a | Action to perform on the DVD |
-> IO a | Resulting action |
Runs an action of type
on the specified device/image
file.
DVDRead
fileStat :: Title -> ReadDomain -> DVDRead (Maybe Status)Source
Returns the
of the given Status
/ Title
, or ReadDomain
in case of error.
Nothing
getUDFCacheLevel :: DVDRead BoolSource
Returns whether or not some UDF operations are cached.
setUDFCacheLevel :: Bool -> DVDRead ()Source
Sets the cache level for UDF operations.
Disc info
udfVolumeInfo :: DVDRead (Maybe (VolumeIdentifier, VolumeSetIdentifier))Source
Returns Volume Identifier and Volume Set Identifier of the UDF
filesystem, or
in case of error.
Nothing
isoVolumeInfo :: DVDRead (Maybe (VolumeIdentifier, VolumeSetIdentifier))Source
Only use this function as fallback if
returns
udfVolumeInfo
. This will happen on a disc mastered only with a
iso9660 filesystem.
Nothing
File operations
:: Title | DVD title |
-> ReadDomain | Domain |
-> File a | Read operation |
-> DVDRead a | Reasulting action |
Applies
to the given File
aTitle
and ReadDomain
, and
generates the corresponding
action.
DVDRead
Utility read functions
readVMGInfoFile :: DVDRead ByteStringSource
Returns the content of VIDEO_TS.IFO file.
readVMGInfoBackupFile :: DVDRead ByteStringSource
Returns the content of VIDEO_TS.BUP file.
readVMGMenu :: DVDRead ByteStringSource
Returns the content of VIDEO_TS.VOB file.
readVTSInfoFile :: Title -> DVDRead ByteStringSource
Returns the content of VTS_??_0.IFO file. Use with
from
1 to 99.
Title
readVTSInfoBackupFile :: Title -> DVDRead ByteStringSource
Returns the content of VTS_??_0.BUP file. Use with
from
1 to 99.
Title
readVTSMenu :: Title -> DVDRead ByteStringSource
Returns the content of VTS_??_0.VOB file. Use with
from
1 to 99.
Title