mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
add parent to pad functions
This commit is contained in:
parent
67364dff4c
commit
e302833e65
30 changed files with 353 additions and 377 deletions
|
@ -129,9 +129,12 @@ static void gst_visual_finalize (GObject * object);
|
|||
|
||||
static GstStateChangeReturn gst_visual_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static GstFlowReturn gst_visual_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_visual_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_visual_src_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_visual_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_visual_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_visual_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
||||
static gboolean gst_visual_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
@ -504,12 +507,12 @@ no_format:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_visual_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_visual_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstVisual *visual;
|
||||
gboolean res;
|
||||
|
||||
visual = GST_VISUAL (GST_PAD_PARENT (pad));
|
||||
visual = GST_VISUAL (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
|
@ -541,7 +544,7 @@ gst_visual_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -549,12 +552,12 @@ gst_visual_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_visual_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_visual_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstVisual *visual;
|
||||
gboolean res;
|
||||
|
||||
visual = GST_VISUAL (GST_PAD_PARENT (pad));
|
||||
visual = GST_VISUAL (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_QOS:
|
||||
|
@ -586,7 +589,7 @@ gst_visual_src_event (GstPad * pad, GstEvent * event)
|
|||
res = TRUE;
|
||||
break;
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -676,11 +679,11 @@ ensure_negotiated (GstVisual * visual)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_visual_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_visual_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstBuffer *outbuf = NULL;
|
||||
guint i;
|
||||
GstVisual *visual = GST_VISUAL (GST_PAD_PARENT (pad));
|
||||
GstVisual *visual = GST_VISUAL (parent);
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
guint avail;
|
||||
gint bpf, rate, channels;
|
||||
|
@ -897,8 +900,8 @@ gst_visual_change_state (GstElement * element, GstStateChange transition)
|
|||
switch (transition) {
|
||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
visual->actor =
|
||||
visual_actor_new (GST_VISUAL_GET_CLASS (visual)->plugin->
|
||||
info->plugname);
|
||||
visual_actor_new (GST_VISUAL_GET_CLASS (visual)->plugin->info->
|
||||
plugname);
|
||||
visual->video = visual_video_new ();
|
||||
visual->audio = visual_audio_new ();
|
||||
/* can't have a play without actors */
|
||||
|
|
|
@ -124,8 +124,10 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
static void gst_ogg_avi_parse_finalize (GObject * object);
|
||||
static GstStateChangeReturn gst_ogg_avi_parse_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
static gboolean gst_ogg_avi_parse_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_ogg_avi_parse_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_ogg_avi_parse_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn gst_ogg_avi_parse_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_ogg_avi_parse_setcaps (GstPad * pad, GstCaps * caps);
|
||||
|
||||
static void
|
||||
|
@ -289,12 +291,12 @@ buffer_too_small:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ogg_avi_parse_event (GstPad * pad, GstEvent * event)
|
||||
gst_ogg_avi_parse_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstOggAviParse *ogg;
|
||||
gboolean ret;
|
||||
|
||||
ogg = GST_OGG_AVI_PARSE (GST_OBJECT_PARENT (pad));
|
||||
ogg = GST_OGG_AVI_PARSE (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_CAPS:
|
||||
|
@ -347,7 +349,7 @@ gst_ogg_avi_parse_push_packet (GstOggAviParse * ogg, ogg_packet * packet)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_ogg_avi_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_ogg_avi_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstFlowReturn result = GST_FLOW_OK;
|
||||
GstOggAviParse *ogg;
|
||||
|
@ -355,7 +357,7 @@ gst_ogg_avi_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
gchar *oggbuf;
|
||||
gint ret = -1;
|
||||
|
||||
ogg = GST_OGG_AVI_PARSE (GST_OBJECT_PARENT (pad));
|
||||
ogg = GST_OGG_AVI_PARSE (parent);
|
||||
|
||||
size = gst_buffer_get_size (buffer);
|
||||
|
||||
|
|
|
@ -133,7 +133,8 @@ static void gst_ogg_pad_finalize (GObject * object);
|
|||
|
||||
static gboolean gst_ogg_pad_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_ogg_pad_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ogg_pad_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstOggPad *gst_ogg_chain_get_stream (GstOggChain * chain,
|
||||
guint32 serialno);
|
||||
|
||||
|
@ -384,12 +385,12 @@ error:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ogg_pad_event (GstPad * pad, GstEvent * event)
|
||||
gst_ogg_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
GstOggDemux *ogg;
|
||||
|
||||
ogg = GST_OGG_DEMUX (gst_pad_get_parent (pad));
|
||||
ogg = GST_OGG_DEMUX (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEEK:
|
||||
|
@ -398,10 +399,9 @@ gst_ogg_pad_event (GstPad * pad, GstEvent * event)
|
|||
gst_event_unref (event);
|
||||
break;
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
gst_object_unref (ogg);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -1776,9 +1776,11 @@ static GstFlowReturn gst_ogg_demux_read_chain (GstOggDemux * ogg,
|
|||
static GstFlowReturn gst_ogg_demux_read_end_chain (GstOggDemux * ogg,
|
||||
GstOggChain * chain);
|
||||
|
||||
static gboolean gst_ogg_demux_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ogg_demux_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static void gst_ogg_demux_loop (GstOggPad * pad);
|
||||
static GstFlowReturn gst_ogg_demux_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn gst_ogg_demux_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_ogg_demux_sink_activate (GstPad * sinkpad);
|
||||
static gboolean gst_ogg_demux_sink_activate_pull (GstPad * sinkpad,
|
||||
gboolean active);
|
||||
|
@ -1879,12 +1881,12 @@ gst_ogg_demux_reset_streams (GstOggDemux * ogg)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ogg_demux_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_ogg_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
GstOggDemux *ogg;
|
||||
|
||||
ogg = GST_OGG_DEMUX (gst_pad_get_parent (pad));
|
||||
ogg = GST_OGG_DEMUX (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
|
@ -1954,7 +1956,6 @@ gst_ogg_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||
res = gst_ogg_demux_send_event (ogg, event);
|
||||
break;
|
||||
}
|
||||
gst_object_unref (ogg);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -3910,13 +3911,13 @@ unknown_chain:
|
|||
* the serialno, submit pages and packets to the oggpads
|
||||
*/
|
||||
static GstFlowReturn
|
||||
gst_ogg_demux_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_ogg_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstOggDemux *ogg;
|
||||
gint ret = 0;
|
||||
GstFlowReturn result = GST_FLOW_OK;
|
||||
|
||||
ogg = GST_OGG_DEMUX (GST_OBJECT_PARENT (pad));
|
||||
ogg = GST_OGG_DEMUX (parent);
|
||||
|
||||
GST_DEBUG_OBJECT (ogg, "enter");
|
||||
result = gst_ogg_demux_submit_buffer (ogg, buffer);
|
||||
|
@ -4060,7 +4061,7 @@ gst_ogg_demux_loop_forward (GstOggDemux * ogg)
|
|||
ogg->newsegment = NULL;
|
||||
}
|
||||
|
||||
ret = gst_ogg_demux_chain (ogg->sinkpad, buffer);
|
||||
ret = gst_ogg_demux_chain (ogg->sinkpad, GST_OBJECT_CAST (ogg), buffer);
|
||||
if (ret != GST_FLOW_OK) {
|
||||
GST_LOG_OBJECT (ogg, "Failed demux_chain");
|
||||
goto done;
|
||||
|
|
|
@ -130,7 +130,8 @@ static void gst_ogg_mux_finalize (GObject * object);
|
|||
|
||||
static GstFlowReturn
|
||||
gst_ogg_mux_collected (GstCollectPads2 * pads, GstOggMux * ogg_mux);
|
||||
static gboolean gst_ogg_mux_handle_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ogg_mux_handle_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstPad *gst_ogg_mux_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
|
||||
static void gst_ogg_mux_release_pad (GstElement * element, GstPad * pad);
|
||||
|
@ -303,9 +304,9 @@ gst_ogg_mux_sinkconnect (GstPad * pad, GstPad * peer)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ogg_mux_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_ogg_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstOggMux *ogg_mux = GST_OGG_MUX (gst_pad_get_parent (pad));
|
||||
GstOggMux *ogg_mux = GST_OGG_MUX (parent);
|
||||
GstOggPadData *ogg_pad = (GstOggPadData *) gst_pad_get_element_private (pad);
|
||||
gboolean ret = FALSE;
|
||||
|
||||
|
@ -350,9 +351,8 @@ gst_ogg_mux_sink_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
/* now GstCollectPads can take care of the rest, e.g. EOS */
|
||||
if (event != NULL)
|
||||
ret = ogg_pad->collect_event (pad, event);
|
||||
ret = ogg_pad->collect_event (pad, parent, event);
|
||||
|
||||
gst_object_unref (ogg_mux);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -512,7 +512,8 @@ gst_ogg_mux_release_pad (GstElement * element, GstPad * pad)
|
|||
|
||||
/* handle events */
|
||||
static gboolean
|
||||
gst_ogg_mux_handle_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_ogg_mux_handle_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstEventType type;
|
||||
|
||||
|
@ -526,7 +527,7 @@ gst_ogg_mux_handle_src_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
return gst_pad_event_default (pad, event);
|
||||
return gst_pad_event_default (pad, parent, event);
|
||||
}
|
||||
|
||||
static GstBuffer *
|
||||
|
|
|
@ -212,7 +212,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
static void gst_ogg_parse_dispose (GObject * object);
|
||||
static GstStateChangeReturn gst_ogg_parse_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static GstFlowReturn gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn gst_ogg_parse_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
|
||||
static void
|
||||
gst_ogg_parse_base_init (gpointer g_class)
|
||||
|
@ -383,7 +384,7 @@ gst_ogg_parse_buffer_from_page (ogg_page * page,
|
|||
* pages to output pad.
|
||||
*/
|
||||
static GstFlowReturn
|
||||
gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_ogg_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstOggParse *ogg;
|
||||
GstFlowReturn result = GST_FLOW_OK;
|
||||
|
@ -392,7 +393,7 @@ gst_ogg_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GstBuffer *pagebuffer;
|
||||
GstClockTime buffertimestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||
|
||||
ogg = GST_OGG_PARSE (GST_OBJECT_PARENT (pad));
|
||||
ogg = GST_OGG_PARSE (parent);
|
||||
|
||||
GST_LOG_OBJECT (ogg,
|
||||
"Chain function received buffer of size %" G_GSIZE_FORMAT,
|
||||
|
|
|
@ -151,13 +151,15 @@ static void gst_ogm_video_parse_init (GstOgmParse * ogm);
|
|||
static void gst_ogm_audio_parse_init (GstOgmParse * ogm);
|
||||
static void gst_ogm_text_parse_init (GstOgmParse * ogm);
|
||||
|
||||
static gboolean gst_ogm_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ogm_parse_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_ogm_parse_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_ogm_parse_sink_convert (GstPad * pad, GstFormat src_format,
|
||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
||||
|
||||
static GstFlowReturn gst_ogm_parse_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn gst_ogm_parse_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
|
||||
static GstStateChangeReturn gst_ogm_parse_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
|
@ -837,10 +839,10 @@ buffer_too_small:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_ogm_parse_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_ogm_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
GstOgmParse *ogm = GST_OGM_PARSE (GST_PAD_PARENT (pad));
|
||||
GstOgmParse *ogm = GST_OGM_PARSE (parent);
|
||||
guint8 *data;
|
||||
gsize size;
|
||||
|
||||
|
@ -885,9 +887,9 @@ buffer_too_small:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ogm_parse_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_ogm_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstOgmParse *ogm = GST_OGM_PARSE (gst_pad_get_parent (pad));
|
||||
GstOgmParse *ogm = GST_OGM_PARSE (parent);
|
||||
gboolean res;
|
||||
|
||||
GST_LOG_OBJECT (ogm, "processing %s event", GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -899,10 +901,9 @@ gst_ogm_parse_sink_event (GstPad * pad, GstEvent * event)
|
|||
res = TRUE;
|
||||
} else {
|
||||
GST_OBJECT_UNLOCK (ogm);
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
}
|
||||
|
||||
gst_object_unref (ogm);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -313,21 +313,21 @@ static gboolean gst_base_text_overlay_setcaps (GstBaseTextOverlay * overlay,
|
|||
static gboolean gst_base_text_overlay_setcaps_txt (GstBaseTextOverlay * overlay,
|
||||
GstCaps * caps);
|
||||
static gboolean gst_base_text_overlay_src_event (GstPad * pad,
|
||||
GstEvent * event);
|
||||
GstObject * parent, GstEvent * event);
|
||||
static gboolean gst_base_text_overlay_src_query (GstPad * pad,
|
||||
GstObject * parent, GstQuery * query);
|
||||
|
||||
static gboolean gst_base_text_overlay_video_event (GstPad * pad,
|
||||
GstEvent * event);
|
||||
GstObject * parent, GstEvent * event);
|
||||
static gboolean gst_base_text_overlay_video_query (GstPad * pad,
|
||||
GstObject * parent, GstQuery * query);
|
||||
static GstFlowReturn gst_base_text_overlay_video_chain (GstPad * pad,
|
||||
GstBuffer * buffer);
|
||||
GstObject * parent, GstBuffer * buffer);
|
||||
|
||||
static gboolean gst_base_text_overlay_text_event (GstPad * pad,
|
||||
GstEvent * event);
|
||||
GstObject * parent, GstEvent * event);
|
||||
static GstFlowReturn gst_base_text_overlay_text_chain (GstPad * pad,
|
||||
GstBuffer * buffer);
|
||||
GstObject * parent, GstBuffer * buffer);
|
||||
static GstPadLinkReturn gst_base_text_overlay_text_pad_link (GstPad * pad,
|
||||
GstPad * peer);
|
||||
static void gst_base_text_overlay_text_pad_unlink (GstPad * pad);
|
||||
|
@ -1022,16 +1022,13 @@ gst_base_text_overlay_src_query (GstPad * pad, GstObject * parent,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_text_overlay_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_text_overlay_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GstBaseTextOverlay *overlay = NULL;
|
||||
|
||||
overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (!overlay)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
overlay = GST_BASE_TEXT_OVERLAY (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEEK:{
|
||||
|
@ -1081,7 +1078,6 @@ gst_base_text_overlay_src_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
beach:
|
||||
gst_object_unref (overlay);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -2150,16 +2146,13 @@ gst_base_text_overlay_text_pad_unlink (GstPad * pad)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_text_overlay_text_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_text_overlay_text_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GstBaseTextOverlay *overlay = NULL;
|
||||
|
||||
overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (!overlay)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
overlay = GST_BASE_TEXT_OVERLAY (parent);
|
||||
|
||||
GST_LOG_OBJECT (pad, "received event %s", GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
|
@ -2234,26 +2227,21 @@ gst_base_text_overlay_text_event (GstPad * pad, GstEvent * event)
|
|||
ret = TRUE;
|
||||
break;
|
||||
default:
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (overlay);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
|
||||
gst_base_text_overlay_video_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GstBaseTextOverlay *overlay = NULL;
|
||||
|
||||
overlay = GST_BASE_TEXT_OVERLAY (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (!overlay)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
overlay = GST_BASE_TEXT_OVERLAY (parent);
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "received event %s", GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
|
@ -2285,7 +2273,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
|
|||
("received non-TIME newsegment event on video input"));
|
||||
}
|
||||
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_EOS:
|
||||
|
@ -2293,7 +2281,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
|
|||
GST_INFO_OBJECT (overlay, "video EOS");
|
||||
overlay->video_eos = TRUE;
|
||||
GST_OBJECT_UNLOCK (overlay);
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
case GST_EVENT_FLUSH_START:
|
||||
GST_OBJECT_LOCK (overlay);
|
||||
|
@ -2301,7 +2289,7 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
|
|||
overlay->video_flushing = TRUE;
|
||||
GST_BASE_TEXT_OVERLAY_BROADCAST (overlay);
|
||||
GST_OBJECT_UNLOCK (overlay);
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
GST_OBJECT_LOCK (overlay);
|
||||
|
@ -2310,15 +2298,13 @@ gst_base_text_overlay_video_event (GstPad * pad, GstEvent * event)
|
|||
overlay->video_eos = FALSE;
|
||||
gst_segment_init (&overlay->segment, GST_FORMAT_TIME);
|
||||
GST_OBJECT_UNLOCK (overlay);
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
default:
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (overlay);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2369,14 +2355,15 @@ gst_base_text_overlay_pop_text (GstBaseTextOverlay * overlay)
|
|||
If the buffer is in our segment we keep it internally except if another one
|
||||
is already waiting here, in that case we wait that it gets kicked out */
|
||||
static GstFlowReturn
|
||||
gst_base_text_overlay_text_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_base_text_overlay_text_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
GstBaseTextOverlay *overlay = NULL;
|
||||
gboolean in_seg = FALSE;
|
||||
guint64 clip_start = 0, clip_stop = 0;
|
||||
|
||||
overlay = GST_BASE_TEXT_OVERLAY (GST_PAD_PARENT (pad));
|
||||
overlay = GST_BASE_TEXT_OVERLAY (parent);
|
||||
|
||||
GST_OBJECT_LOCK (overlay);
|
||||
|
||||
|
@ -2452,7 +2439,8 @@ beach:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_base_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_base_text_overlay_video_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstBaseTextOverlayClass *klass;
|
||||
GstBaseTextOverlay *overlay;
|
||||
|
@ -2461,7 +2449,7 @@ gst_base_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
|
|||
guint64 start, stop, clip_start = 0, clip_stop = 0;
|
||||
gchar *text = NULL;
|
||||
|
||||
overlay = GST_BASE_TEXT_OVERLAY (GST_PAD_PARENT (pad));
|
||||
overlay = GST_BASE_TEXT_OVERLAY (parent);
|
||||
klass = GST_BASE_TEXT_OVERLAY_GET_CLASS (overlay);
|
||||
|
||||
if (!GST_BUFFER_TIMESTAMP_IS_VALID (buffer))
|
||||
|
|
|
@ -465,7 +465,7 @@ gst_text_renderer_image_to_argb (GstTextRender * render, guchar * pixbuf,
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
|
||||
gst_text_render_chain (GstPad * pad, GstObject * parent, GstBuffer * inbuf)
|
||||
{
|
||||
GstTextRender *render;
|
||||
GstFlowReturn ret;
|
||||
|
@ -476,7 +476,7 @@ gst_text_render_chain (GstPad * pad, GstBuffer * inbuf)
|
|||
gint n;
|
||||
gint xpos, ypos;
|
||||
|
||||
render = GST_TEXT_RENDER (gst_pad_get_parent (pad));
|
||||
render = GST_TEXT_RENDER (parent);
|
||||
|
||||
data = gst_buffer_map (inbuf, &size, NULL, GST_MAP_READ);
|
||||
|
||||
|
@ -574,7 +574,7 @@ done:
|
|||
if (caps)
|
||||
gst_caps_unref (caps);
|
||||
gst_buffer_unref (inbuf);
|
||||
gst_object_unref (render);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,11 +92,14 @@ static void theora_dec_set_property (GObject * object, guint prop_id,
|
|||
const GValue * value, GParamSpec * pspec);
|
||||
|
||||
static gboolean theora_dec_setcaps (GstTheoraDec * dec, GstCaps * caps);
|
||||
static gboolean theora_dec_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn theora_dec_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean theora_dec_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn theora_dec_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static GstStateChangeReturn theora_dec_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean theora_dec_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean theora_dec_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean theora_dec_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean theora_dec_src_convert (GstPad * pad, GstFormat src_format,
|
||||
|
@ -507,12 +510,12 @@ error:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
theora_dec_src_event (GstPad * pad, GstEvent * event)
|
||||
theora_dec_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstTheoraDec *dec;
|
||||
|
||||
dec = GST_THEORA_DEC (gst_pad_get_parent (pad));
|
||||
dec = GST_THEORA_DEC (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEEK:
|
||||
|
@ -579,7 +582,6 @@ theora_dec_src_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
done:
|
||||
gst_object_unref (dec);
|
||||
|
||||
return res;
|
||||
|
||||
|
@ -592,12 +594,12 @@ convert_error:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
theora_dec_sink_event (GstPad * pad, GstEvent * event)
|
||||
theora_dec_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
GstTheoraDec *dec;
|
||||
|
||||
dec = GST_THEORA_DEC (gst_pad_get_parent (pad));
|
||||
dec = GST_THEORA_DEC (parent);
|
||||
|
||||
GST_LOG_OBJECT (dec, "handling event");
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
|
@ -658,11 +660,10 @@ theora_dec_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
done:
|
||||
gst_object_unref (dec);
|
||||
|
||||
return ret;
|
||||
|
||||
|
@ -723,7 +724,7 @@ theora_dec_setcaps (GstTheoraDec * dec, GstCaps * caps)
|
|||
GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
|
||||
|
||||
/* now feed it to the decoder we can ignore the error */
|
||||
theora_dec_chain (dec->sinkpad, buf);
|
||||
theora_dec_chain (dec->sinkpad, GST_OBJECT_CAST (dec), buf);
|
||||
|
||||
/* skip the data */
|
||||
left -= psize;
|
||||
|
@ -1567,13 +1568,13 @@ theora_dec_chain_forward (GstTheoraDec * dec, gboolean discont,
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
theora_dec_chain (GstPad * pad, GstBuffer * buf)
|
||||
theora_dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstTheoraDec *dec;
|
||||
GstFlowReturn res;
|
||||
gboolean discont;
|
||||
|
||||
dec = GST_THEORA_DEC (gst_pad_get_parent (pad));
|
||||
dec = GST_THEORA_DEC (parent);
|
||||
|
||||
/* peel of DISCONT flag */
|
||||
discont = GST_BUFFER_IS_DISCONT (buf);
|
||||
|
@ -1591,8 +1592,6 @@ theora_dec_chain (GstPad * pad, GstBuffer * buf)
|
|||
else
|
||||
res = theora_dec_chain_reverse (dec, discont, buf);
|
||||
|
||||
gst_object_unref (dec);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -248,9 +248,12 @@ G_DEFINE_TYPE_WITH_CODE (GstTheoraEnc, gst_theora_enc,
|
|||
|
||||
static GstCaps *theora_enc_src_caps;
|
||||
|
||||
static gboolean theora_enc_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean theora_enc_src_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn theora_enc_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean theora_enc_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean theora_enc_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn theora_enc_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static GstStateChangeReturn theora_enc_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean theora_enc_sink_query (GstPad * pad, GstObject * parent,
|
||||
|
@ -894,13 +897,13 @@ theora_enc_force_keyframe (GstTheoraEnc * enc)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
theora_enc_sink_event (GstPad * pad, GstEvent * event)
|
||||
theora_enc_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstTheoraEnc *enc;
|
||||
ogg_packet op;
|
||||
gboolean res;
|
||||
|
||||
enc = GST_THEORA_ENC (GST_PAD_PARENT (pad));
|
||||
enc = GST_THEORA_ENC (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_CAPS:
|
||||
|
@ -962,12 +965,12 @@ theora_enc_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
theora_enc_src_event (GstPad * pad, GstEvent * event)
|
||||
theora_enc_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstTheoraEnc *enc;
|
||||
gboolean res = TRUE;
|
||||
|
||||
enc = GST_THEORA_ENC (GST_PAD_PARENT (pad));
|
||||
enc = GST_THEORA_ENC (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_CUSTOM_UPSTREAM:
|
||||
|
@ -1232,7 +1235,7 @@ data_push:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
theora_enc_chain (GstPad * pad, GstBuffer * buffer)
|
||||
theora_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstTheoraEnc *enc;
|
||||
ogg_packet op;
|
||||
|
@ -1240,7 +1243,7 @@ theora_enc_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GstFlowReturn ret;
|
||||
gboolean force_keyframe;
|
||||
|
||||
enc = GST_THEORA_ENC (GST_PAD_PARENT (pad));
|
||||
enc = GST_THEORA_ENC (parent);
|
||||
|
||||
/* we keep track of two timelines.
|
||||
* - The timestamps from the incoming buffers, which we copy to the outgoing
|
||||
|
|
|
@ -94,10 +94,12 @@ static void theora_parse_get_property (GObject * object, guint prop_id,
|
|||
static void theora_parse_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
||||
static GstFlowReturn theora_parse_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn theora_parse_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static GstStateChangeReturn theora_parse_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean theora_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean theora_parse_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean theora_parse_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
|
||||
|
@ -345,7 +347,7 @@ theora_parse_drain_event_queue (GstTheoraParse * parse)
|
|||
GstEvent *event;
|
||||
|
||||
event = GST_EVENT_CAST (g_queue_pop_head (parse->event_queue));
|
||||
gst_pad_event_default (parse->sinkpad, event);
|
||||
gst_pad_event_default (parse->sinkpad, GST_OBJECT_CAST (parse), event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -639,7 +641,7 @@ theora_parse_queue_buffer (GstTheoraParse * parse, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
theora_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||
theora_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstFlowReturn ret;
|
||||
GstTheoraParse *parse;
|
||||
|
@ -647,7 +649,7 @@ theora_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
gsize size;
|
||||
gboolean have_header;
|
||||
|
||||
parse = GST_THEORA_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_THEORA_PARSE (parent);
|
||||
|
||||
have_header = FALSE;
|
||||
|
||||
|
@ -678,8 +680,6 @@ theora_parse_chain (GstPad * pad, GstBuffer * buffer)
|
|||
ret = theora_parse_queue_buffer (parse, buffer);
|
||||
}
|
||||
|
||||
gst_object_unref (parse);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -691,34 +691,32 @@ theora_parse_queue_event (GstTheoraParse * parse, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
theora_parse_sink_event (GstPad * pad, GstEvent * event)
|
||||
theora_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean ret;
|
||||
GstTheoraParse *parse;
|
||||
|
||||
parse = GST_THEORA_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_THEORA_PARSE (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
theora_parse_clear_queue (parse);
|
||||
parse->prev_keyframe = -1;
|
||||
parse->prev_frame = -1;
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
case GST_EVENT_EOS:
|
||||
theora_parse_drain_queue_prematurely (parse);
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
default:
|
||||
if (parse->send_streamheader && GST_EVENT_IS_SERIALIZED (event))
|
||||
ret = theora_parse_queue_event (parse, event);
|
||||
else
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (parse);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,10 +75,12 @@ GST_STATIC_PAD_TEMPLATE ("src",
|
|||
#define gst_vorbis_parse_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstVorbisParse, gst_vorbis_parse, GST_TYPE_ELEMENT);
|
||||
|
||||
static GstFlowReturn vorbis_parse_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn vorbis_parse_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static GstStateChangeReturn vorbis_parse_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
static gboolean vorbis_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean vorbis_parse_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean vorbis_parse_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean vorbis_parse_convert (GstPad * pad, GstFormat src_format,
|
||||
|
@ -174,7 +176,7 @@ vorbis_parse_drain_event_queue (GstVorbisParse * parse)
|
|||
GstEvent *event;
|
||||
|
||||
event = GST_EVENT_CAST (g_queue_pop_head (parse->event_queue));
|
||||
gst_pad_event_default (parse->sinkpad, event);
|
||||
gst_pad_event_default (parse->sinkpad, GST_OBJECT_CAST (parse), event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -416,12 +418,12 @@ vorbis_parse_parse_packet (GstVorbisParse * parse, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
vorbis_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||
vorbis_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstVorbisParseClass *klass;
|
||||
GstVorbisParse *parse;
|
||||
|
||||
parse = GST_VORBIS_PARSE (GST_PAD_PARENT (pad));
|
||||
parse = GST_VORBIS_PARSE (parent);
|
||||
klass = GST_VORBIS_PARSE_CLASS (G_OBJECT_GET_CLASS (parse));
|
||||
|
||||
g_assert (klass->parse_packet != NULL);
|
||||
|
@ -440,34 +442,32 @@ vorbis_parse_queue_event (GstVorbisParse * parse, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
vorbis_parse_sink_event (GstPad * pad, GstEvent * event)
|
||||
vorbis_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean ret;
|
||||
GstVorbisParse *parse;
|
||||
|
||||
parse = GST_VORBIS_PARSE (gst_pad_get_parent (pad));
|
||||
parse = GST_VORBIS_PARSE (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
vorbis_parse_clear_queue (parse);
|
||||
parse->prev_granulepos = -1;
|
||||
parse->prev_blocksize = -1;
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
case GST_EVENT_EOS:
|
||||
vorbis_parse_drain_queue_prematurely (parse);
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
default:
|
||||
if (!parse->streamheader_sent && GST_EVENT_IS_SERIALIZED (event))
|
||||
ret = vorbis_parse_queue_event (parse, event);
|
||||
else
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (parse);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -276,12 +276,15 @@ static GstFlowReturn gst_audio_decoder_chain_reverse (GstAudioDecoder *
|
|||
|
||||
static GstStateChangeReturn gst_audio_decoder_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
static gboolean gst_audio_decoder_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_audio_decoder_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_audio_decoder_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_audio_decoder_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_audio_decoder_sink_setcaps (GstAudioDecoder * dec,
|
||||
GstCaps * caps);
|
||||
gboolean gst_audio_decoder_src_setcaps (GstAudioDecoder * dec, GstCaps * caps);
|
||||
static GstFlowReturn gst_audio_decoder_chain (GstPad * pad, GstBuffer * buf);
|
||||
static GstFlowReturn gst_audio_decoder_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buf);
|
||||
static gboolean gst_audio_decoder_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_audio_decoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
|
@ -1296,12 +1299,12 @@ gst_audio_decoder_chain_reverse (GstAudioDecoder * dec, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_audio_decoder_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_audio_decoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstAudioDecoder *dec;
|
||||
GstFlowReturn ret;
|
||||
|
||||
dec = GST_AUDIO_DECODER (GST_PAD_PARENT (pad));
|
||||
dec = GST_AUDIO_DECODER (parent);
|
||||
|
||||
GST_LOG_OBJECT (dec,
|
||||
"received buffer of size %d with ts %" GST_TIME_FORMAT
|
||||
|
@ -1479,14 +1482,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_decoder_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_audio_decoder_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstAudioDecoder *dec;
|
||||
GstAudioDecoderClass *klass;
|
||||
gboolean handled = FALSE;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
dec = GST_AUDIO_DECODER (gst_pad_get_parent (pad));
|
||||
dec = GST_AUDIO_DECODER (parent);
|
||||
klass = GST_AUDIO_DECODER_GET_CLASS (dec);
|
||||
|
||||
GST_DEBUG_OBJECT (dec, "received event %d, %s", GST_EVENT_TYPE (event),
|
||||
|
@ -1510,7 +1514,7 @@ gst_audio_decoder_sink_event (GstPad * pad, GstEvent * event)
|
|||
if (!GST_EVENT_IS_SERIALIZED (event)
|
||||
|| GST_EVENT_TYPE (event) == GST_EVENT_EOS
|
||||
|| GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
} else {
|
||||
GST_AUDIO_DECODER_STREAM_LOCK (dec);
|
||||
dec->priv->pending_events =
|
||||
|
@ -1522,7 +1526,6 @@ gst_audio_decoder_sink_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
GST_DEBUG_OBJECT (dec, "event handled");
|
||||
|
||||
gst_object_unref (dec);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1585,16 +1588,12 @@ gst_audio_decoder_do_seek (GstAudioDecoder * dec, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_decoder_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_audio_decoder_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstAudioDecoder *dec;
|
||||
gboolean res = FALSE;
|
||||
|
||||
dec = GST_AUDIO_DECODER (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (dec == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
dec = GST_AUDIO_DECODER (parent);
|
||||
|
||||
GST_DEBUG_OBJECT (dec, "received event %d, %s", GST_EVENT_TYPE (event),
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -1648,8 +1647,6 @@ gst_audio_decoder_src_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
done:
|
||||
gst_object_unref (dec);
|
||||
|
||||
return res;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
|
@ -299,10 +299,12 @@ static gboolean gst_audio_encoder_sink_activate_push (GstPad * pad,
|
|||
static GstCaps *gst_audio_encoder_getcaps_default (GstAudioEncoder * enc,
|
||||
GstCaps * filter);
|
||||
|
||||
static gboolean gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_audio_encoder_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_audio_encoder_sink_setcaps (GstAudioEncoder * enc,
|
||||
GstCaps * caps);
|
||||
static GstFlowReturn gst_audio_encoder_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn gst_audio_encoder_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_audio_encoder_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_audio_encoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
|
@ -828,7 +830,7 @@ gst_audio_encoder_set_base_gp (GstAudioEncoder * enc)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_audio_encoder_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_audio_encoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstAudioEncoder *enc;
|
||||
GstAudioEncoderPrivate *priv;
|
||||
|
@ -837,7 +839,7 @@ gst_audio_encoder_chain (GstPad * pad, GstBuffer * buffer)
|
|||
gboolean discont;
|
||||
gsize size;
|
||||
|
||||
enc = GST_AUDIO_ENCODER (GST_OBJECT_PARENT (pad));
|
||||
enc = GST_AUDIO_ENCODER (parent);
|
||||
|
||||
priv = enc->priv;
|
||||
ctx = &enc->priv->ctx;
|
||||
|
@ -1315,14 +1317,15 @@ gst_audio_encoder_sink_eventfunc (GstAudioEncoder * enc, GstEvent * event)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_audio_encoder_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstAudioEncoder *enc;
|
||||
GstAudioEncoderClass *klass;
|
||||
gboolean handled = FALSE;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
enc = GST_AUDIO_ENCODER (gst_pad_get_parent (pad));
|
||||
enc = GST_AUDIO_ENCODER (parent);
|
||||
klass = GST_AUDIO_ENCODER_GET_CLASS (enc);
|
||||
|
||||
GST_DEBUG_OBJECT (enc, "received event %d, %s", GST_EVENT_TYPE (event),
|
||||
|
@ -1346,7 +1349,7 @@ gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event)
|
|||
if (!GST_EVENT_IS_SERIALIZED (event)
|
||||
|| GST_EVENT_TYPE (event) == GST_EVENT_EOS
|
||||
|| GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
} else {
|
||||
GST_AUDIO_ENCODER_STREAM_LOCK (enc);
|
||||
enc->priv->pending_events =
|
||||
|
@ -1358,7 +1361,6 @@ gst_audio_encoder_sink_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
GST_DEBUG_OBJECT (enc, "event handled");
|
||||
|
||||
gst_object_unref (enc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,9 +70,9 @@ static void gst_rtp_base_depayload_get_property (GObject * object,
|
|||
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||
|
||||
static GstFlowReturn gst_rtp_base_depayload_chain (GstPad * pad,
|
||||
GstBuffer * in);
|
||||
GstObject * parent, GstBuffer * in);
|
||||
static gboolean gst_rtp_base_depayload_handle_sink_event (GstPad * pad,
|
||||
GstEvent * event);
|
||||
GstObject * parent, GstEvent * event);
|
||||
|
||||
static GstStateChangeReturn gst_rtp_base_depayload_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
|
@ -236,7 +236,7 @@ gst_rtp_base_depayload_setcaps (GstRTPBaseDepayload * filter, GstCaps * caps)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_rtp_base_depayload_chain (GstPad * pad, GstBuffer * in)
|
||||
gst_rtp_base_depayload_chain (GstPad * pad, GstObject * parent, GstBuffer * in)
|
||||
{
|
||||
GstRTPBaseDepayload *filter;
|
||||
GstRTPBaseDepayloadPrivate *priv;
|
||||
|
@ -250,7 +250,7 @@ gst_rtp_base_depayload_chain (GstPad * pad, GstBuffer * in)
|
|||
gint gap;
|
||||
GstRTPBuffer rtp;
|
||||
|
||||
filter = GST_RTP_BASE_DEPAYLOAD (GST_OBJECT_PARENT (pad));
|
||||
filter = GST_RTP_BASE_DEPAYLOAD (parent);
|
||||
priv = filter->priv;
|
||||
|
||||
/* we must have a setcaps first */
|
||||
|
@ -446,25 +446,20 @@ gst_rtp_base_depayload_handle_event (GstRTPBaseDepayload * filter,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_base_depayload_handle_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_rtp_base_depayload_handle_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
gboolean res = FALSE;
|
||||
GstRTPBaseDepayload *filter;
|
||||
GstRTPBaseDepayloadClass *bclass;
|
||||
|
||||
filter = GST_RTP_BASE_DEPAYLOAD (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (filter == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
filter = GST_RTP_BASE_DEPAYLOAD (parent);
|
||||
bclass = GST_RTP_BASE_DEPAYLOAD_GET_CLASS (filter);
|
||||
if (bclass->handle_event)
|
||||
res = bclass->handle_event (filter, event);
|
||||
else
|
||||
gst_event_unref (event);
|
||||
|
||||
gst_object_unref (filter);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,13 +102,13 @@ static GstCaps *gst_rtp_base_payload_getcaps_default (GstRTPBasePayload *
|
|||
static gboolean gst_rtp_base_payload_sink_event_default (GstRTPBasePayload *
|
||||
rtpbasepayload, GstEvent * event);
|
||||
static gboolean gst_rtp_base_payload_sink_event (GstPad * pad,
|
||||
GstEvent * event);
|
||||
GstObject * parent, GstEvent * event);
|
||||
static gboolean gst_rtp_base_payload_query_default (GstRTPBasePayload *
|
||||
rtpbasepayload, GstPad * pad, GstQuery * query);
|
||||
static gboolean gst_rtp_base_payload_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static GstFlowReturn gst_rtp_base_payload_chain (GstPad * pad,
|
||||
GstBuffer * buffer);
|
||||
GstObject * parent, GstBuffer * buffer);
|
||||
|
||||
static void gst_rtp_base_payload_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec);
|
||||
|
@ -120,8 +120,6 @@ static GstStateChangeReturn gst_rtp_base_payload_change_state (GstElement *
|
|||
|
||||
static GstElementClass *parent_class = NULL;
|
||||
|
||||
/* FIXME 0.11: API should be changed to gst_base_typ_payload_xyz */
|
||||
|
||||
GType
|
||||
gst_rtp_base_payload_get_type (void)
|
||||
{
|
||||
|
@ -344,14 +342,15 @@ static gboolean
|
|||
gst_rtp_base_payload_sink_event_default (GstRTPBasePayload * rtpbasepayload,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstObject *parent = GST_OBJECT_CAST (rtpbasepayload);
|
||||
gboolean res = FALSE;
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, event);
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, parent, event);
|
||||
break;
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, event);
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, parent, event);
|
||||
gst_segment_init (&rtpbasepayload->segment, GST_FORMAT_UNDEFINED);
|
||||
break;
|
||||
case GST_EVENT_CAPS:
|
||||
|
@ -380,29 +379,25 @@ gst_rtp_base_payload_sink_event_default (GstRTPBasePayload * rtpbasepayload,
|
|||
|
||||
GST_DEBUG_OBJECT (rtpbasepayload,
|
||||
"configured SEGMENT %" GST_SEGMENT_FORMAT, segment);
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, event);
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, parent, event);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, event);
|
||||
res = gst_pad_event_default (rtpbasepayload->sinkpad, parent, event);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_rtp_base_payload_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_rtp_base_payload_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstRTPBasePayload *rtpbasepayload;
|
||||
GstRTPBasePayloadClass *rtpbasepayload_class;
|
||||
gboolean res = FALSE;
|
||||
|
||||
rtpbasepayload = GST_RTP_BASE_PAYLOAD (gst_pad_get_parent (pad));
|
||||
if (G_UNLIKELY (rtpbasepayload == NULL)) {
|
||||
gst_event_unref (event);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
rtpbasepayload = GST_RTP_BASE_PAYLOAD (parent);
|
||||
rtpbasepayload_class = GST_RTP_BASE_PAYLOAD_GET_CLASS (rtpbasepayload);
|
||||
|
||||
if (rtpbasepayload_class->sink_event)
|
||||
|
@ -410,8 +405,6 @@ gst_rtp_base_payload_sink_event (GstPad * pad, GstEvent * event)
|
|||
else
|
||||
gst_event_unref (event);
|
||||
|
||||
gst_object_unref (rtpbasepayload);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -464,13 +457,14 @@ gst_rtp_base_payload_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_rtp_base_payload_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_rtp_base_payload_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstRTPBasePayload *rtpbasepayload;
|
||||
GstRTPBasePayloadClass *rtpbasepayload_class;
|
||||
GstFlowReturn ret;
|
||||
|
||||
rtpbasepayload = GST_RTP_BASE_PAYLOAD (gst_pad_get_parent (pad));
|
||||
rtpbasepayload = GST_RTP_BASE_PAYLOAD (parent);
|
||||
rtpbasepayload_class = GST_RTP_BASE_PAYLOAD_GET_CLASS (rtpbasepayload);
|
||||
|
||||
if (!rtpbasepayload_class->handle_buffer)
|
||||
|
@ -478,8 +472,6 @@ gst_rtp_base_payload_chain (GstPad * pad, GstBuffer * buffer)
|
|||
|
||||
ret = rtpbasepayload_class->handle_buffer (rtpbasepayload, buffer);
|
||||
|
||||
gst_object_unref (rtpbasepayload);
|
||||
|
||||
return ret;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -487,7 +479,6 @@ no_function:
|
|||
{
|
||||
GST_ELEMENT_ERROR (rtpbasepayload, STREAM, NOT_IMPLEMENTED, (NULL),
|
||||
("subclass did not implement handle_buffer function"));
|
||||
gst_object_unref (rtpbasepayload);
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
@ -858,8 +849,8 @@ gst_rtp_base_payload_prepare_push (GstRTPBasePayload * payload,
|
|||
(is_list) ? -1 : gst_buffer_get_size (GST_BUFFER (obj)),
|
||||
payload->seqnum, data.rtptime, GST_TIME_ARGS (data.timestamp));
|
||||
|
||||
if (g_atomic_int_compare_and_exchange (&payload->priv->
|
||||
notified_first_timestamp, 1, 0)) {
|
||||
if (g_atomic_int_compare_and_exchange (&payload->
|
||||
priv->notified_first_timestamp, 1, 0)) {
|
||||
g_object_notify (G_OBJECT (payload), "timestamp");
|
||||
g_object_notify (G_OBJECT (payload), "seqnum");
|
||||
}
|
||||
|
|
|
@ -134,20 +134,23 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
|
||||
static void gst_tag_demux_dispose (GObject * object);
|
||||
|
||||
static GstFlowReturn gst_tag_demux_chain (GstPad * pad, GstBuffer * buf);
|
||||
static gboolean gst_tag_demux_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_tag_demux_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buf);
|
||||
static gboolean gst_tag_demux_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
||||
static gboolean gst_tag_demux_src_activate_pull (GstPad * pad, gboolean active);
|
||||
static GstFlowReturn gst_tag_demux_read_range (GstTagDemux * tagdemux,
|
||||
guint64 offset, guint length, GstBuffer ** buffer);
|
||||
|
||||
static GstFlowReturn gst_tag_demux_src_getrange (GstPad * srcpad,
|
||||
guint64 offset, guint length, GstBuffer ** buffer);
|
||||
GstObject * parent, guint64 offset, guint length, GstBuffer ** buffer);
|
||||
|
||||
static void gst_tag_demux_set_src_caps (GstTagDemux * tagdemux,
|
||||
GstCaps * new_caps);
|
||||
|
||||
static gboolean gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_tag_demux_srcpad_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_tag_demux_sink_activate (GstPad * sinkpad);
|
||||
static GstStateChangeReturn gst_tag_demux_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
|
@ -538,12 +541,12 @@ gst_tag_demux_chain_parse_tag (GstTagDemux * demux, GstBuffer * collect)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_tag_demux_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_tag_demux_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstTagDemux *demux;
|
||||
gsize size;
|
||||
|
||||
demux = GST_TAG_DEMUX (GST_PAD_PARENT (pad));
|
||||
demux = GST_TAG_DEMUX (parent);
|
||||
|
||||
size = gst_buffer_get_size (buf);
|
||||
|
||||
|
@ -674,12 +677,12 @@ gst_tag_demux_chain (GstPad * pad, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_tag_demux_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_tag_demux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstTagDemux *demux;
|
||||
gboolean ret;
|
||||
|
||||
demux = GST_TAG_DEMUX (gst_pad_get_parent (pad));
|
||||
demux = GST_TAG_DEMUX (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_EOS:
|
||||
|
@ -687,7 +690,7 @@ gst_tag_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||
GST_WARNING_OBJECT (demux, "EOS before we found a type");
|
||||
GST_ELEMENT_ERROR (demux, STREAM, TYPE_NOT_FOUND, (NULL), (NULL));
|
||||
}
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
case GST_EVENT_SEGMENT:
|
||||
{
|
||||
|
@ -700,7 +703,7 @@ gst_tag_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
case GST_EVENT_FLUSH_START:
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
default:
|
||||
if (demux->priv->need_newseg && GST_EVENT_IS_SERIALIZED (event)) {
|
||||
|
@ -713,12 +716,11 @@ gst_tag_demux_sink_event (GstPad * pad, GstEvent * event)
|
|||
GST_OBJECT_UNLOCK (demux);
|
||||
ret = TRUE;
|
||||
} else {
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (demux);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -741,12 +743,12 @@ gst_tag_demux_get_upstream_size (GstTagDemux * tagdemux)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event)
|
||||
gst_tag_demux_srcpad_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstTagDemux *tagdemux;
|
||||
gboolean res = FALSE;
|
||||
|
||||
tagdemux = GST_TAG_DEMUX (gst_pad_get_parent (pad));
|
||||
tagdemux = GST_TAG_DEMUX (parent);
|
||||
|
||||
/* Handle SEEK events, with adjusted byte offsets and sizes. */
|
||||
|
||||
|
@ -814,9 +816,9 @@ gst_tag_demux_srcpad_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (tagdemux);
|
||||
if (event)
|
||||
gst_event_unref (event);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1284,10 +1286,10 @@ read_beyond_end:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_tag_demux_src_getrange (GstPad * srcpad,
|
||||
gst_tag_demux_src_getrange (GstPad * srcpad, GstObject * parent,
|
||||
guint64 offset, guint length, GstBuffer ** buffer)
|
||||
{
|
||||
GstTagDemux *demux = GST_TAG_DEMUX (GST_PAD_PARENT (srcpad));
|
||||
GstTagDemux *demux = GST_TAG_DEMUX (parent);
|
||||
|
||||
/* downstream in pull mode won't miss a newsegment event,
|
||||
* but it likely appreciates other (tag) events */
|
||||
|
|
|
@ -88,8 +88,10 @@ G_DEFINE_TYPE_WITH_CODE (GstTagMux, gst_tag_mux, GST_TYPE_ELEMENT,
|
|||
|
||||
static GstStateChangeReturn
|
||||
gst_tag_mux_change_state (GstElement * element, GstStateChange transition);
|
||||
static GstFlowReturn gst_tag_mux_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_tag_mux_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_tag_mux_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_tag_mux_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
||||
static void
|
||||
gst_tag_mux_finalize (GObject * obj)
|
||||
|
@ -332,9 +334,9 @@ gst_tag_mux_adjust_event_offsets (GstTagMux * mux,
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_tag_mux_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_tag_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstTagMux *mux = GST_TAG_MUX (GST_OBJECT_PARENT (pad));
|
||||
GstTagMux *mux = GST_TAG_MUX (parent);
|
||||
GstFlowReturn ret;
|
||||
int length;
|
||||
|
||||
|
@ -392,12 +394,12 @@ gst_tag_mux_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_tag_mux_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_tag_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstTagMux *mux;
|
||||
gboolean result;
|
||||
|
||||
mux = GST_TAG_MUX (gst_pad_get_parent (pad));
|
||||
mux = GST_TAG_MUX (parent);
|
||||
result = FALSE;
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
|
@ -478,16 +480,14 @@ gst_tag_mux_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
/* Now forward EOS */
|
||||
result = gst_pad_event_default (pad, event);
|
||||
result = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
result = gst_pad_event_default (pad, event);
|
||||
result = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (mux);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -110,8 +110,10 @@ static gboolean gst_adder_src_query (GstPad * pad, GstObject * parent,
|
|||
GstQuery * query);
|
||||
static gboolean gst_adder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_adder_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_adder_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_adder_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_adder_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
||||
static GstPad *gst_adder_request_new_pad (GstElement * element,
|
||||
GstPadTemplate * temp, const gchar * unused, const GstCaps * caps);
|
||||
|
@ -627,12 +629,12 @@ done:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_adder_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_adder_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstAdder *adder;
|
||||
gboolean result;
|
||||
|
||||
adder = GST_ADDER (gst_pad_get_parent (pad));
|
||||
adder = GST_ADDER (parent);
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "Got %s event on src pad",
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -738,18 +740,17 @@ gst_adder_src_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
done:
|
||||
gst_object_unref (adder);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_adder_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_adder_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstAdder *adder;
|
||||
gboolean ret = TRUE;
|
||||
|
||||
adder = GST_ADDER (gst_pad_get_parent (pad));
|
||||
adder = GST_ADDER (parent);
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "Got %s event on sink pad",
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -803,10 +804,9 @@ gst_adder_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
/* now GstCollectPads can take care of the rest, e.g. EOS */
|
||||
ret = adder->collect_event (pad, event);
|
||||
ret = adder->collect_event (pad, parent, event);
|
||||
|
||||
beach:
|
||||
gst_object_unref (adder);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,9 +106,12 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
|||
GST_STATIC_CAPS (GST_AUDIO_CAPS_MAKE (GST_AUDIO_FORMATS_ALL))
|
||||
);
|
||||
|
||||
static gboolean gst_audio_rate_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_audio_rate_src_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_audio_rate_chain (GstPad * pad, GstBuffer * buf);
|
||||
static gboolean gst_audio_rate_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_audio_rate_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn gst_audio_rate_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buf);
|
||||
|
||||
static void gst_audio_rate_set_property (GObject * object,
|
||||
guint prop_id, const GValue * value, GParamSpec * pspec);
|
||||
|
@ -264,16 +267,16 @@ gst_audio_rate_fill_to_time (GstAudioRate * audiorate, GstClockTime time)
|
|||
* it will take care of filling */
|
||||
buf = gst_buffer_new ();
|
||||
GST_BUFFER_TIMESTAMP (buf) = time;
|
||||
gst_audio_rate_chain (audiorate->sinkpad, buf);
|
||||
gst_audio_rate_chain (audiorate->sinkpad, GST_OBJECT_CAST (audiorate), buf);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_rate_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_audio_rate_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
GstAudioRate *audiorate;
|
||||
|
||||
audiorate = GST_AUDIO_RATE (gst_pad_get_parent (pad));
|
||||
audiorate = GST_AUDIO_RATE (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_CAPS:
|
||||
|
@ -340,18 +343,16 @@ gst_audio_rate_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (audiorate);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_audio_rate_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_audio_rate_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
GstAudioRate *audiorate;
|
||||
|
||||
audiorate = GST_AUDIO_RATE (gst_pad_get_parent (pad));
|
||||
audiorate = GST_AUDIO_RATE (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
default:
|
||||
|
@ -359,8 +360,6 @@ gst_audio_rate_src_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (audiorate);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -419,7 +418,7 @@ gst_audio_rate_notify_add (GstAudioRate * audiorate)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_audio_rate_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_audio_rate_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstAudioRate *audiorate;
|
||||
GstClockTime in_time;
|
||||
|
@ -429,7 +428,7 @@ gst_audio_rate_chain (GstPad * pad, GstBuffer * buf)
|
|||
GstClockTimeDiff diff;
|
||||
gint rate, bpf;
|
||||
|
||||
audiorate = GST_AUDIO_RATE (gst_pad_get_parent (pad));
|
||||
audiorate = GST_AUDIO_RATE (parent);
|
||||
|
||||
rate = GST_AUDIO_INFO_RATE (&audiorate->info);
|
||||
bpf = GST_AUDIO_INFO_BPF (&audiorate->info);
|
||||
|
@ -658,8 +657,6 @@ beach:
|
|||
if (buf)
|
||||
gst_buffer_unref (buf);
|
||||
|
||||
gst_object_unref (audiorate);
|
||||
|
||||
return ret;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
|
@ -78,8 +78,10 @@ static void gst_smart_encoder_dispose (GObject * object);
|
|||
|
||||
static gboolean setup_recoder_pipeline (GstSmartEncoder * smart_encoder);
|
||||
|
||||
static GstFlowReturn gst_smart_encoder_chain (GstPad * pad, GstBuffer * buf);
|
||||
static gboolean smart_encoder_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_smart_encoder_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buf);
|
||||
static gboolean smart_encoder_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean smart_encoder_sink_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static GstCaps *smart_encoder_sink_getcaps (GstPad * pad, GstCaps * filter);
|
||||
|
@ -290,13 +292,13 @@ gst_smart_encoder_push_pending_gop (GstSmartEncoder * smart_encoder)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_smart_encoder_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_smart_encoder_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstSmartEncoder *smart_encoder;
|
||||
GstFlowReturn res = GST_FLOW_OK;
|
||||
gboolean discont, keyframe;
|
||||
|
||||
smart_encoder = GST_SMART_ENCODER (gst_object_get_parent (GST_OBJECT (pad)));
|
||||
smart_encoder = GST_SMART_ENCODER (parent);
|
||||
|
||||
discont = GST_BUFFER_IS_DISCONT (buf);
|
||||
keyframe = !GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||
|
@ -337,15 +339,14 @@ gst_smart_encoder_chain (GstPad * pad, GstBuffer * buf)
|
|||
GST_TIME_ARGS (smart_encoder->gop_stop));
|
||||
|
||||
beach:
|
||||
gst_object_unref (smart_encoder);
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
smart_encoder_sink_event (GstPad * pad, GstEvent * event)
|
||||
smart_encoder_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstSmartEncoder *smart_encoder = GST_SMART_ENCODER (gst_pad_get_parent (pad));
|
||||
GstSmartEncoder *smart_encoder = GST_SMART_ENCODER (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
|
@ -377,7 +378,6 @@ smart_encoder_sink_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
res = gst_pad_push_event (smart_encoder->srcpad, event);
|
||||
|
||||
gst_object_unref (smart_encoder);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ get_encoder (GstCaps * caps)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
internal_chain (GstPad * pad, GstBuffer * buf)
|
||||
internal_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstSmartEncoder *smart_encoder =
|
||||
g_object_get_qdata ((GObject *) pad, INTERNAL_ELEMENT);
|
||||
|
|
|
@ -92,10 +92,9 @@ gst_stream_combiner_dispose (GObject * object)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_stream_combiner_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_stream_combiner_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstStreamCombiner *stream_combiner =
|
||||
(GstStreamCombiner *) GST_PAD_PARENT (pad);
|
||||
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
|
||||
/* FIXME : IMPLEMENT */
|
||||
|
||||
/* with lock taken, check if we're the active stream, if not drop */
|
||||
|
@ -103,10 +102,10 @@ gst_stream_combiner_chain (GstPad * pad, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_combiner_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_stream_combiner_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstStreamCombiner *stream_combiner =
|
||||
(GstStreamCombiner *) GST_PAD_PARENT (pad);
|
||||
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
|
||||
/* FIXME : IMPLEMENT */
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "Got event %s", GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -141,10 +140,10 @@ gst_stream_combiner_sink_query (GstPad * pad, GstObject * parent,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_combiner_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_stream_combiner_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstStreamCombiner *stream_combiner =
|
||||
(GstStreamCombiner *) GST_PAD_PARENT (pad);
|
||||
GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent;
|
||||
GstPad *sinkpad = NULL;
|
||||
|
||||
STREAMS_LOCK (stream_combiner);
|
||||
|
|
|
@ -99,10 +99,9 @@ gst_stream_splitter_dispose (GObject * object)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_stream_splitter_chain (GstPad * pad, GstBuffer * buf)
|
||||
gst_stream_splitter_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstStreamSplitter *stream_splitter =
|
||||
(GstStreamSplitter *) GST_PAD_PARENT (pad);
|
||||
GstStreamSplitter *stream_splitter = (GstStreamSplitter *) parent;
|
||||
GstFlowReturn res;
|
||||
GstPad *srcpad = NULL;
|
||||
|
||||
|
@ -138,10 +137,10 @@ nopad:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_splitter_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_stream_splitter_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstStreamSplitter *stream_splitter =
|
||||
(GstStreamSplitter *) GST_PAD_PARENT (pad);
|
||||
GstStreamSplitter *stream_splitter = (GstStreamSplitter *) parent;
|
||||
gboolean res = TRUE;
|
||||
gboolean toall = FALSE;
|
||||
gboolean store = FALSE;
|
||||
|
@ -381,10 +380,10 @@ beach:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_stream_splitter_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_stream_splitter_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstStreamSplitter *stream_splitter =
|
||||
(GstStreamSplitter *) GST_PAD_PARENT (pad);
|
||||
GstStreamSplitter *stream_splitter = (GstStreamSplitter *) parent;
|
||||
|
||||
GST_DEBUG_OBJECT (pad, "%s", GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
|
|
|
@ -69,10 +69,13 @@ GST_DEBUG_CATEGORY_STATIC (gst_gdp_depay_debug);
|
|||
G_DEFINE_TYPE_WITH_CODE (GstGDPDepay, gst_gdp_depay,
|
||||
GST_TYPE_ELEMENT, _do_init);
|
||||
|
||||
static gboolean gst_gdp_depay_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_gdp_depay_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_gdp_depay_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_gdp_depay_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
||||
static GstFlowReturn gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static GstFlowReturn gst_gdp_depay_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
|
||||
static GstStateChangeReturn gst_gdp_depay_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
|
@ -141,12 +144,12 @@ gst_gdp_depay_finalize (GObject * gobject)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_gdp_depay_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_gdp_depay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstGDPDepay *this;
|
||||
gboolean res = TRUE;
|
||||
|
||||
this = GST_GDP_DEPAY (gst_pad_get_parent (pad));
|
||||
this = GST_GDP_DEPAY (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH_START:
|
||||
|
@ -171,18 +174,17 @@ gst_gdp_depay_sink_event (GstPad * pad, GstEvent * event)
|
|||
gst_event_unref (event);
|
||||
break;
|
||||
}
|
||||
gst_object_unref (this);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_gdp_depay_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_gdp_depay_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstGDPDepay *this;
|
||||
gboolean res = TRUE;
|
||||
|
||||
this = GST_GDP_DEPAY (gst_pad_get_parent (pad));
|
||||
this = GST_GDP_DEPAY (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEEK:
|
||||
|
@ -197,13 +199,12 @@ gst_gdp_depay_src_event (GstPad * pad, GstEvent * event)
|
|||
res = gst_pad_push_event (this->sinkpad, event);
|
||||
break;
|
||||
}
|
||||
gst_object_unref (this);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_gdp_depay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstGDPDepay *this;
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
@ -212,7 +213,7 @@ gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GstEvent *event;
|
||||
guint available;
|
||||
|
||||
this = GST_GDP_DEPAY (gst_pad_get_parent (pad));
|
||||
this = GST_GDP_DEPAY (parent);
|
||||
|
||||
/* On DISCONT, get rid of accumulated data. We assume a buffer after the
|
||||
* DISCONT contains (part of) a new valid header, if not we error because we
|
||||
|
@ -386,7 +387,6 @@ gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
done:
|
||||
gst_object_unref (this);
|
||||
return ret;
|
||||
|
||||
/* ERRORS */
|
||||
|
|
|
@ -75,9 +75,12 @@ G_DEFINE_TYPE_WITH_CODE (GstGDPPay, gst_gdp_pay, GST_TYPE_ELEMENT, _do_init);
|
|||
|
||||
static void gst_gdp_pay_reset (GstGDPPay * this);
|
||||
|
||||
static GstFlowReturn gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer);
|
||||
static gboolean gst_gdp_pay_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_gdp_pay_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_gdp_pay_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer);
|
||||
static gboolean gst_gdp_pay_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
||||
static GstStateChangeReturn gst_gdp_pay_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
|
@ -548,7 +551,7 @@ gst_gdp_queue_buffer (GstGDPPay * this, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_gdp_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||
{
|
||||
GstGDPPay *this;
|
||||
#if 0
|
||||
|
@ -557,7 +560,7 @@ gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer)
|
|||
GstBuffer *outbuffer;
|
||||
GstFlowReturn ret;
|
||||
|
||||
this = GST_GDP_PAY (gst_pad_get_parent (pad));
|
||||
this = GST_GDP_PAY (parent);
|
||||
|
||||
/* we should have received a new_segment before, otherwise it's a bug.
|
||||
* fake one in that case */
|
||||
|
@ -636,7 +639,7 @@ gst_gdp_pay_chain (GstPad * pad, GstBuffer * buffer)
|
|||
|
||||
done:
|
||||
gst_buffer_unref (buffer);
|
||||
gst_object_unref (this);
|
||||
|
||||
return ret;
|
||||
|
||||
/* ERRORS */
|
||||
|
@ -671,10 +674,10 @@ no_buffer:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_gdp_pay_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_gdp_pay_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstBuffer *outbuffer;
|
||||
GstGDPPay *this = GST_GDP_PAY (gst_pad_get_parent (pad));
|
||||
GstGDPPay *this = GST_GDP_PAY (parent);
|
||||
GstFlowReturn flowret;
|
||||
GstCaps *caps;
|
||||
gboolean ret = TRUE;
|
||||
|
@ -751,7 +754,6 @@ gst_gdp_pay_sink_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
done:
|
||||
gst_event_unref (event);
|
||||
gst_object_unref (this);
|
||||
|
||||
return ret;
|
||||
|
||||
|
@ -780,12 +782,12 @@ push_error:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_gdp_pay_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_gdp_pay_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstGDPPay *this;
|
||||
gboolean res = TRUE;
|
||||
|
||||
this = GST_GDP_PAY (gst_pad_get_parent (pad));
|
||||
this = GST_GDP_PAY (parent);
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_SEEK:
|
||||
|
@ -800,7 +802,6 @@ gst_gdp_pay_src_event (GstPad * pad, GstEvent * event)
|
|||
res = gst_pad_push_event (this->sinkpad, event);
|
||||
break;
|
||||
}
|
||||
gst_object_unref (this);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -248,10 +248,10 @@ unblock:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_play_sink_convert_bin_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_play_sink_convert_bin_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstPlaySinkConvertBin *self =
|
||||
GST_PLAY_SINK_CONVERT_BIN (gst_pad_get_parent (pad));
|
||||
GstPlaySinkConvertBin *self = GST_PLAY_SINK_CONVERT_BIN (parent);
|
||||
gboolean ret;
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
|
@ -267,7 +267,7 @@ gst_play_sink_convert_bin_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
ret = gst_proxy_pad_event_default (pad, gst_event_ref (event));
|
||||
ret = gst_proxy_pad_event_default (pad, parent, gst_event_ref (event));
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
|
||||
GstSegment seg;
|
||||
|
@ -289,7 +289,6 @@ gst_play_sink_convert_bin_sink_event (GstPad * pad, GstEvent * event)
|
|||
}
|
||||
|
||||
gst_event_unref (event);
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -154,10 +154,10 @@ gst_stream_synchronizer_query (GstPad * pad, GstObject * parent,
|
|||
|
||||
/* srcpad functions */
|
||||
static gboolean
|
||||
gst_stream_synchronizer_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_stream_synchronizer_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstStreamSynchronizer *self =
|
||||
GST_STREAM_SYNCHRONIZER (gst_pad_get_parent (pad));
|
||||
GstStreamSynchronizer *self = GST_STREAM_SYNCHRONIZER (parent);
|
||||
GstPad *opad;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
|
@ -227,17 +227,15 @@ skip_adjustments:
|
|||
}
|
||||
|
||||
out:
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* sinkpad functions */
|
||||
static gboolean
|
||||
gst_stream_synchronizer_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstStreamSynchronizer *self =
|
||||
GST_STREAM_SYNCHRONIZER (gst_pad_get_parent (pad));
|
||||
GstStreamSynchronizer *self = GST_STREAM_SYNCHRONIZER (parent);
|
||||
GstPad *opad;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
|
@ -498,16 +496,14 @@ skip_adjustments:
|
|||
}
|
||||
|
||||
done:
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_stream_synchronizer_sink_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_stream_synchronizer_sink_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstStreamSynchronizer *self =
|
||||
GST_STREAM_SYNCHRONIZER (gst_pad_get_parent (pad));
|
||||
GstStreamSynchronizer *self = GST_STREAM_SYNCHRONIZER (parent);
|
||||
GstPad *opad;
|
||||
GstFlowReturn ret = GST_FLOW_ERROR;
|
||||
GstStream *stream;
|
||||
|
@ -618,9 +614,6 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
done:
|
||||
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1629,13 +1629,14 @@ gst_subtitle_overlay_class_init (GstSubtitleOverlayClass * klass)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_subtitle_overlay_src_proxy_chain (GstPad * proxypad, GstBuffer * buffer)
|
||||
gst_subtitle_overlay_src_proxy_chain (GstPad * proxypad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstPad *ghostpad;
|
||||
GstSubtitleOverlay *self;
|
||||
GstFlowReturn ret;
|
||||
|
||||
ghostpad = GST_PAD_CAST (gst_pad_get_parent (proxypad));
|
||||
ghostpad = GST_PAD_CAST (parent);
|
||||
if (G_UNLIKELY (!ghostpad)) {
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_ERROR;
|
||||
|
@ -1647,7 +1648,7 @@ gst_subtitle_overlay_src_proxy_chain (GstPad * proxypad, GstBuffer * buffer)
|
|||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
ret = gst_proxy_pad_chain_default (proxypad, buffer);
|
||||
ret = gst_proxy_pad_chain_default (proxypad, parent, buffer);
|
||||
|
||||
if (IS_VIDEO_CHAIN_IGNORE_ERROR (ret)) {
|
||||
GST_ERROR_OBJECT (self, "Downstream chain error: %s",
|
||||
|
@ -1656,20 +1657,20 @@ gst_subtitle_overlay_src_proxy_chain (GstPad * proxypad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
gst_object_unref (self);
|
||||
gst_object_unref (ghostpad);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_subtitle_overlay_src_proxy_event (GstPad * proxypad, GstEvent * event)
|
||||
gst_subtitle_overlay_src_proxy_event (GstPad * proxypad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstPad *ghostpad = NULL;
|
||||
GstSubtitleOverlay *self = NULL;
|
||||
gboolean ret = FALSE;
|
||||
const GstStructure *s;
|
||||
|
||||
ghostpad = GST_PAD_CAST (gst_pad_get_parent (proxypad));
|
||||
ghostpad = GST_PAD_CAST (parent);
|
||||
if (G_UNLIKELY (!ghostpad))
|
||||
goto out;
|
||||
self = GST_SUBTITLE_OVERLAY_CAST (gst_pad_get_parent (ghostpad));
|
||||
|
@ -1684,7 +1685,7 @@ gst_subtitle_overlay_src_proxy_event (GstPad * proxypad, GstEvent * event)
|
|||
event = NULL;
|
||||
ret = TRUE;
|
||||
} else {
|
||||
ret = gst_proxy_pad_event_default (proxypad, event);
|
||||
ret = gst_proxy_pad_event_default (proxypad, parent, event);
|
||||
event = NULL;
|
||||
}
|
||||
|
||||
|
@ -1693,8 +1694,7 @@ out:
|
|||
gst_event_unref (event);
|
||||
if (self)
|
||||
gst_object_unref (self);
|
||||
if (ghostpad)
|
||||
gst_object_unref (ghostpad);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1744,9 +1744,10 @@ out:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_subtitle_overlay_video_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_subtitle_overlay_video_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (gst_pad_get_parent (pad));
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (parent);
|
||||
gboolean ret;
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
|
@ -1772,7 +1773,7 @@ gst_subtitle_overlay_video_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
ret = gst_proxy_pad_event_default (pad, gst_event_ref (event));
|
||||
ret = gst_proxy_pad_event_default (pad, parent, gst_event_ref (event));
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
|
||||
GST_DEBUG_OBJECT (pad, "segment event: %" GST_PTR_FORMAT, event);
|
||||
|
@ -1784,7 +1785,6 @@ gst_subtitle_overlay_video_sink_event (GstPad * pad, GstEvent * event)
|
|||
|
||||
done:
|
||||
gst_event_unref (event);
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
|
||||
|
@ -1799,10 +1799,11 @@ invalid_format:
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_subtitle_overlay_video_sink_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_subtitle_overlay_video_sink_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (GST_PAD_PARENT (pad));
|
||||
GstFlowReturn ret = gst_proxy_pad_chain_default (pad, buffer);
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (parent);
|
||||
GstFlowReturn ret = gst_proxy_pad_chain_default (pad, parent, buffer);
|
||||
|
||||
if (G_UNLIKELY (self->downstream_chain_error) || self->passthrough_identity) {
|
||||
return ret;
|
||||
|
@ -1822,15 +1823,16 @@ gst_subtitle_overlay_video_sink_chain (GstPad * pad, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_subtitle_overlay_subtitle_sink_chain (GstPad * pad, GstBuffer * buffer)
|
||||
gst_subtitle_overlay_subtitle_sink_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buffer)
|
||||
{
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (GST_PAD_PARENT (pad));
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (parent);
|
||||
|
||||
if (self->subtitle_error) {
|
||||
gst_buffer_unref (buffer);
|
||||
return GST_FLOW_OK;
|
||||
} else {
|
||||
GstFlowReturn ret = gst_proxy_pad_chain_default (pad, buffer);
|
||||
GstFlowReturn ret = gst_proxy_pad_chain_default (pad, parent, buffer);
|
||||
|
||||
if (IS_SUBTITLE_CHAIN_IGNORE_ERROR (ret)) {
|
||||
GST_DEBUG_OBJECT (self, "Subtitle chain error: %s",
|
||||
|
@ -1970,9 +1972,10 @@ gst_subtitle_overlay_subtitle_sink_unlink (GstPad * pad)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event)
|
||||
{
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (gst_pad_get_parent (pad));
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY (parent);
|
||||
gboolean ret;
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_CUSTOM_DOWNSTREAM_OOB &&
|
||||
|
@ -2026,7 +2029,7 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
|
||||
ret = gst_proxy_pad_event_default (pad, gst_event_ref (event));
|
||||
ret = gst_proxy_pad_event_default (pad, parent, gst_event_ref (event));
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
|
||||
GST_DEBUG_OBJECT (pad, "segment event: %" GST_PTR_FORMAT, event);
|
||||
|
@ -2037,7 +2040,6 @@ gst_subtitle_overlay_subtitle_sink_event (GstPad * pad, GstEvent * event)
|
|||
gst_event_unref (event);
|
||||
|
||||
out:
|
||||
gst_object_unref (self);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,12 @@ G_DEFINE_TYPE (GstSsaParse, gst_ssa_parse, GST_TYPE_ELEMENT);
|
|||
static GstStateChangeReturn gst_ssa_parse_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
static gboolean gst_ssa_parse_setcaps (GstPad * sinkpad, GstCaps * caps);
|
||||
static gboolean gst_ssa_parse_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_ssa_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static GstFlowReturn gst_ssa_parse_chain (GstPad * sinkpad, GstBuffer * buf);
|
||||
static gboolean gst_ssa_parse_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_ssa_parse_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static GstFlowReturn gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent,
|
||||
GstBuffer * buf);
|
||||
|
||||
static void
|
||||
gst_ssa_parse_dispose (GObject * object)
|
||||
|
@ -112,13 +115,13 @@ gst_ssa_parse_class_init (GstSsaParseClass * klass)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ssa_parse_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_ssa_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
return gst_pad_event_default (pad, event);
|
||||
return gst_pad_event_default (pad, parent, event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_ssa_parse_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_ssa_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
|
@ -133,7 +136,7 @@ gst_ssa_parse_sink_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
res = gst_pad_event_default (pad, event);
|
||||
res = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
return res;
|
||||
|
@ -304,10 +307,10 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt,
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_ssa_parse_chain (GstPad * sinkpad, GstBuffer * buf)
|
||||
gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstFlowReturn ret;
|
||||
GstSsaParse *parse = GST_SSA_PARSE (GST_PAD_PARENT (sinkpad));
|
||||
GstSsaParse *parse = GST_SSA_PARSE (parent);
|
||||
GstClockTime ts;
|
||||
gchar *txt;
|
||||
gchar *data;
|
||||
|
|
|
@ -80,15 +80,18 @@ static GstStaticPadTemplate src_templ = GST_STATIC_PAD_TEMPLATE ("src",
|
|||
);
|
||||
|
||||
|
||||
static gboolean gst_sub_parse_src_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_sub_parse_src_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
static gboolean gst_sub_parse_src_query (GstPad * pad, GstObject * parent,
|
||||
GstQuery * query);
|
||||
static gboolean gst_sub_parse_sink_event (GstPad * pad, GstEvent * event);
|
||||
static gboolean gst_sub_parse_sink_event (GstPad * pad, GstObject * parent,
|
||||
GstEvent * event);
|
||||
|
||||
static GstStateChangeReturn gst_sub_parse_change_state (GstElement * element,
|
||||
GstStateChange transition);
|
||||
|
||||
static GstFlowReturn gst_sub_parse_chain (GstPad * sinkpad, GstBuffer * buf);
|
||||
static GstFlowReturn gst_sub_parse_chain (GstPad * sinkpad, GstObject * parent,
|
||||
GstBuffer * buf);
|
||||
|
||||
#define gst_sub_parse_parent_class parent_class
|
||||
G_DEFINE_TYPE (GstSubParse, gst_sub_parse, GST_TYPE_ELEMENT);
|
||||
|
@ -259,9 +262,9 @@ gst_sub_parse_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_sub_parse_src_event (GstPad * pad, GstEvent * event)
|
||||
gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstSubParse *self = GST_SUBPARSE (gst_pad_get_parent (pad));
|
||||
GstSubParse *self = GST_SUBPARSE (parent);
|
||||
gboolean ret = FALSE;
|
||||
|
||||
GST_DEBUG ("Handling %s event", GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -310,13 +313,11 @@ gst_sub_parse_src_event (GstPad * pad, GstEvent * event)
|
|||
break;
|
||||
}
|
||||
default:
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
beach:
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1528,12 +1529,12 @@ handle_buffer (GstSubParse * self, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static GstFlowReturn
|
||||
gst_sub_parse_chain (GstPad * sinkpad, GstBuffer * buf)
|
||||
gst_sub_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf)
|
||||
{
|
||||
GstFlowReturn ret;
|
||||
GstSubParse *self;
|
||||
|
||||
self = GST_SUBPARSE (GST_PAD_PARENT (sinkpad));
|
||||
self = GST_SUBPARSE (parent);
|
||||
|
||||
/* Push newsegment if needed */
|
||||
if (self->need_segment) {
|
||||
|
@ -1550,9 +1551,9 @@ gst_sub_parse_chain (GstPad * sinkpad, GstBuffer * buf)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_sub_parse_sink_event (GstPad * pad, GstEvent * event)
|
||||
gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
||||
{
|
||||
GstSubParse *self = GST_SUBPARSE (gst_pad_get_parent (pad));
|
||||
GstSubParse *self = GST_SUBPARSE (parent);
|
||||
gboolean ret = FALSE;
|
||||
|
||||
GST_DEBUG ("Handling %s event", GST_EVENT_TYPE_NAME (event));
|
||||
|
@ -1573,9 +1574,9 @@ gst_sub_parse_sink_event (GstPad * pad, GstEvent * event)
|
|||
gst_buffer_set_size (buf, 2);
|
||||
|
||||
GST_BUFFER_OFFSET (buf) = self->offset;
|
||||
gst_sub_parse_chain (pad, buf);
|
||||
gst_sub_parse_chain (pad, parent, buf);
|
||||
}
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_SEGMENT:
|
||||
|
@ -1600,23 +1601,21 @@ gst_sub_parse_sink_event (GstPad * pad, GstEvent * event)
|
|||
{
|
||||
self->flushing = TRUE;
|
||||
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
case GST_EVENT_FLUSH_STOP:
|
||||
{
|
||||
self->flushing = FALSE;
|
||||
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ret = gst_pad_event_default (pad, event);
|
||||
ret = gst_pad_event_default (pad, parent, event);
|
||||
break;
|
||||
}
|
||||
|
||||
gst_object_unref (self);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue