rtspsrc Internal data flow error. in C code

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Sep 3 08:35:10 PDT 2013


On Fri, 2013-08-30 at 00:41 -0700, teguhginanjar wrote:

Hi,

> hi there i use gstreamer for receive an ipcamera streaming via rtsp  video
> with CLI 
> 
> gst-launch rtsp://admin:12345@172.16.6.10:7070  ! decodebin !
> ffmpegcolorspace ! xvimagesink
> 
> its work fine,  when i  write similar code in C but its get following "error
> : Internal data flow error."

Print the 'debug' detail string of the error message. I bet it says 'not
linked' or so.

You don't link the source as far as I can see. Not surprising, since you
can't do that yet there, you have to g_signal_connect() to the
"pad-added" callback, and link in there.

Then, you do _link_many() trying to link decoder (decodebin) to
ffmpegcolorspace, but that will fail, because just like rtspsrc
decodebin also has 'dynamic pads', which are created later.

Cheers
 -Tim

> }
> 
> 
> int main (int argc, char ** argv)
> {
> 	gst_init (&argc, &argv);
> 	
> 	GMainLoop * loop = g_main_loop_new (NULL, FALSE);
> 	GstBus * bus;
> 	GstElement * pipeline, * decoder, * sink, * colorspace, * source;
> 	pipeline = gst_pipeline_new ("players");
> 	source = gst_element_factory_make ("rtspsrc", NULL);
> 	decoder = gst_element_factory_make ("decodebin", NULL);
> 	colorspace = gst_element_factory_make ("ffmpegcolorspace", NULL);
> 	sink = gst_element_factory_make ("autovideosink", NULL);
> 	
> 	g_object_set (G_OBJECT (source), "location",
> "rtsp://admin:123456@172.16.6.11:7070", NULL);
> 	
> 	bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
> 	gst_bus_add_watch (bus, bus_call, loop);
> 	g_object_unref (bus);
> 	
> 	gst_bin_add_many (GST_BIN (pipeline), source, decoder, colorspace, sink,
> NULL);
> 	gst_element_link_many (decoder, colorspace, sink, NULL);
> 	
> 	gst_element_set_state (pipeline, GST_STATE_PLAYING);
> 	g_main_loop_run (loop);
> 	return 0;
> }
> 
> 
> where is the problem in my C code ? thanks for help
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/rtspsrc-Internal-data-flow-error-in-C-code-tp4661784.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list