mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
libs/gst/base/gstbasesrc.c: Push OOB events downstream when we get them in send_event. This allows the application to...
Original commit message from CVS: * libs/gst/base/gstbasesrc.c: (gst_base_src_send_event): Push OOB events downstream when we get them in send_event. This allows the application to insert events in the pipeline. Add some more comments.
This commit is contained in:
parent
b155f59d19
commit
3336e1211a
2 changed files with 39 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-09-13 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
|
* libs/gst/base/gstbasesrc.c: (gst_base_src_send_event):
|
||||||
|
Push OOB events downstream when we get them in send_event. This allows
|
||||||
|
the application to insert events in the pipeline.
|
||||||
|
Add some more comments.
|
||||||
|
|
||||||
2007-09-13 Wim Taymans <wim.taymans@gmail.com>
|
2007-09-13 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
* gst/gstbin.c: (gst_bin_class_init), (clear_queue),
|
* gst/gstbin.c: (gst_bin_class_init), (clear_queue),
|
||||||
|
|
|
@ -1262,7 +1262,8 @@ gst_base_src_get_query_types (GstElement * element)
|
||||||
return query_types;
|
return query_types;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* all events send to this element directly
|
/* all events send to this element directly. This is mainly done from the
|
||||||
|
* application.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_src_send_event (GstElement * element, GstEvent * event)
|
gst_base_src_send_event (GstElement * element, GstEvent * event)
|
||||||
|
@ -1273,11 +1274,14 @@ gst_base_src_send_event (GstElement * element, GstEvent * event)
|
||||||
src = GST_BASE_SRC (element);
|
src = GST_BASE_SRC (element);
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
|
/* bidirectional events */
|
||||||
case GST_EVENT_FLUSH_START:
|
case GST_EVENT_FLUSH_START:
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
/* sending random flushes downstream can break stuff,
|
/* sending random flushes downstream can break stuff,
|
||||||
* especially sync since all segment info will get flushed */
|
* especially sync since all segment info will get flushed */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* downstream serialized events */
|
||||||
case GST_EVENT_EOS:
|
case GST_EVENT_EOS:
|
||||||
/* FIXME, queue EOS and make sure the task or pull function
|
/* FIXME, queue EOS and make sure the task or pull function
|
||||||
* perform the EOS actions. */
|
* perform the EOS actions. */
|
||||||
|
@ -1286,9 +1290,15 @@ gst_base_src_send_event (GstElement * element, GstEvent * event)
|
||||||
/* sending random NEWSEGMENT downstream can break sync. */
|
/* sending random NEWSEGMENT downstream can break sync. */
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_TAG:
|
case GST_EVENT_TAG:
|
||||||
case GST_EVENT_BUFFERSIZE:
|
/* sending tags could be useful, FIXME insert in dataflow */
|
||||||
break;
|
break;
|
||||||
|
case GST_EVENT_BUFFERSIZE:
|
||||||
|
/* does not seem to make much sense currently */
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* upstream events */
|
||||||
case GST_EVENT_QOS:
|
case GST_EVENT_QOS:
|
||||||
|
/* elements should override send_event and do something */
|
||||||
break;
|
break;
|
||||||
case GST_EVENT_SEEK:
|
case GST_EVENT_SEEK:
|
||||||
{
|
{
|
||||||
|
@ -1319,6 +1329,26 @@ gst_base_src_send_event (GstElement * element, GstEvent * event)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_EVENT_NAVIGATION:
|
case GST_EVENT_NAVIGATION:
|
||||||
|
/* could make sense for elements that do something with navigation events
|
||||||
|
* but then they would need to override the send_event function */
|
||||||
|
break;
|
||||||
|
case GST_EVENT_LATENCY:
|
||||||
|
/* does not seem to make sense currently */
|
||||||
|
break;
|
||||||
|
|
||||||
|
/* custom events */
|
||||||
|
case GST_EVENT_CUSTOM_UPSTREAM:
|
||||||
|
/* override send_event if you want this */
|
||||||
|
break;
|
||||||
|
case GST_EVENT_CUSTOM_DOWNSTREAM:
|
||||||
|
case GST_EVENT_CUSTOM_BOTH:
|
||||||
|
/* FIXME, insert event in the dataflow */
|
||||||
|
break;
|
||||||
|
case GST_EVENT_CUSTOM_DOWNSTREAM_OOB:
|
||||||
|
case GST_EVENT_CUSTOM_BOTH_OOB:
|
||||||
|
/* insert a random custom event into the pipeline */
|
||||||
|
GST_DEBUG_OBJECT (src, "pushing custom OOB event downstream");
|
||||||
|
result = gst_pad_push_event (src->srcpad, event);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue