Table of contents - CD Audio ( CDDA)

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Jun 26 05:34:55 PDT 2012


On Tue, 2012-06-26 at 14:03 +0200, giorgio wrote:

Hi Giorgio,

> I would like to know if  is there a possibility to read Table of
> contents ( audio tracks only ) of a Audio CD using gstreamer.
> I want to know how many Audio  tracks are present in the CD and their
> main informations ( length ,name etc..).

Sure. If your audio cd source (like cdparanoiasrc) derives from
GstCddaBaseSrc [0], you can just poke at the GstCddaBaseSrcTrack
*tracks array in the structure directly.

Alternatively, you can do a duration query in "track" format
(GstFormat), that will give you the number of tracks. You would have to
switch to (do a seek in "track" format) each track in turn to get the
track-specific tags, or do a duration query in TIME format for each
track after switching to it. This info is all in the tracks array as
well though.

In 0.11/1.0 we'll make Audio CD sources announce the TOC using the
GstToc API.

Cheers
 -Tim




More information about the gstreamer-devel mailing list