<div> </div>
<div> Hi Zelalem  </div>
<div> </div>
<div>   Dont add that caps2 element in bin .<br><br></div>
<div class="gmail_quote">On Tue, Jun 16, 2009 at 3:13 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 Sudarshan, thank you for your prompt response. In fact, I used the gst_caps_new_simple to create the caps. I used the GstCaps to define them before creating them. So, it was a mistake when I express it. I now used three link statements (please look at below. I used two link statements to link the two ends (leaving the caps in the m,iddle) and then used link filter to link the two links):<br>
gst_element_link_many (udpsource, queue1, h263depay, NULL);  //to link elements before the caps<br>gst_element_link_many (avimuxer, queue2, filedes, NULL);  ////to link elements after the caps<br>//link two elements with a filter (i.e. h263depay and queue2 with caps2)<br>
gboolean link_ok = gst_element_link_filtered (h263depay, avimuxer, caps2);  //to link the above two links<br><br>Now the error related to the link is gone (I don&#39;t know whether I am still correct or not), but the &quot;add element to bin&quot; function still produced the same error. The following is the output when i run my code:<br>
<br>Starting program: /home/zelalem/videorecorder <br>[Thread debugging using libthread_db enabled]<br>[New Thread 0xb7bb66b0 (LWP 28219)]<br><br>(videorecorder:28219): GStreamer-CRITICAL **: gst_bin_add: assertion `GST_IS_ELEMENT (element)&#39; failed<br>
[New Thread 0xb7936b90 (LWP 28223)]<br>[New Thread 0xb7135b90 (LWP 28224)]<br>[New Thread 0xb67ffb90 (LWP 28225)]<br><br>Program exited normally.<br><br><br>So, I asume the problem is with adding teh cap into the pipeline.<br>
<br>Thank you.<br><br>- Zelalem S. <br><br>
<hr>
Date: Tue, 16 Jun 2009 14:15:08 +0530<br>From: <a href="mailto:bisht.sudarshan@gmail.com" target="_blank">bisht.sudarshan@gmail.com</a><br>To: <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
Subject: Re: [gst-devel] Problem with adding cap to pipeline 
<div>
<div></div>
<div class="h5"><br><br>
<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>On Tue, Jun 16, 2009 at 1:55 PM, Zelalem Sintayehu <span dir="ltr">&lt;<a href="mailto:zelalems@hotmail.com" target="_blank">zelalems@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote style="PADDING-LEFT: 1ex; BORDER-LEFT: rgb(204,204,204) 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" target="_blank">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><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></div></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>