| Copyright | (c) 2018-2021 Sam May |
|---|---|
| License | GPL-3.0-or-later |
| Maintainer | ag@eitilt.life |
| Stability | stable |
| Portability | non-portable (requires libcdio) |
| Safe Haskell | None |
| Language | Haskell2010 |
Foreign.Libcdio.Disc
Description
This module provides informational and metadata functions primarily related to the layout of data on a physical disc. While both Foreign.Libcdio.Read and Foreign.Libcdio.CdText provide more exciting access to the actual data, this still provides a critical intermediate step between those and the physical hardware of Foreign.Libcdio.Device.
disc.h
Types
discmode_t->DiscModeCDIO_DISC_MODE_CD_DA->AudioCdModeCDIO_DISC_MODE_CD_DATA->DataCdModeCDIO_DISC_MODE_CD_XA->XaCdModeCDIO_DISC_MODE_CD_MIXED->MixedCdModeCDIO_DISC_MODE_DVD_ROM->DvdRomModeCDIO_DISC_MODE_DVD_RAM->DvdRamModeCDIO_DISC_MODE_DVD_R->DvdRecordableModeCDIO_DISC_MODE_DVD_RW->DvdReWritableModeCDIO_DISC_MODE_HD_DVD_ROM->HighDefinitionDvdRomModeCDIO_DISC_MODE_HD_DVD_RAM->HighDefinitionDvdRamModeCDIO_DISC_MODE_HD_DVD_R->HighDefinitionDvdRecordableModeCDIO_DISC_MODE_DVD_PR->DvdPlusRecordableModeCDIO_DISC_MODE_DVD_PRW->DvdPlusReWritableModeCDIO_DISC_MODE_DVD_PR_DL->DoubleLayerDvdPlusRecordableModeCDIO_DISC_MODE_DVD_PRW_DL->DoubleLayerDvdPlusReWritableModeCDIO_DISC_MODE_DVD_OTHER->OtherDvdModeCDIO_DISC_MODE_NO_INFO->NoModeInfoCDIO_DISC_MODE_CD_I->CdIModeCDIO_DISC_MODE_ERROR(removed; handled viaNothing)
Symbols
cdio_get_cdtext(removed; merged intoCdioobjects due to pointer lifespan issues)cdio_get_cdtext_raw->cdTextRawcdio_get_disc_last_lsn->lastLsncdio_get_discmode->discModecdio_get_joliet_level->discJolietLevelcdio_get_mcn->cdMcncdio_get_num_tracks->numTrackscdio_is_discmode_cdrom->isCdRomcdio_is_discmode_dvd->isDvddiscmode2str->discModeString
Sound.Libcdio.Read.Data
cdio_get_cdtext->Sound.Libcdio.Read.CdText.cdTextcdMcn->cataloguecdTextRaw->Sound.Libcdio.Read.CdText.cdTextRawlastLsn->lastAddressmcnLength(removed; unnecessary low-level detail)numTracks->Sound.Libcdio.Track.tracks
Synopsis
- data DiscMode
- = AudioCdMode
- | DataCdMode
- | XaCdMode
- | MixedCdMode
- | DvdRomMode
- | DvdRamMode
- | DvdRecordableMode
- | DvdReWritableMode
- | HighDefinitionDvdRomMode
- | HighDefinitionDvdRamMode
- | HighDefinitionDvdRecordableMode
- | DvdPlusRecordableMode
- | DvdPlusReWritableMode
- | DoubleLayerDvdPlusReWritableMode
- | DoubleLayerDvdPlusRecordableMode
- | OtherDvdMode
- | NoModeInfo
- | CdIMode
- discModeString :: DiscMode -> String
- isCdRom :: DiscMode -> Bool
- isDvd :: DiscMode -> Bool
- discMode :: Cdio -> IO (Maybe DiscMode)
- numTracks :: Cdio -> IO (Maybe Track)
- lastLsn :: Cdio -> IO (Maybe Lsn)
- discJolietLevel :: Cdio -> IO (Maybe Word)
- hasCdText :: Cdio -> Bool
- cdTextRaw :: Cdio -> IO (Maybe ByteString)
- cdMcn :: Cdio -> IO (Maybe String)
- mcnLength :: Word
Types
Different types of disc. Modes are combined from several sources, along with some libcdio-specific additions:
- MMC-5 6.33.3.13 (Send CUESHEET)
- MMC-5 Table 400 "DVD Book"
- GNU/Linux
/usr/include/linux/cdrom.h
As C2HS and Haddock don't yet interact well enough to document Enum fields, some of the less obvious mappings include:
DataCdMode: CD-ROM form 1MixedCdMode: some combination ofAudioCdMode,DataCdMode, andXaCdModeDvdPlusRecordableMode: DVD+RDvdPlusReWritableMode: DVD+RW
Constructors
Instances
| Bounded DiscMode Source # | |
| Enum DiscMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
| Eq DiscMode Source # | |
| Ord DiscMode Source # | |
Defined in Foreign.Libcdio.Types.Enums | |
| Read DiscMode Source # | |
| Show DiscMode Source # | |
discModeString :: DiscMode -> String Source #
Describe a type a disc according to its official name, as opposed to the
machine representation returned by the Show instance.
Data
discMode :: Cdio -> IO (Maybe DiscMode) Source #
Determine which type of disc is being accessed. Note that while this
provides a general direction, it shouldn't be relied upon for actual reading
of data; use trackFormat for more granular info.
lastLsn :: Cdio -> IO (Maybe Lsn) Source #
Get the size of a disc in blocks, or equivalently the address of the end of the readable data.
discJolietLevel :: Cdio -> IO (Maybe Word) Source #
The original ISO 9660 (data) filesystem specification was rather restrictive in what files could be named; the Joliet extensions allow such exciting features as lowercase letters, not to mention full Unicode support.
hasCdText :: Cdio -> Bool Source #
Whether the various functions in Foreign.Libcdio.CdText will have any
effect, or simply return mempty.
cdTextRaw :: Cdio -> IO (Maybe ByteString) Source #
Get the raw CD-Text binary data contained on a disc.