Problem creating a request pad for a tee element

sant1mb santimb55 at gmail.com
Wed May 11 08:55:01 UTC 2016


When I try to execute the following code, i get this error:

(mp3extract2:3753): GStreamer-CRITICAL **: gst_element_request_pad:
assertion 'templ != NULL' failed

(mp3extract2:3753): GStreamer-CRITICAL **: gst_object_get_name: assertion
'GST_IS_OBJECT (object)' failed
Obtained request pad (null) for audio branch.

(mp3extract2:3753): GStreamer-CRITICAL **: gst_element_request_pad:
assertion 'templ != NULL' failed

(mp3extract2:3753): GStreamer-CRITICAL **: gst_object_get_name: assertion
'GST_IS_OBJECT (object)' failed
Obtained request pad (null) for mp3 branch.

(mp3extract2:3753): GStreamer-CRITICAL **: gst_pad_link_full: assertion
'GST_IS_PAD (srcpad)' failed
Tee could not be linked.

I use this code from a tutorial but it doesn't work

tee_src_pad_template = gst_element_class_get_pad_template
(GST_ELEMENT_GET_CLASS (tee), "src%d");
  tee_play_pad = gst_element_request_pad (tee, tee_src_pad_template, NULL,
NULL);
  g_print ("Obtained request pad %s for play branch.\n", gst_pad_get_name
(tee_play_pad));
  queue_play_pad = gst_element_get_static_pad (playqueue, "sink");

  tee_mp3_pad = gst_element_request_pad (tee, tee_src_pad_template, NULL,
NULL);
  g_print ("Obtained request pad %s for mp3 branch.\n", gst_pad_get_name
(tee_mp3_pad));
  queue_mp3_pad = gst_element_get_static_pad (extractqueue, "sink");

  if (gst_pad_link (tee_play_pad, queue_play_pad) != GST_PAD_LINK_OK ||
      gst_pad_link (tee_mp3_pad, queue_mp3_pad) != GST_PAD_LINK_OK) {
    g_printerr ("Tee could not be linked.\n");
    gst_object_unref (pipeline);
    return -1;
  }

  gst_object_unref (queue_play_pad);
  gst_object_unref (queue_mp3_pad);

What could be the problem?

Thanks



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Problem-creating-a-request-pad-for-a-tee-element-tp4677467.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list