gstcddabasesrc

gstcddabasesrc — Base class for CD digital audio (CDDA) sources

Synopsis


#include <gst/cdda/gstcddabasesrc.h>


            GstCddaBaseSrc;
            GstCddaBaseSrcTrack;
enum        GstCddaBaseSrcMode;
gboolean    gst_cdda_base_src_add_track     (GstCddaBaseSrc *src,
                                             GstCddaBaseSrcTrack *track);
#define     GST_TAG_CDDA_CDDB_DISCID
#define     GST_TAG_CDDA_CDDB_DISCID_FULL
#define     GST_TAG_CDDA_MUSICBRAINZ_DISCID
#define     GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL

Object Hierarchy


  GObject
   +----GstObject
         +----GstElement
               +----GstBaseSrc
                     +----GstPushSrc
                           +----GstCddaBaseSrc

Implemented Interfaces

GstCddaBaseSrc implements GstURIHandler.

Properties


  "device"               gchararray            : Read / Write
  "mode"                 GstCddaBaseSrcMode    : Read / Write
  "track"                guint                 : Read / Write

Description

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

Details

GstCddaBaseSrc

typedef struct _GstCddaBaseSrc GstCddaBaseSrc;


GstCddaBaseSrcTrack

typedef struct {
  gboolean     is_audio;      /* TRUE if this is an audio track             */
  guint        num;           /* real track number (usually starts from 1)  */
  guint        start;         /* first sector of track (LBA, not LSN!)      */
  guint        end;           /* last sector of track  (LBA, not LSN!)      */
  GstTagList  *tags;          /* NULL or tags for track (e.g. from cd-text) */
} GstCddaBaseSrcTrack;

CD track abstraction to communicate TOC entries to the base class.

gboolean is_audio; Whether this is an audio track
guint num; Track number in TOC (usually starts from 1, but not always)
guint start; The first sector of this track (LBA)
guint end; The last sector of this track (LBA)
GstTagList *tags; Track-specific tags (e.g. from cd-text information), or NULL

enum GstCddaBaseSrcMode

typedef enum {
  GST_CDDA_BASE_SRC_MODE_NORMAL,          /* stream = one track  */
  GST_CDDA_BASE_SRC_MODE_CONTINUOUS       /* stream = whole disc */
} GstCddaBaseSrcMode;

Mode in which the CD audio source operates. Influences timestamping, EOS handling and seeking.

GST_CDDA_BASE_SRC_MODE_NORMAL each single track is a stream
GST_CDDA_BASE_SRC_MODE_CONTINUOUS the entire disc is a single stream

gst_cdda_base_src_add_track ()

gboolean    gst_cdda_base_src_add_track     (GstCddaBaseSrc *src,
                                             GstCddaBaseSrcTrack *track);

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).

src : a GstCddaBaseSrc
track : address of GstCddaBaseSrcTrack to add
Returns : FALSE on error, otherwise TRUE.

GST_TAG_CDDA_CDDB_DISCID

#define GST_TAG_CDDA_CDDB_DISCID              "discid"

CDDB disc id in its short form (e.g. 'aa063d0f')


GST_TAG_CDDA_CDDB_DISCID_FULL

#define GST_TAG_CDDA_CDDB_DISCID_FULL         "discid-full"

CDDB disc id including all details


GST_TAG_CDDA_MUSICBRAINZ_DISCID

#define GST_TAG_CDDA_MUSICBRAINZ_DISCID       "musicbrainz-discid"

Musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-')


GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL

#define GST_TAG_CDDA_MUSICBRAINZ_DISCID_FULL  "musicbrainz-discid-full"

Musicbrainz disc id details

Properties

The "device" property

  "device"               gchararray            : Read / Write

CD device location.

Default value: NULL


The "mode" property

  "mode"                 GstCddaBaseSrcMode    : Read / Write

Mode.

Default value: Stream consists of a single track


The "track" property

  "track"                guint                 : Read / Write

Track.

Allowed values: [1,99]

Default value: 1