-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A monadic interface to libdvdread -- -- This module represents the functions of libdvdread as actions wrapped -- in the DVDRead monad. @package dvdread @version 0.1 -- | 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" --module DVD.DVDRead -- | This is the main data type in this module and represent an action in -- the underlying C library data DVDRead a -- | The File a monad represents a file operation returning -- the type a, to be executed on the content of a DVD. It can be -- converted into a DVDRead action using -- file. data File a -- | Status is a list containing the sizes in bytes of each -- file corresponding to a given Title / -- ReadDomain. data Status -- | The number of bytes or blocks since the beginning of the file (offset -- 0). A block equals blockSize bytes. type Offset = Word32 -- | Size in bytes or blocks of a file corresponding to a given -- Title / ReadDomain. A block equals -- blockSize bytes. type Size = Word64 -- | The number of the title inside a DVD, between 0 and 99, with 0 -- referring to the Video Manager (VIDEO_TS.*). type Title = Word8 -- | Specifies a file type inside a Title data ReadDomain InfoFile :: ReadDomain InfoBackupFile :: ReadDomain MenuVobs :: ReadDomain TitleVobs :: ReadDomain -- | Volume Identifier as described in ECMA-167. data VolumeIdentifier -- | Volume Set Identifier as described in ECMA-167. data VolumeSetIdentifier -- | Runs an action of type DVDRead on the specified -- device/image file. dvdRead :: FilePath -> DVDRead a -> IO a -- | Returns the Status of the given Title -- / ReadDomain, or Nothing in case of -- error. fileStat :: Title -> ReadDomain -> DVDRead (Maybe Status) -- | Returns whether or not some UDF operations are cached. getUDFCacheLevel :: DVDRead Bool -- | Sets the cache level for UDF operations. setUDFCacheLevel :: Bool -> DVDRead () -- | Returns Volume Identifier and Volume Set Identifier of the UDF -- filesystem, or Nothing in case of error. udfVolumeInfo :: DVDRead (Maybe (VolumeIdentifier, VolumeSetIdentifier)) -- | Only use this function as fallback if udfVolumeInfo -- returns Nothing. This will happen on a disc mastered -- only with a iso9660 filesystem. isoVolumeInfo :: DVDRead (Maybe (VolumeIdentifier, VolumeSetIdentifier)) -- | Number of bytes in a logical block (2048). blockSize :: Word64 -- | Applies File a to the given Title and -- ReadDomain, and generates the corresponding -- DVDRead action. file :: Title -> ReadDomain -> File a -> DVDRead a -- | Returns the size of a file in blocks. size :: File Size -- | Reads Size number of blocks from the file starting at -- the given block Offset. Returns -- Nothing in case of error. This function should be used -- only for reading VOB data (VIDEO_TS.VOB or VTS_??_?.VOB). When reading -- from an encrypted drive, blocks are decrypted using libdvdcss where -- required. readBlocks :: Offset -> Size -> File (Maybe ByteString) -- | Reads Size number of bytes from the file starting at -- the given bytes Offset. Returns -- Nothing in case of error. This function should be used -- only for reading Info data (VIDEO_TS.IFO, VIDEO_TS.BUP, VTS_??_?.IFO -- or VTS_??_?.BUP). readBytes :: Offset -> Size -> File (Maybe ByteString) -- | Returns the content of VIDEO_TS.IFO file. readVMGInfoFile :: DVDRead ByteString -- | Returns the content of VIDEO_TS.BUP file. readVMGInfoBackupFile :: DVDRead ByteString -- | Returns the content of VIDEO_TS.VOB file. readVMGMenu :: DVDRead ByteString -- | Returns the content of VTS_??_0.IFO file. Use with -- Title from 1 to 99. readVTSInfoFile :: Title -> DVDRead ByteString -- | Returns the content of VTS_??_0.BUP file. Use with -- Title from 1 to 99. readVTSInfoBackupFile :: Title -> DVDRead ByteString -- | Returns the content of VTS_??_0.VOB file. Use with -- Title from 1 to 99. readVTSMenu :: Title -> DVDRead ByteString instance Functor DVDRead instance Monad DVDRead instance MonadIO DVDRead instance Enum ReadDomain instance Eq ReadDomain instance Read ReadDomain instance Show ReadDomain instance Functor File instance Monad File instance MonadIO File instance Eq Status instance Read Status instance Show Status instance Eq VolumeIdentifier instance Read VolumeIdentifier instance Show VolumeIdentifier instance Eq VolumeSetIdentifier instance Read VolumeSetIdentifier instance Show VolumeSetIdentifier