androi - udpsrc0 internal data folow error

cxphong caoxuanphong.khtn at gmail.com
Thu Mar 13 21:45:02 PDT 2014


Hello all, I editted tutorial 3 of gstreamer sdk turorial for android base on
the following command (In linux, it worked well), but on Android it had an
error:

*udpsrc0:streaming task paused, reason not-negotiated
udpsrc0: internal data follow error*

But, when I replaced *GstData.autoaudiosink* by *GstData.fakesink* I could
view video without audio. Maybe error caused by play both video & audio at
the same time? 

Command:
   gst-launch-0.10 udpsrc port=5000 ! "application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP2T,
payload=(int)33" ! queue ! gstrtpjitterbuffer ! queue ! rtpmp2tdepay !
queue! tsdemux name=demux  demux. ! queue ! ffdec_h264 ! autovideosink
sync=true demux. ! queue  ! mad ! autoaudiosink sync=true

C code:

/typedef struct GstCustomData {
  GstElement *pipeline;
  GstElement *udpsrc;
  GstElement *capsfilter;
  GstElement *queue1, *queue2, *queue3, *queue4, *queue5;
  GstElement *gstrtpjitterbuffer;
  GstElement *rtpmp2tdepay;
  GstElement *tsdemux;
  GstElement *ffdec_h264;
  GstElement *autovideosink;
  GstElement *mad;
  GstElement *autoaudiosink;
  GstElement *fakesink;
} GstreamerCustomData;
[...]

 GstData.udpsrc 		  = gst_element_factory_make ("udpsrc", NULL);
    GstData.capsfilter	  = gst_element_factory_make ("capsfilter", NULL);
    GstData.gstrtpjitterbuffer = gst_element_factory_make
("gstrtpjitterbuffer", NULL);
    GstData.rtpmp2tdepay 	  = gst_element_factory_make ("rtpmp2tdepay",
NULL);
    GstData.tsdemux 		  = gst_element_factory_make ("tsdemux", NULL);
    GstData.ffdec_h264	  = gst_element_factory_make ("ffdec_h264", NULL);
    GstData.autovideosink 	  = gst_element_factory_make ("autovideosink",
NULL);
    GstData.mad 		  = gst_element_factory_make ("mad", NULL);
    GstData.autoaudiosink 	  = gst_element_factory_make ("autoaudiosink",
NULL);
    GstData.queue1 = gst_element_factory_make ("queue", NULL);
    GstData.queue2 = gst_element_factory_make ("queue", NULL);
    GstData.queue3 = gst_element_factory_make ("queue", NULL);
    GstData.queue4 = gst_element_factory_make ("queue", NULL);
    GstData.queue5 = gst_element_factory_make ("queue", NULL);
    GstData.fakesink = gst_element_factory_make ("fakesink", NULL);


    /* Create the empty pipeline */
    GstData.pipeline = gst_pipeline_new ("test-pipeline");

    if (!GstData.pipeline || !GstData.udpsrc || !GstData.capsfilter ||
!GstData.gstrtpjitterbuffer || !GstData.rtpmp2tdepay ||
      !GstData.tsdemux || !GstData.ffdec_h264 || !GstData.autoaudiosink ||
!GstData.mad  || !GstData.autovideosink
      || !GstData.queue1 || !GstData.queue2 || !GstData.queue3 ||
!GstData.queue4 || !GstData.queue5 )
      {
    	g_printerr ("Not all elements could be created.\n");
    	return;
      }

    gst_bin_add_many (GST_BIN (GstData.pipeline), GstData.udpsrc,
GstData.capsfilter, GstData.gstrtpjitterbuffer, GstData.rtpmp2tdepay,
      GstData.tsdemux, GstData.ffdec_h264, GstData.autovideosink,
GstData.mad, GstData.autoaudiosink
      , GstData.queue1, GstData.queue2, GstData.queue3, GstData.queue4,
GstData.queue5, NULL);

      if (!gst_element_link_many (GstData.udpsrc, GstData.capsfilter,
GstData.queue1, GstData.gstrtpjitterbuffer, GstData.queue2,
      GstData.rtpmp2tdepay, GstData.queue3, GstData.tsdemux, NULL))
      {
    	g_printerr ("Elements could not be linked.\n");
    	gst_object_unref (GstData.pipeline);
    	return;
      }

      if (!gst_element_link_many (GstData.queue4, GstData.ffdec_h264,
GstData.autovideosink, NULL))
      {
    	g_printerr ("Elements could not be linked.\n");
    	gst_object_unref (GstData.pipeline);
    	return;
      }

      if (!gst_element_link_many (GstData.queue5, GstData.mad,
GstData.autoaudiosink, NULL))
      {
    	g_printerr ("Elements could not be linked.\n");
    	gst_object_unref (GstData.pipeline);
    	return;
      }



    /* Set the URI to play */
    g_object_set (GstData.udpsrc, "port", 5000, NULL);
    g_object_set (GstData.capsfilter, "caps",
gst_caps_from_string("application/x-rtp, media=(string)video,
clock-rate=(int)90000, encoding-name=(string)MP2T, payload=(int)33"), NULL);

  //  g_print ("data.queue4 = %d\n data.queue5 = %d\n", data.queue4,
data.queue5);
    /* Connect to the pad-added signal */
    g_signal_connect (GstData.tsdemux, "pad-added", G_CALLBACK
(pad_added_handler), NULL);/

Thanks all!





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/androi-udpsrc0-internal-data-folow-error-tp4665949.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list