audiocdsrc: update for TOC API change

This commit is contained in:
Tim-Philipp Müller 2012-07-28 11:13:12 +01:00
parent 99d73c94e9
commit ca31913c04

View file

@ -1390,13 +1390,13 @@ gst_audio_cd_src_add_tags (GstAudioCdSrc * src)
GST_DEBUG ("src->tags = %" GST_PTR_FORMAT, src->tags);
}
static void
gst_audio_cd_src_add_toc (GstAudioCdSrc * src)
static GstToc *
gst_audio_cd_src_make_toc (GstAudioCdSrc * src, GstTocScope scope)
{
GstToc *toc;
gint i;
toc = gst_toc_new ();
toc = gst_toc_new (scope);
for (i = 0; i < src->priv->num_tracks; ++i) {
GstAudioCdSrcTrack *track;
@ -1424,6 +1424,19 @@ gst_audio_cd_src_add_toc (GstAudioCdSrc * src)
g_free (uid);
}
return toc;
}
static void
gst_audio_cd_src_add_toc (GstAudioCdSrc * src)
{
GstToc *toc;
/* FIXME: send two TOC events if needed, one global, one current */
toc = gst_audio_cd_src_make_toc (src, GST_TOC_SCOPE_GLOBAL);
src->priv->toc_event = gst_event_new_toc (toc, FALSE);
/* If we're in continuous mode (stream = whole disc), send a TOC event
* downstream, so matroskamux etc. can write a TOC to indicate where the
* various tracks are */