Problem creating a request pad for a tee element

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

Problem creating a request pad for a tee element

sant1mb
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
Reply | Threaded
Open this post in threaded view
|

Re: Problem creating a request pad for a tee element

Arun Raghavan-4
On Wed, 11 May 2016, at 02:25 PM, sant1mb wrote:
> When I try to execute the following code, i get this error:
>
> (mp3extract2:3753): GStreamer-CRITICAL **: gst_element_request_pad:
> assertion 'templ != NULL' failed
[...]

This problem cascades into subsequent problems. You need to make sure
that the template you're trying to get is non-NULL.

> 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");

Looks like you're using example code from GStreamer 0.10 (which is no
longer supported). In GStreamer 1.0, this is src_%u.

-- Arun
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel