gi-gstaudio-1.0.18: GStreamerAudio bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.GstAudio.Objects.AudioCdSrc

Contents

Description

Provides a base class for CD digital audio (CDDA) sources, which handles things like seeking, querying, discid calculation, tags, and buffer timestamping.

Using GstAudioCdSrc-based elements in applications

GstAudioCdSrc registers two Format<!-- -->s of its own, namely the "track" format and the "sector" format. Applications will usually only find the "track" format interesting. You can retrieve that Format for use in seek events or queries with gst_format_get_by_nick("track").

In order to query the number of tracks, for example, an application would set the CDDA source element to READY or PAUSED state and then query the the number of tracks via elementQueryDuration using the track format acquired above. Applications can query the currently playing track in the same way.

Alternatively, applications may retrieve the currently playing track and the total number of tracks from the taglist that will posted on the bus whenever the CD is opened or the currently playing track changes. The taglist will contain GST_TAG_TRACK_NUMBER and GST_TAG_TRACK_COUNT tags.

Applications playing back CD audio using playbin and cdda://n URIs should issue a seek command in track format to change between tracks, rather than setting a new cdda://n+1 URI on playbin (as setting a new URI on playbin involves closing and re-opening the CD device, which is much much slower).

Tags and meta-information

CDDA sources will automatically emit a number of tags, details about which can be found in the libgsttag documentation. Those tags are: TAG_CDDA_CDDB_DISCID, TAG_CDDA_CDDB_DISCID_FULL, TAG_CDDA_MUSICBRAINZ_DISCID, TAG_CDDA_MUSICBRAINZ_DISCID_FULL, among others.

Tracks and Table of Contents (TOC)

Applications will be informed of the available tracks via a TOC message on the pipeline's Bus. The Toc will contain a TocEntry for each track, with information about each track. The duration for each track can be retrieved via the TAG_DURATION tag from each entry's tag list, or calculated via tocEntryGetStartStopTimes. The track entries in the TOC will be sorted by track number.

Synopsis

Exported types

newtype AudioCdSrc Source #

Memory-managed wrapper type.

Instances
GObject AudioCdSrc Source # 
Instance details

Defined in GI.GstAudio.Objects.AudioCdSrc

Methods

gobjectType :: IO GType #

HasParentTypes AudioCdSrc Source # 
Instance details

Defined in GI.GstAudio.Objects.AudioCdSrc

type ParentTypes AudioCdSrc Source # 
Instance details

Defined in GI.GstAudio.Objects.AudioCdSrc

type ParentTypes AudioCdSrc = PushSrc ': (BaseSrc ': (Element ': (Object ': (Object ': (URIHandler ': ([] :: [Type]))))))

class (GObject o, IsDescendantOf AudioCdSrc o) => IsAudioCdSrc o Source #

Type class for types which can be safely cast to AudioCdSrc, for instance with toAudioCdSrc.

Instances
(GObject o, IsDescendantOf AudioCdSrc o) => IsAudioCdSrc o Source # 
Instance details

Defined in GI.GstAudio.Objects.AudioCdSrc

toAudioCdSrc :: (MonadIO m, IsAudioCdSrc o) => o -> m AudioCdSrc Source #

Cast to AudioCdSrc, for types for which this is known to be safe. For general casts, use castTo.

Methods

addTrack

audioCdSrcAddTrack Source #

Arguments

:: (HasCallStack, MonadIO m, IsAudioCdSrc a) 
=> a

src: a AudioCdSrc

-> AudioCdSrcTrack

track: address of AudioCdSrcTrack to add

-> m Bool

Returns: FALSE on error, otherwise TRUE.

CDDA sources use this function from their start vfunc to announce the available data and audio tracks to the base source class. The caller should allocate track on the stack, the base source will do a shallow copy of the structure (and take ownership of the taglist if there is one).

Properties

device

No description available in the introspection data.

clearAudioCdSrcDevice :: (MonadIO m, IsAudioCdSrc o) => o -> m () Source #

Set the value of the “device” property to Nothing. When overloading is enabled, this is equivalent to

clear #device

constructAudioCdSrcDevice :: IsAudioCdSrc o => Text -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “device” property. This is rarely needed directly, but it is used by new.

getAudioCdSrcDevice :: (MonadIO m, IsAudioCdSrc o) => o -> m (Maybe Text) Source #

Get the value of the “device” property. When overloading is enabled, this is equivalent to

get audioCdSrc #device

setAudioCdSrcDevice :: (MonadIO m, IsAudioCdSrc o) => o -> Text -> m () Source #

Set the value of the “device” property. When overloading is enabled, this is equivalent to

set audioCdSrc [ #device := value ]

mode

No description available in the introspection data.

constructAudioCdSrcMode :: IsAudioCdSrc o => AudioCdSrcMode -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “mode” property. This is rarely needed directly, but it is used by new.

getAudioCdSrcMode :: (MonadIO m, IsAudioCdSrc o) => o -> m AudioCdSrcMode Source #

Get the value of the “mode” property. When overloading is enabled, this is equivalent to

get audioCdSrc #mode

setAudioCdSrcMode :: (MonadIO m, IsAudioCdSrc o) => o -> AudioCdSrcMode -> m () Source #

Set the value of the “mode” property. When overloading is enabled, this is equivalent to

set audioCdSrc [ #mode := value ]

track

No description available in the introspection data.

constructAudioCdSrcTrack :: IsAudioCdSrc o => Word32 -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “track” property. This is rarely needed directly, but it is used by new.

getAudioCdSrcTrack :: (MonadIO m, IsAudioCdSrc o) => o -> m Word32 Source #

Get the value of the “track” property. When overloading is enabled, this is equivalent to

get audioCdSrc #track

setAudioCdSrcTrack :: (MonadIO m, IsAudioCdSrc o) => o -> Word32 -> m () Source #

Set the value of the “track” property. When overloading is enabled, this is equivalent to

set audioCdSrc [ #track := value ]