mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
ext/lame/gstlame.*: Added new media support to lame
Original commit message from CVS: 2004-08-26 Zaheer Abbas Merali <zaheerabbas at merali dot org> * ext/lame/gstlame.c: (gst_lame_init), (gst_lame_chain): * ext/lame/gstlame.h: Added new media support to lame
This commit is contained in:
parent
257c9ec4d7
commit
eaad9f698d
2 changed files with 19 additions and 0 deletions
|
@ -581,6 +581,7 @@ gst_lame_init (GstLame * lame)
|
||||||
|
|
||||||
id3tag_init (lame->lgf);
|
id3tag_init (lame->lgf);
|
||||||
|
|
||||||
|
lame->newmediacount = 0;
|
||||||
GST_DEBUG_OBJECT (lame, "done initializing");
|
GST_DEBUG_OBJECT (lame, "done initializing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,6 +951,21 @@ gst_lame_chain (GstPad * pad, GstData * _data)
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
gst_pad_event_default (pad, GST_EVENT (buf));
|
gst_pad_event_default (pad, GST_EVENT (buf));
|
||||||
|
break;
|
||||||
|
case GST_EVENT_DISCONTINUOUS:
|
||||||
|
if (GST_EVENT_DISCONT_NEW_MEDIA (GST_EVENT (buf))) {
|
||||||
|
/* do not re-initialise if it is first new media discont */
|
||||||
|
if (lame->newmediacount++ > 0) {
|
||||||
|
lame_close (lame->lgf);
|
||||||
|
lame->lgf = lame_init ();
|
||||||
|
lame->initialized = FALSE;
|
||||||
|
lame->last_ts = GST_CLOCK_TIME_NONE;
|
||||||
|
|
||||||
|
gst_lame_setup (lame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gst_pad_event_default (pad, GST_EVENT (buf));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
gst_pad_event_default (pad, GST_EVENT (buf));
|
gst_pad_event_default (pad, GST_EVENT (buf));
|
||||||
|
|
|
@ -100,6 +100,9 @@ struct _GstLame {
|
||||||
|
|
||||||
/* time tracker */
|
/* time tracker */
|
||||||
guint64 last_ts, last_offs, last_duration;
|
guint64 last_ts, last_offs, last_duration;
|
||||||
|
|
||||||
|
/* new media count */
|
||||||
|
gint16 newmediacount;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstLameClass {
|
struct _GstLameClass {
|
||||||
|
|
Loading…
Reference in a new issue