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

kk pinganddu90 at gmail.com
Sun Aug 18 08:51:35 UTC 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190818/66d522a2/attachment.html>


More information about the gstreamer-devel mailing list