<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Natanael<div class=""><br class=""></div><div class="">The problem you are having now is because you are using <b class="">get_element_get_static_pad </b>to ask for the audiomixer pad. This function is for <u class="">static pads only</u>. The videomixer pads are request pads, hence this function will return NULL giving you the error on the next functions. </div><div class=""><br class=""></div><div class="">Using your original code, it should look something like:</div><div class=""><br class=""></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span>gst_bin_add(GST_BIN(pipeline), source->get_bin());<br class=""> GstPad *mixer_pad = gst_element_request_pad (audiomixer, mix_template, NULL, NULL);<br class=""> GstPad *a_pad = gst_element_get_static_pad(source->get_bin(), "audiosrc");<br class=""> if (gst_pad_link (a_pad, mixer_pad) != GST_PAD_LINK_OK ){<br class=""> g_critical ("link audio source to audiomixer failed.\n");<br class=""> exit(1);<br class=""> }</i></div><div class=""><i class=""><span class="Apple-tab-span" style="white-space:pre"> </span><b class="">g_object_set(mixer_pad, “mute”, TRUE, NULL);</b></i></div><div class=""><br class=""></div><div class="">Note how I’m using the pad that was returned originally by gst_element_request_pad. You need to keep a reference of the pads in order to set the properties later.</div><div class=""><br class=""><div class="">
<div class=""><div class=""><font size="1" class="">—</font></div><div class=""><font size="1" class="">Michael Gruner <<a href="mailto:michael.gruner@ridgerun.com" class="">michael.gruner@ridgerun.com</a>></font></div><div class=""><font size="1" class="">Embedded Linux and GStreamer solutions</font></div><div class=""><font size="1" class="">RidgeRun Engineering</font></div><div class=""><font size="1" class="">Contact Us - <a href="http://www.ridgerun.com/#!contact/c3vn" class="">http://www.ridgerun.com/#!contact/c3vn</a></font></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jun 2, 2016, at 21:10, Natanael Mojica <<a href="mailto:neithanmo@gmail.com" class="">neithanmo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thanks Michael<br class=""><br class="">I tried your recomendation but that not work, example:<br class=""><br class="">GObject *pad =G_OBJECT(gst_element_get_static_pad(audiomixer, sink.toUtf8().constData()));<br class=""><br class="">then:<br class=""><br class=""> g_object_set(pad, "volume", x,NULL);<br class=""><br class="">and in running time I get this error:<br class=""><br class=""> g_object_set: assertion 'G_IS_OBJECT (object)' failed<br class=""><br class="">and if in another way:<br class=""><br class="">g_object_set(gst_element_get_static_pad(audiomixer, sink.toUtf8().constData()), "volume", x , NULL);<br class=""><br class="">dont work ., getting same error message<br class=""><br class="">So, whats is the correct way to do that??<br class=""></div>
_______________________________________________<br class="">gstreamer-devel mailing list<br class=""><a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a><br class="">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel<br class=""></div></blockquote></div><br class=""></div></body></html>