pushing stream-start event in wrong direction

Tim Müller tim at centricular.com
Wed Jun 11 04:20:58 PDT 2014


On Wed, 2014-06-11 at 13:02 +0200, Lee Matthews wrote:

Hi Lee,

> I'm working on an application for an android phone that captures video from an external camera and streams the video over the network. I'm now trying to optionally save the video at the same time as streaming it. I'm achieving this using a tee and an output-selector, my pipeline looks as follows :
> 
> bin = gst_parse_launch ("webmmux streamable=true name=stream v4l2src device=/dev/video3 ! video/x-raw,format=(string)YUY2,width=(int)320,height=(int)240,framerate=(fraction)20/1 ! videoconvert ! vp8enc deadline=1 threads=3 token-partitions=2 cpu-used=1 end-usage=cbr target-bitrate=2048000 ! tee name=t ! queue ! stream. t. ! queue !  webmmux name=mux ! output-selector name=s s. ! fakesink name=fakesink async=0 s. ! filesink name=filesink location=/data/data/com.mobinet.mobinetbootapp/files/test.webm async=0", &err);
> 
> When I don't wish to record the output of the tee goes the fakesink, when I do wish to record, the output of the tee goes to filesink.
> 
> By using 
> 
> g_object_set(G_OBJECT(output_selector), "active-pad", filesink_sinkpad, NULL); 
> or 
> g_object_set(G_OBJECT(output_selector), "active-pad", fakesink_sinkpad, NULL); 
> 
> When I wish to start recording by setting g_object_set(G_OBJECT(output_selector), "active-pad", filesink_sinkpad, NULL); 
> 
> I get the following error :
> 
> W/GLib+GStreamer( 4416): pad filesink:sink pushing stream-start event in wrong direction
> W/GLib+GStreamer( 4416): pad filesink:sink pushing caps event in wrong direction
> W/GLib+GStreamer( 4416): pad filesink:sink pushing segment event in wrong direction
> W/GLib+GStreamer( 4416): pad filesink:sink pushing segment event in wrong direction
> W/GStreamer+output-selector( 4416): 0:01:22.497417365 0x77b31af0 gstoutputselector.c:399:gst_output_selector_switch:<s> newsegment handling failed in <filesink:sink>
> W/GStreamer+basesrc( 4416): 0:01:22.531647156 0x77b31b20 gstbasesrc.c:2933:gst_base_src_loop:<v4l2src0> error: Internal data flow error.
> W/GStreamer+basesrc( 4416): 0:01:22.531772573 0x77b31b20 gstbasesrc.c:2933:gst_base_src_loop:<v4l2src0> error: streaming task paused, reason error (-5)

Is the filesink_sinkpad/fakesink_sinkpad pad that you're setting as
"active-pad" on outputselector actually one of *outputselector*'s source
pads, or is it the sink pad of the sink element? "active-pad" wants one
of the selector pads I think.

Cheers
 -Tim


-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list