<div>HI ,</div>
<div> </div>
<div>           Use gst_element_link_filtered to link two elements using caps  and use gst_caps_new_simple  to create the caps.<br><br></div>
<div class="gmail_quote">On Tue, Jun 16, 2009 at 1:55 PM, Zelalem Sintayehu <span dir="ltr">&lt;<a href="mailto:zelalems@hotmail.com">zelalems@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi all, I had a command line code to record video into file that I receive from the network. The following is the code:<br><br>gst-launch udpsrc port=5000 caps=&quot;application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998&quot; num-buffers=5000 ! queue ! rtph263pdepay ! &#39;video/x-h263,width=320,height=240,framerate=(fraction)25/1&#39; ! queue ! avimux ! queue ! filesink location=test1.avi<br>
<br>As I was preparing this to include in an application, when I changed the above command into a C code, I got an error. I traced back the error and understand that the error relates to adding the cap (that is located between the h263depay and the second queue (before avimux), please look at it above). The following is what I did to add the elements into the pipeline:<br>
<br>  gst_bin_add_many (GST_BIN (pipeline), udpsource, queue1, h263depay, caps2, avimuxer, queue2, filedes, NULL);        <br><br>I created caps2 using GstCaps. The others are created using GstElement. To link the elements, I used the following:<br>
<br>  gst_element_link_many(udpsource, queue1, h263depay,caps2,avimuxer, queue2, filedes, NULL);<br><br>So, the above two statments created the following errors. <br>(videorecorder:19632): GStreamer-CRITICAL **: gst_bin_add: assertion `GST_IS_ELEMENT (element)&#39; failed<br>
(videorecorder:19632): GStreamer-CRITICAL **: gst_element_link_pads_filtered: assertion `GST_IS_ELEMENT (dest)&#39; failed<br><br>So, I want you to help me on how to add caps into pipeline and also link it to other elements.<br>
<br>I have attached the whole code herewith.<br><br>Thank you.<br><br>- Zelalem S. <br><br><br><br><br><br><br>
<hr>
check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. <a href="http://www.microsoft.com/windows/windowslive/" target="_blank">More than messages</a></div><br>------------------------------------------------------------------------------<br>
Crystal Reports - New Free Runtime and 30 Day Trial<br>Check out the new simplified licensing option that enables unlimited<br>royalty-free distribution of the report engine for externally facing<br>server and web deployment.<br>
<a href="http://p.sf.net/sfu/businessobjects" target="_blank">http://p.sf.net/sfu/businessobjects</a><br>_______________________________________________<br>gstreamer-devel mailing list<br><a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br><br></blockquote></div><br><br clear="all">
<div></div><br>-- <br>Regards,<br><br>Sudarshan Bisht<br>