mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
gst-libs/gst/riff/riff-read.*: Add _peek version (req'ed in CDXA).
Original commit message from CVS: * gst-libs/gst/riff/riff-read.c: (gst_riff_peek_element_data), (gst_riff_read_element_data): * gst-libs/gst/riff/riff-read.h: Add _peek version (req'ed in CDXA). * gst/cdxaparse/gstcdxaparse.c: (gst_cdxaparse_init), (gst_cdxaparse_loop): Fix parsing in playbin. * gst/playback/gstdecodebin.c: (close_pad_link): Ignore current_ pads, they cause major annoyance.
This commit is contained in:
parent
4242476d37
commit
99c4af365e
3 changed files with 34 additions and 5 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2005-01-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst-libs/gst/riff/riff-read.c: (gst_riff_peek_element_data),
|
||||
(gst_riff_read_element_data):
|
||||
* gst-libs/gst/riff/riff-read.h:
|
||||
Add _peek version (req'ed in CDXA).
|
||||
* gst/cdxaparse/gstcdxaparse.c: (gst_cdxaparse_init),
|
||||
(gst_cdxaparse_loop):
|
||||
Fix parsing in playbin.
|
||||
* gst/playback/gstdecodebin.c: (close_pad_link):
|
||||
Ignore current_ pads, they cause major annoyance.
|
||||
|
||||
2005-01-19 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* ext/alsa/gstalsasink.c: (gst_alsa_sink_loop):
|
||||
|
|
|
@ -260,7 +260,7 @@ gst_riff_peek_head (GstRiffRead * riff,
|
|||
*/
|
||||
|
||||
GstBuffer *
|
||||
gst_riff_read_element_data (GstRiffRead * riff, guint length, guint * got_bytes)
|
||||
gst_riff_peek_element_data (GstRiffRead * riff, guint length, guint * got_bytes)
|
||||
{
|
||||
GstBuffer *buf = NULL;
|
||||
guint32 got;
|
||||
|
@ -272,14 +272,28 @@ gst_riff_read_element_data (GstRiffRead * riff, guint length, guint * got_bytes)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (got_bytes)
|
||||
*got_bytes = got;
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
GstBuffer *
|
||||
gst_riff_read_element_data (GstRiffRead * riff, guint length, guint * got_bytes)
|
||||
{
|
||||
GstBuffer *buf;
|
||||
|
||||
if (!(buf = gst_riff_peek_element_data (riff, length, got_bytes)))
|
||||
return NULL;
|
||||
|
||||
/* we need 16-bit alignment */
|
||||
if (length & 1)
|
||||
length++;
|
||||
|
||||
gst_bytestream_flush (riff->bs, length);
|
||||
|
||||
if (got_bytes)
|
||||
*got_bytes = got;
|
||||
if (!gst_bytestream_flush (riff->bs, length)) {
|
||||
gst_buffer_unref (buf);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
|
|
@ -85,6 +85,9 @@ gboolean gst_riff_read_header (GstRiffRead *read,
|
|||
GstBuffer *gst_riff_read_element_data (GstRiffRead *riff,
|
||||
guint length,
|
||||
guint *got_bytes);
|
||||
GstBuffer *gst_riff_peek_element_data (GstRiffRead *riff,
|
||||
guint length,
|
||||
guint *got_bytes);
|
||||
/*
|
||||
* Utility functions (including byteswapping).
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue