After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729811 - output-selector: test example in gstreamer plugin base is giving "Internal data flow error"
output-selector: test example in gstreamer plugin base is giving "Internal da...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.0.10
Other Linux
: Normal major
: 1.4.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-08 12:15 UTC by Sukesh
Modified: 2014-09-04 09:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
output-selector handle CAPS event (1022 bytes, patch)
2014-08-22 07:21 UTC, RaviKiran
none Details | Review
output-selector handle CAPS event (1.69 KB, patch)
2014-08-27 04:39 UTC, RaviKiran
needs-work Details | Review
send events to active src pad (1.78 KB, patch)
2014-08-27 11:33 UTC, RaviKiran
committed Details | Review

Description Sukesh 2014-05-08 12:15:48 UTC
I was trying to understand output selector. I referred test example of output-selector in gstreamer-plugin-base. I was able to build with gstreamer-1.0. But if you run it, It is giving Internal data flow error.

code is in gstreamer1.0-plugins-base/tests/icles/output-selector-test.c
version : 1.0.10

Some Reference log:

0:00:00.081638764 [334m 3609[00m  0x9131180 [33;01mWARN   [00m [00m       basetransform gstbasetransform.c:2115:gst_base_transform_handle_buffer:<videoconvert1>[00m warning: not negotiated
0:00:00.081666494 [334m 3609[00m  0x9131180 [33;01mWARN   [00m [00m       basetransform gstbasetransform.c:2115:gst_base_transform_handle_buffer:<videoconvert1>[00m warning: not negotiated
0:00:00.081683229 [334m 3609[00m  0x9131180 [36mINFO   [00m [00;01;31;47m    GST_ERROR_SYSTEM gstelement.c:1835:gst_element_message_full:<videoconvert1>[00m posting message: not negotiated
Got warning message
0:00:00.081759187 [334m 3609[00m  0x9131180 [36mINFO   [00m [00;01;31;47m    GST_ERROR_SYSTEM gstelement.c:1858:gst_element_message_full:<videoconvert1>[00m posted warning message: not negotiated
0:00:00.081784419 [334m 3609[00m  0x9131180 [33;01mWARN   [00m [00m             basesrc gstbasesrc.c:2865:gst_base_src_loop:<src>[00m error: Internal data flow error.
0:00:00.081793291 [334m 3609[00m  0x9131180 [33;01mWARN   [00m [00m             basesrc gstbasesrc.c:2865:gst_base_src_loop:<src>[00m error: streaming task paused, reason not-negotiated (-4)
0:00:00.081805253 [334m 3609[00m  0x9131180 [36mINFO   [00m [00;01;31;47m    GST_ERROR_SYSTEM gstelement.c:1835:gst_element_message_full:<src>[00m posting message: Internal data flow error.
Got error message
Error: Internal data flow error.
Comment 1 RaviKiran 2014-08-22 07:21:21 UTC
Created attachment 284167 [details] [review]
output-selector handle CAPS event

CAPS event wasn't handled in output-selector. With this patch, it worked. Although, there is "Sticky event misordering" warning for the first time when pads switch. I'm trying to find out.
Comment 2 RaviKiran 2014-08-27 04:39:46 UTC
Created attachment 284576 [details] [review]
output-selector handle CAPS event

"Sticky event mis-ordering" warning was because SEGMENT event was sent to src_1 of output-selector before CAPS event. One option is to send CAPS event to all src pads. But, I think better option is to send the SEGMENT event to active pad, as the sticky events are sent anyway when the pad become active.
New patch attached. Feedback welcome.
Comment 3 Sebastian Dröge (slomo) 2014-08-27 07:30:05 UTC
Review of attachment 284576 [details] [review]:

Makes sense to me but I guess it should do this for all sticky events then? Or even all events?

::: plugins/elements/gstoutputselector.c
@@ +542,3 @@
+      active = gst_output_selector_get_active (sel);
+      if (active) {
+        res = gst_pad_set_caps (active, caps);

Why not just forward the caps event directly with gst_pad_push_event(active, event)?

@@ +547,3 @@
+        res = FALSE;
+      }
+      gst_caps_unref (caps);

I think you need to unref the event here too
Comment 4 RaviKiran 2014-08-27 11:33:27 UTC
Created attachment 284593 [details] [review]
send events to active src pad

Hmm Ok. Except for EOS event I think. EOS should be sent to all src pads.
Comment 5 Sebastian Dröge (slomo) 2014-09-02 09:35:07 UTC
commit 63a943aa8215be781b62b77dfdb2d2ad2c534899
Author: Ravi Kiran K N <ravi.kiran@samsung.com>
Date:   Wed Aug 27 17:06:57 2014 +0530

    output-selector: Send all events to active src pad and EOS to all src pads
    
    Fixes tests/icles/output-selector-test
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729811