mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
Aplied the patches from vishnu to implement seeking in various plugins. bytestream now has an event-aware API.
Original commit message from CVS: Aplied the patches from vishnu to implement seeking in various plugins. bytestream now has an event-aware API.
This commit is contained in:
parent
799b712338
commit
67c932ef0e
2 changed files with 20 additions and 1 deletions
|
@ -1982,13 +1982,15 @@ gst_pad_event_default(GstPad *pad, GstEventType event, guint64 timestamp, guint3
|
||||||
*
|
*
|
||||||
* Send the event to the pad.
|
* Send the event to the pad.
|
||||||
*
|
*
|
||||||
* Returns: TRUe if the event was handled.
|
* Returns: TRUE if the event was handled.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_pad_send_event (GstPad *pad, GstEvent *event)
|
gst_pad_send_event (GstPad *pad, GstEvent *event)
|
||||||
{
|
{
|
||||||
gboolean handled = FALSE;
|
gboolean handled = FALSE;
|
||||||
|
|
||||||
|
g_return_val_if_fail (event, FALSE);
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_EVENT, "have event %d on pad %s:%s\n",
|
GST_DEBUG (GST_CAT_EVENT, "have event %d on pad %s:%s\n",
|
||||||
GST_EVENT_TYPE (event), GST_DEBUG_PAD_NAME (pad));
|
GST_EVENT_TYPE (event), GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
|
@ -2002,5 +2004,7 @@ gst_pad_send_event (GstPad *pad, GstEvent *event)
|
||||||
GST_DEBUG(GST_CAT_EVENT, "would proceed with default behavior here\n");
|
GST_DEBUG(GST_CAT_EVENT, "would proceed with default behavior here\n");
|
||||||
//gst_pad_event_default (pad, event);
|
//gst_pad_event_default (pad, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,21 @@ gst_bytestream_read (GstByteStream * bs, guint32 len)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_bytestream_get_status
|
||||||
|
* @bs: a bytestream
|
||||||
|
* @avail_out: total number of bytes buffered
|
||||||
|
* @event_out: an event
|
||||||
|
*
|
||||||
|
* When an event occurs, the bytestream will return NULL. You must
|
||||||
|
* retrieve the event using this API before reading more bytes from
|
||||||
|
* the stream.
|
||||||
|
*
|
||||||
|
* It is possible for the bytestream to return NULL due to running
|
||||||
|
* out of buffers, however, this indicates a bug because an EOS
|
||||||
|
* event should have been sent.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gst_bytestream_get_status (GstByteStream *bs,
|
gst_bytestream_get_status (GstByteStream *bs,
|
||||||
guint32 *avail_out,
|
guint32 *avail_out,
|
||||||
|
|
Loading…
Reference in a new issue