hscdio-0.1.0.0: Haskell bindings to the libcdio disc-reading library.
Copyright(c) 2018-2021 Sam May
LicenseGPL-3.0-or-later
Maintainerag@eitilt.life
Stabilitystable
Portabilitynon-portable (requires libcdio)
Safe HaskellNone
LanguageHaskell2010

Foreign.Libcdio.Disc

Contents

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

Symbols

Sound.Libcdio.Read.Data

Synopsis

Types

data DiscMode Source #

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:

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.

isCdRom :: DiscMode -> Bool Source #

Return true if a DiscMode refers to some sort of CD.

isDvd :: DiscMode -> Bool Source #

Return true if a DiscMode refers to some sort of DVD.

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.

numTracks :: Cdio -> IO (Maybe Track) Source #

Get the number of tracks on a CD.

Returns Nothing if the Cdio object has already been closed, or if the disc table of contents can't be read.

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.

cdMcn :: Cdio -> IO (Maybe String) Source #

Get the media catalog number from a disc. This may also be retrieved by getField UpcEan Nothing, though that references a different source and thus may not have the same return value.

mcnLength :: Word Source #

Number of ASCII bytes in a media catalog number.