Gstreamer receive video: streaming task paused, reason not-negotiated (-4)

Максим Галушка maxim.galushka at mail.ru
Tue Jun 7 15:24:41 UTC 2016


Hi,

I'm trying to transmit RTP video stream through network via UDP protocol.
Here is pipeline code on sender side:
https://gist.github.com/mgalushka/68d8ee034849a7db4f1f234e73a41405

I can receive and see actual video if I run receiver with `gst-launch-1.0` command-line like this:
gst-launch-1.0 -v udpsrc address=127.0.0.1 port=1234 caps="application/x-rtp" ! rtph263pdepay ! avdec_h263 ! autovideosink
But I cannot see window with video when I execute receiver for same pipeline in **c** code.
Here is pipeline code on receiver side (in full - because I believe here is error somewhere):
void _receive_video_init_gstreamer(NiceAgent *magent, guint stream_id, CustomData *data)
{
GstElement *pipeline, *source, *capsfilter, *videoconvert, *h263p, *rtph263pdepay, *sink;
GstBus *bus;
GstMessage *msg;
GstStateChangeReturn ret;
GSource *bus_source;

source = gst_element_factory_make ("udpsrc", "source");
rtph263pdepay = gst_element_factory_make ("rtph263pdepay", "rtph263pdepay");
h263p = gst_element_factory_make ("avdec_h263p", "h263p");
sink = gst_element_factory_make ("autovideosink", "sink");

g_object_set (source, "address", "127.0.0.1", NULL);
g_object_set (source, "port", 1234, NULL);

g_object_set (source, "caps", gst_caps_from_string("application/x-rtp"), NULL);

g_object_set (sink, "sync", FALSE, NULL);

pipeline = gst_pipeline_new ("Video receive pipeline");

if (!pipeline || !source ||
!h263p || !rtph263pdepay || !sink)
{
g_printerr ("Not all elements could be created.\n");
return;
}

gst_bin_add_many (GST_BIN (pipeline), source,
rtph263pdepay, h263p, sink, NULL);

if (gst_element_link_many (source,
rtph263pdepay, h263p, sink, NULL) != TRUE) {
g_printerr ("Elements could not be linked.\n");
gst_object_unref (pipeline);
return;
}

bus = gst_element_get_bus (pipeline);
gst_bus_enable_sync_message_emission (bus);
gst_bus_add_signal_watch (bus);

g_signal_connect (bus, "message::error",
(GCallback) on_error, NULL);

data->pipeline = pipeline;
ret = gst_element_set_state(data->pipeline, GST_STATE_PLAYING);

if (ret == GST_STATE_CHANGE_FAILURE) {
g_printerr ("Unable to set the pipeline to the playing state.\n");
gst_object_unref (pipeline);
return;
}
}
Error onserved from code:
WARN basesrc gstbasesrc.c:2943:void gst_base_src_loop(GstPad *):<source> error: Internal data flow error. 
WARN basesrc gstbasesrc.c:2943:void gst_base_src_loop(GstPad *):<source> error: streaming task paused, reason not-negotiated (-4) 
ERROR default gstreamer_utils.c:42:on_error: Error received from element source: Internal data flow error.
How can I debug this issue?
Thanks,
Maxim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160607/9df2a2dc/attachment.html>


More information about the gstreamer-devel mailing list