mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
Added some comments and use _PAD_IS_USABLE instead of _IS_ACTIVE
Original commit message from CVS: Added some comments and use _PAD_IS_USABLE instead of _IS_ACTIVE
This commit is contained in:
parent
9b48b95257
commit
37717df482
2 changed files with 18 additions and 4 deletions
|
@ -301,15 +301,22 @@ gst_aggregator_loop (GstElement *element)
|
||||||
if (aggregator->sched == AGGREGATOR_LOOP) {
|
if (aggregator->sched == AGGREGATOR_LOOP) {
|
||||||
GList *pads = aggregator->sinkpads;
|
GList *pads = aggregator->sinkpads;
|
||||||
|
|
||||||
|
/* we'll loop over all pads and try to pull from all
|
||||||
|
* active ones */
|
||||||
while (pads) {
|
while (pads) {
|
||||||
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));
|
/* we need to check is the pad is usable. IS_USABLE will check
|
||||||
if (GST_PAD_IS_ACTIVE (pad)) {
|
* if the pad is linked, if it is enabled (the element is
|
||||||
|
* playing and the app didn't gst_pad_set_enabled (pad, FALSE))
|
||||||
|
* and that the peer pad is also enabled.
|
||||||
|
*/
|
||||||
|
if (GST_PAD_IS_USABLE (pad)) {
|
||||||
buf = gst_pad_pull (pad);
|
buf = gst_pad_pull (pad);
|
||||||
debug = "loop";
|
debug = "loop";
|
||||||
|
|
||||||
|
/* then push it forward */
|
||||||
gst_aggregator_push (aggregator, pad, buf, debug);
|
gst_aggregator_push (aggregator, pad, buf, debug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,15 +301,22 @@ gst_aggregator_loop (GstElement *element)
|
||||||
if (aggregator->sched == AGGREGATOR_LOOP) {
|
if (aggregator->sched == AGGREGATOR_LOOP) {
|
||||||
GList *pads = aggregator->sinkpads;
|
GList *pads = aggregator->sinkpads;
|
||||||
|
|
||||||
|
/* we'll loop over all pads and try to pull from all
|
||||||
|
* active ones */
|
||||||
while (pads) {
|
while (pads) {
|
||||||
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));
|
/* we need to check is the pad is usable. IS_USABLE will check
|
||||||
if (GST_PAD_IS_ACTIVE (pad)) {
|
* if the pad is linked, if it is enabled (the element is
|
||||||
|
* playing and the app didn't gst_pad_set_enabled (pad, FALSE))
|
||||||
|
* and that the peer pad is also enabled.
|
||||||
|
*/
|
||||||
|
if (GST_PAD_IS_USABLE (pad)) {
|
||||||
buf = gst_pad_pull (pad);
|
buf = gst_pad_pull (pad);
|
||||||
debug = "loop";
|
debug = "loop";
|
||||||
|
|
||||||
|
/* then push it forward */
|
||||||
gst_aggregator_push (aggregator, pad, buf, debug);
|
gst_aggregator_push (aggregator, pad, buf, debug);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue