<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
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/' target='_new'>More than messages</a></body>
</html>