mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
add parent to activate functions
This commit is contained in:
parent
67d328bbe2
commit
b948769e6e
2 changed files with 20 additions and 18 deletions
|
@ -198,9 +198,9 @@ gst_signal_processor_get_type (void)
|
|||
|
||||
static void gst_signal_processor_finalize (GObject * object);
|
||||
static gboolean gst_signal_processor_src_activate_pull (GstPad * pad,
|
||||
gboolean active);
|
||||
GstObject * parent, gboolean active);
|
||||
static gboolean gst_signal_processor_sink_activate_push (GstPad * pad,
|
||||
gboolean active);
|
||||
GstObject * parent, gboolean active);
|
||||
static GstStateChangeReturn gst_signal_processor_change_state (GstElement *
|
||||
element, GstStateChange transition);
|
||||
|
||||
|
@ -1063,12 +1063,13 @@ gst_signal_processor_chain (GstPad * pad, GstObject * parent,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_signal_processor_sink_activate_push (GstPad * pad, gboolean active)
|
||||
gst_signal_processor_sink_activate_push (GstPad * pad, GstObject * parent,
|
||||
gboolean active)
|
||||
{
|
||||
gboolean result = TRUE;
|
||||
GstSignalProcessor *self;
|
||||
|
||||
self = GST_SIGNAL_PROCESSOR (gst_pad_get_parent (pad));
|
||||
self = GST_SIGNAL_PROCESSOR (parent);
|
||||
|
||||
if (active) {
|
||||
if (self->mode == GST_PAD_MODE_NONE) {
|
||||
|
@ -1094,18 +1095,17 @@ gst_signal_processor_sink_activate_push (GstPad * pad, gboolean active)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "result : %d", result);
|
||||
|
||||
gst_object_unref (self);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_signal_processor_src_activate_pull (GstPad * pad, gboolean active)
|
||||
gst_signal_processor_src_activate_pull (GstPad * pad, GstObject * parent,
|
||||
gboolean active)
|
||||
{
|
||||
gboolean result = TRUE;
|
||||
GstSignalProcessor *self;
|
||||
|
||||
self = GST_SIGNAL_PROCESSOR (gst_pad_get_parent (pad));
|
||||
self = GST_SIGNAL_PROCESSOR (parent);
|
||||
|
||||
if (active) {
|
||||
if (self->mode == GST_PAD_MODE_NONE) {
|
||||
|
@ -1140,8 +1140,6 @@ gst_signal_processor_src_activate_pull (GstPad * pad, gboolean active)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "result : %d", result);
|
||||
|
||||
gst_object_unref (self);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,9 +77,11 @@ static void mpegts_base_dispose (GObject * object);
|
|||
static void mpegts_base_finalize (GObject * object);
|
||||
static void mpegts_base_free_program (MpegTSBaseProgram * program);
|
||||
static void mpegts_base_free_stream (MpegTSBaseStream * ptream);
|
||||
static gboolean mpegts_base_sink_activate (GstPad * pad);
|
||||
static gboolean mpegts_base_sink_activate_pull (GstPad * pad, gboolean active);
|
||||
static gboolean mpegts_base_sink_activate_push (GstPad * pad, gboolean active);
|
||||
static gboolean mpegts_base_sink_activate (GstPad * pad, GstObject * parent);
|
||||
static gboolean mpegts_base_sink_activate_pull (GstPad * pad,
|
||||
GstObject * parent, gboolean active);
|
||||
static gboolean mpegts_base_sink_activate_push (GstPad * pad,
|
||||
GstObject * parent, gboolean active);
|
||||
static GstFlowReturn mpegts_base_chain (GstPad * pad, GstObject * parent,
|
||||
GstBuffer * buf);
|
||||
static gboolean mpegts_base_sink_event (GstPad * pad, GstObject * parent,
|
||||
|
@ -1532,7 +1534,7 @@ push_mode:
|
|||
|
||||
|
||||
static gboolean
|
||||
mpegts_base_sink_activate (GstPad * sinkpad)
|
||||
mpegts_base_sink_activate (GstPad * sinkpad, GstObject * parent)
|
||||
{
|
||||
GstQuery *query;
|
||||
gboolean pull_mode;
|
||||
|
@ -1561,9 +1563,10 @@ activate_push:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
mpegts_base_sink_activate_pull (GstPad * pad, gboolean active)
|
||||
mpegts_base_sink_activate_pull (GstPad * pad, GstObject * parent,
|
||||
gboolean active)
|
||||
{
|
||||
MpegTSBase *base = GST_MPEGTS_BASE (GST_OBJECT_PARENT (pad));
|
||||
MpegTSBase *base = GST_MPEGTS_BASE (parent);
|
||||
if (active) {
|
||||
base->mode = BASE_MODE_SCANNING;
|
||||
return gst_pad_start_task (pad, (GstTaskFunction) mpegts_base_loop, base);
|
||||
|
@ -1572,9 +1575,10 @@ mpegts_base_sink_activate_pull (GstPad * pad, gboolean active)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
mpegts_base_sink_activate_push (GstPad * pad, gboolean active)
|
||||
mpegts_base_sink_activate_push (GstPad * pad, GstObject * parent,
|
||||
gboolean active)
|
||||
{
|
||||
MpegTSBase *base = GST_MPEGTS_BASE (GST_OBJECT_PARENT (pad));
|
||||
MpegTSBase *base = GST_MPEGTS_BASE (parent);
|
||||
base->mode = BASE_MODE_PUSHING;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue