mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
- make aggregator actually work
Original commit message from CVS: - make aggregator actually work
This commit is contained in:
parent
d19cc5f7a0
commit
54b35086ea
2 changed files with 24 additions and 8 deletions
|
@ -79,6 +79,7 @@ static void gst_aggregator_init (GstAggregator *aggregator);
|
||||||
|
|
||||||
static GstPad* gst_aggregator_request_new_pad (GstElement *element, GstPadTemplate *temp, const
|
static GstPad* gst_aggregator_request_new_pad (GstElement *element, GstPadTemplate *temp, const
|
||||||
gchar *unused);
|
gchar *unused);
|
||||||
|
static void gst_aggregator_update_functions (GstAggregator *aggregator);
|
||||||
|
|
||||||
static void gst_aggregator_set_property (GObject *object, guint prop_id,
|
static void gst_aggregator_set_property (GObject *object, guint prop_id,
|
||||||
const GValue *value, GParamSpec *pspec);
|
const GValue *value, GParamSpec *pspec);
|
||||||
|
@ -153,6 +154,8 @@ gst_aggregator_init (GstAggregator *aggregator)
|
||||||
aggregator->sinkpads = NULL;
|
aggregator->sinkpads = NULL;
|
||||||
aggregator->silent = FALSE;
|
aggregator->silent = FALSE;
|
||||||
aggregator->sched = AGGREGATOR_LOOP;
|
aggregator->sched = AGGREGATOR_LOOP;
|
||||||
|
|
||||||
|
gst_aggregator_update_functions (aggregator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPad*
|
static GstPad*
|
||||||
|
@ -176,7 +179,9 @@ gst_aggregator_request_new_pad (GstElement *element, GstPadTemplate *templ, cons
|
||||||
sinkpad = gst_pad_new_from_template (templ, name);
|
sinkpad = gst_pad_new_from_template (templ, name);
|
||||||
g_free (name);
|
g_free (name);
|
||||||
|
|
||||||
|
if (!AGGREGATOR_IS_LOOP_BASED (aggregator)) {
|
||||||
gst_pad_set_chain_function (sinkpad, gst_aggregator_chain);
|
gst_pad_set_chain_function (sinkpad, gst_aggregator_chain);
|
||||||
|
}
|
||||||
gst_element_add_pad (GST_ELEMENT (aggregator), sinkpad);
|
gst_element_add_pad (GST_ELEMENT (aggregator), sinkpad);
|
||||||
|
|
||||||
aggregator->sinkpads = g_list_prepend (aggregator->sinkpads, sinkpad);
|
aggregator->sinkpads = g_list_prepend (aggregator->sinkpads, sinkpad);
|
||||||
|
@ -294,12 +299,15 @@ gst_aggregator_loop (GstElement *element)
|
||||||
GstPad *pad = GST_PAD (pads->data);
|
GstPad *pad = GST_PAD (pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
|
|
||||||
|
g_print ("inspecting pad %s:%s\n", GST_DEBUG_PAD_NAME (pad));
|
||||||
|
if (GST_PAD_IS_ACTIVE (pad)) {
|
||||||
buf = gst_pad_pull (pad);
|
buf = gst_pad_pull (pad);
|
||||||
debug = "loop";
|
debug = "loop";
|
||||||
|
|
||||||
gst_aggregator_push (aggregator, pad, buf, debug);
|
gst_aggregator_push (aggregator, pad, buf, debug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (aggregator->sched == AGGREGATOR_LOOP_SELECT) {
|
if (aggregator->sched == AGGREGATOR_LOOP_SELECT) {
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
|
@ -79,6 +79,7 @@ static void gst_aggregator_init (GstAggregator *aggregator);
|
||||||
|
|
||||||
static GstPad* gst_aggregator_request_new_pad (GstElement *element, GstPadTemplate *temp, const
|
static GstPad* gst_aggregator_request_new_pad (GstElement *element, GstPadTemplate *temp, const
|
||||||
gchar *unused);
|
gchar *unused);
|
||||||
|
static void gst_aggregator_update_functions (GstAggregator *aggregator);
|
||||||
|
|
||||||
static void gst_aggregator_set_property (GObject *object, guint prop_id,
|
static void gst_aggregator_set_property (GObject *object, guint prop_id,
|
||||||
const GValue *value, GParamSpec *pspec);
|
const GValue *value, GParamSpec *pspec);
|
||||||
|
@ -153,6 +154,8 @@ gst_aggregator_init (GstAggregator *aggregator)
|
||||||
aggregator->sinkpads = NULL;
|
aggregator->sinkpads = NULL;
|
||||||
aggregator->silent = FALSE;
|
aggregator->silent = FALSE;
|
||||||
aggregator->sched = AGGREGATOR_LOOP;
|
aggregator->sched = AGGREGATOR_LOOP;
|
||||||
|
|
||||||
|
gst_aggregator_update_functions (aggregator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstPad*
|
static GstPad*
|
||||||
|
@ -176,7 +179,9 @@ gst_aggregator_request_new_pad (GstElement *element, GstPadTemplate *templ, cons
|
||||||
sinkpad = gst_pad_new_from_template (templ, name);
|
sinkpad = gst_pad_new_from_template (templ, name);
|
||||||
g_free (name);
|
g_free (name);
|
||||||
|
|
||||||
|
if (!AGGREGATOR_IS_LOOP_BASED (aggregator)) {
|
||||||
gst_pad_set_chain_function (sinkpad, gst_aggregator_chain);
|
gst_pad_set_chain_function (sinkpad, gst_aggregator_chain);
|
||||||
|
}
|
||||||
gst_element_add_pad (GST_ELEMENT (aggregator), sinkpad);
|
gst_element_add_pad (GST_ELEMENT (aggregator), sinkpad);
|
||||||
|
|
||||||
aggregator->sinkpads = g_list_prepend (aggregator->sinkpads, sinkpad);
|
aggregator->sinkpads = g_list_prepend (aggregator->sinkpads, sinkpad);
|
||||||
|
@ -294,12 +299,15 @@ gst_aggregator_loop (GstElement *element)
|
||||||
GstPad *pad = GST_PAD (pads->data);
|
GstPad *pad = GST_PAD (pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
|
|
||||||
|
g_print ("inspecting pad %s:%s\n", GST_DEBUG_PAD_NAME (pad));
|
||||||
|
if (GST_PAD_IS_ACTIVE (pad)) {
|
||||||
buf = gst_pad_pull (pad);
|
buf = gst_pad_pull (pad);
|
||||||
debug = "loop";
|
debug = "loop";
|
||||||
|
|
||||||
gst_aggregator_push (aggregator, pad, buf, debug);
|
gst_aggregator_push (aggregator, pad, buf, debug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
if (aggregator->sched == AGGREGATOR_LOOP_SELECT) {
|
if (aggregator->sched == AGGREGATOR_LOOP_SELECT) {
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
Loading…
Reference in a new issue