<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi Sudarshan, I removed the caps from gst_bin_add_many function and linked it (the caps) with the gst_element_link_filtered. So, I have two gst_element_link_many functions two link the two set of elemens before and after the caps. And the link filtered to link these two links with the caps. Now there is no error. But it terminates immediately (while I expect it to continue recording). The following is the output:<br>(gdb) run<br>Starting program: /home/zelalem/videorecorder <br>[Thread debugging using libthread_db enabled]<br>[New Thread 0xb7b2e6b0 (LWP 28619)]<br><br>[New Thread 0xb78aeb90 (LWP 28623)]<br>[New Thread 0xb70adb90 (LWP 28624)]<br>[New Thread 0xb66ffb90 (LWP 28625)]<br><br>Program exited normally.<br>(gdb) <br><br>The following is how I created the pipeline and tried to link the elements:<br><br>gst_bin_add_many (GST_BIN (pipeline), udpsource, queue1, h263depay, avimuxer, queue2, filedes, NULL);<br><br>gst_element_link_many (udpsource, queue1, h263depay, NULL);<br>
gst_element_link_many (avimuxer, queue2, filedes, NULL);<br>
<br>
gboolean link_ok = gst_element_link_filtered (h263depay, avimuxer, caps2);<br><br>Thank you.<br><br>- Zelalem S. <br><br><br><hr id="stopSpelling">Date: Tue, 16 Jun 2009 14:15:08 +0530<br>From: bisht.sudarshan@gmail.com<br>To: gstreamer-devel@lists.sourceforge.net<br>Subject: Re: [gst-devel] Problem with adding cap to pipeline<br><br><div>HI ,</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Use gst_element_link_filtered to link&nbsp;two elements using caps &nbsp;and use gst_caps_new_simple&nbsp; to create the caps.<br><br></div>
<div class="EC_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="EC_gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<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="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998" num-buffers=5000 ! queue ! rtph263pdepay ! 'video/x-h263,width=320,height=240,framerate=(fraction)25/1' ! 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>&nbsp; gst_bin_add_many (GST_BIN (pipeline), udpsource, queue1, h263depay, caps2, avimuxer, queue2, filedes, NULL);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>I created caps2 using GstCaps. The others are created using GstElement. To link the elements, I used the following:<br>
<br>&nbsp; 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)' failed<br>
(videorecorder:19632): GStreamer-CRITICAL **: gst_element_link_pads_filtered: assertion `GST_IS_ELEMENT (dest)' 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/">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">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">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 />Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! <a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us' target='_new'>Try it!</a></body>
</html>