mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
- Changed plugins for new APIs
Original commit message from CVS: - Changed plugins for new APIs - modularized audiofile. - added seeking, query and convert functions for mad, mpeg2dec, avidemux, mpegdemux, mpegparse - sync updates to oss. removed the ossclock for now
This commit is contained in:
parent
dd54b67104
commit
c75114628d
3 changed files with 25 additions and 11 deletions
|
@ -556,14 +556,18 @@ gst_gnomevfssrc_srcpad_event (GstPad *pad, GstEvent *event)
|
|||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEEK:
|
||||
switch (GST_EVENT_SEEK_TYPE (event)) {
|
||||
case GST_SEEK_BYTEOFFSET_SET:
|
||||
{
|
||||
if (GST_EVENT_SEEK_FORMAT (event) != GST_FORMAT_BYTES) {
|
||||
return FALSE;
|
||||
}
|
||||
switch (GST_EVENT_SEEK_METHOD (event)) {
|
||||
case GST_SEEK_METHOD_SET:
|
||||
src->curoffset = (guint64) GST_EVENT_SEEK_OFFSET (event);
|
||||
break;
|
||||
case GST_SEEK_BYTEOFFSET_CUR:
|
||||
case GST_SEEK_METHOD_CUR:
|
||||
src->curoffset += GST_EVENT_SEEK_OFFSET (event);
|
||||
break;
|
||||
case GST_SEEK_BYTEOFFSET_END:
|
||||
case GST_SEEK_METHOD_END:
|
||||
src->curoffset = src->size - ABS (GST_EVENT_SEEK_OFFSET (event));
|
||||
break;
|
||||
default:
|
||||
|
@ -572,10 +576,10 @@ gst_gnomevfssrc_srcpad_event (GstPad *pad, GstEvent *event)
|
|||
}
|
||||
g_object_notify (G_OBJECT (src), "offset");
|
||||
src->seek_happened = TRUE;
|
||||
src->need_flush = GST_EVENT_SEEK_FLUSH(event);
|
||||
gst_event_free (event);
|
||||
src->need_flush = GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH;
|
||||
/* push a discontinuous event? */
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH:
|
||||
src->need_flush = TRUE;
|
||||
break;
|
||||
|
|
|
@ -218,8 +218,11 @@ gst_vorbisdec_loop (GstElement * element)
|
|||
|
||||
/* submit a 4k block to libvorbis' Ogg layer */
|
||||
buf = gst_vorbisdec_pull (vorbisdec, &oy);
|
||||
if (!buf)
|
||||
if (!buf) {
|
||||
eos = 1;
|
||||
GST_DEBUG (0, "vorbisdec: pulled NULL");
|
||||
break;
|
||||
}
|
||||
|
||||
bytes = GST_BUFFER_SIZE (buf);
|
||||
buffer = ogg_sync_buffer (&oy, bytes);
|
||||
|
@ -446,8 +449,10 @@ gst_vorbisdec_loop (GstElement * element)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (ogg_page_eos (&og))
|
||||
if (ogg_page_eos (&og)) {
|
||||
eos = 1;
|
||||
GST_DEBUG (0, "vorbisdec: page_eos");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!eos) {
|
||||
|
@ -462,17 +467,18 @@ gst_vorbisdec_loop (GstElement * element)
|
|||
|
||||
ogg_sync_wrote (&oy, bytes);
|
||||
if (bytes == 0) {
|
||||
gst_pad_push (vorbisdec->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
|
||||
gst_element_set_eos (GST_ELEMENT (vorbisdec));
|
||||
eos = 1;
|
||||
GST_DEBUG (0, "vorbisdec: wrote 0 bytes");
|
||||
}
|
||||
}
|
||||
else {
|
||||
eos = 1;
|
||||
GST_DEBUG (0, "vorbisdec: pulled NULL");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GST_DEBUG (0, "vorbisdec: eos flag set");
|
||||
/* clean up this logical bitstream; before exit we see if we're
|
||||
followed by another [chained] */
|
||||
|
||||
|
@ -486,6 +492,10 @@ gst_vorbisdec_loop (GstElement * element)
|
|||
vorbis_info_clear (&vorbisdec->vi); /* must be called last */
|
||||
}
|
||||
end:
|
||||
GST_DEBUG (0, "vorbisdec: in end");
|
||||
|
||||
gst_pad_push (vorbisdec->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
|
||||
gst_element_set_eos (GST_ELEMENT (vorbisdec));
|
||||
|
||||
/* OK, clean up the framer */
|
||||
ogg_sync_clear (&oy);
|
||||
|
|
|
@ -241,7 +241,7 @@ gst_v4lmjpegsink_chain (GstPad *pad,
|
|||
if (jitter > 500000 || jitter < -500000)
|
||||
GST_DEBUG (0, "jitter: %lld", jitter);
|
||||
|
||||
gst_element_clock_wait(GST_ELEMENT(v4lmjpegsink), v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP(buf));
|
||||
gst_element_clock_wait(GST_ELEMENT(v4lmjpegsink), v4lmjpegsink->clock, GST_BUFFER_TIMESTAMP(buf), NULL);
|
||||
}
|
||||
|
||||
/* check size */
|
||||
|
|
Loading…
Reference in a new issue