no such pad 'video_%u' in element "qtdemux0"

classic Classic list List threaded Threaded
2 messages Options
kk
Reply | Threaded
Open this post in threaded view
|

no such pad 'video_%u' in element "qtdemux0"

kk
Hi experts:

OS: Ubuntu 16.04.6 LTS
Gstreamer Version: GStreamer 1.8.3

I want to write an application to play mp4 file base on gstreamer, my code:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
  pipeline = gst_pipeline_new("my-pipeline");
  filesrc = gst_element_factory_make ("filesrc",NULL);
  demux = gst_element_factory_make("qtdemux",NULL);
  decoder = gst_element_factory_make("avdec_h264",NULL);
  sink = gst_element_factory_make("xvimagesink",NULL);

  g_object_set(G_OBJECT(filesrc),"location",argv[1],NULL);

  gst_bin_add_many(GST_BIN (pipeline),filesrc,demux,decoder,sink,NULL);

  if(gst_element_link_many(filesrc,demux,decoder,sink,NULL)!=TRUE)
  {
    g_error ("Failed to link");
  }
......
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I add GST_DEBUG=4 before executing, error show:

````````````````````````````````````````````````````````````````````````````````````````````````
GST_ELEMENT_PADS gstelement.c:904:gst_element_get_static_pad: no such pad 'video_%u' in element "qtdemux0"
GST_ELEMENT_PADS gstutils.c:1124:gst_element_get_compatible_pad:<qtdemux0> Could not find a compatible pad to link to filter:sink
````````````````````````````````````````````````````````````````````````````````````````````````

My question:
how to manually add pad "video_%u" to qtdemux?

//dengke

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: no such pad 'video_%u' in element "qtdemux0"

Vinod Kesti
kk,

qtdemux cant be directly linked to decoder as video_%u is some time pad.

Use "pad-added" signal of qtdemux to link qtdemux to avdec_h264.

Below tutorial may help you
https://gstreamer.freedesktop.org/documentation/tutorials/basic/dynamic-pipelines.html?gi-language=c

 /* Connect to the pad-added signal */
*  g_signal_connect (data.source, "pad-added", G_CALLBACK
(pad_added_handler), &data);*



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel