gi-gstaudio-1.0.24: GStreamerAudio bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GstAudio.Objects.AudioCdSrc

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 Formats 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: GST_TAG_CDDA_CDDB_DISCID, GST_TAG_CDDA_CDDB_DISCID_FULL, GST_TAG_CDDA_MUSICBRAINZ_DISCID, GST_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

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

Instances details
(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

Click to display all available methods, including inherited ones

Expand

Methods

abortState, addControlBinding, addPad, addPropertyDeepNotifyWatch, addPropertyNotifyWatch, addTrack, bindProperty, bindPropertyFull, callAsync, changeState, continueState, createAllPads, defaultError, forceFloating, foreachPad, foreachSinkPad, foreachSrcPad, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, isAsync, isFloating, isLive, isLockedState, iteratePads, iterateSinkPads, iterateSrcPads, link, linkFiltered, linkPads, linkPadsFiltered, linkPadsFull, lostState, messageFull, messageFullWithDetails, negotiate, newSeamlessSegment, newSegment, noMorePads, notify, notifyByPspec, postMessage, provideClock, query, queryConvert, queryDuration, queryLatency, queryPosition, ref, refSink, releaseRequestPad, removeControlBinding, removePad, removePropertyNotifyWatch, requestPad, requestPadSimple, runDispose, seek, seekSimple, sendEvent, startComplete, startWait, stealData, stealQdata, submitBufferList, suggestNextSync, syncStateWithParent, syncValues, thawNotify, unlink, unlinkPads, unparent, unref, waitPlaying, watchClosure.

Getters

getAllocator, getBaseTime, getBlocksize, getBufferPool, getBus, getClock, getCompatiblePad, getCompatiblePadTemplate, getContext, getContextUnlocked, getContexts, getControlBinding, getControlRate, getCurrentClockTime, getCurrentRunningTime, getData, getDoTimestamp, getFactory, getGValueArray, getMetadata, getName, getPadTemplate, getPadTemplateList, getParent, getPathString, getProperty, getProtocols, getQdata, getRequestPad, getStartTime, getState, getStaticPad, getUri, getUriType, getValue.

Setters

setAsync, setAutomaticEos, setBaseTime, setBlocksize, setBus, setCaps, setClock, setContext, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setDoTimestamp, setDynamicSize, setFormat, setLive, setLockedState, setName, setParent, setProperty, setStartTime, setState, setUri.

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, MonadIO m) => Text -> m (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, MonadIO m) => AudioCdSrcMode -> m (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, MonadIO m) => Word32 -> m (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 ]