[gst-devel] Problem with adding cap to pipeline

sudarshan bisht bisht.sudarshan at gmail.com
Tue Jun 16 10:45:08 CEST 2009


HI ,

           Use gst_element_link_filtered to link two elements using caps
 and use gst_caps_new_simple  to create the caps.

On Tue, Jun 16, 2009 at 1:55 PM, Zelalem Sintayehu <zelalems at hotmail.com>wrote:

> Hi all, I had a command line code to record video into file that I receive
> from the network. The following is the code:
>
> 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
>
> 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:
>
>   gst_bin_add_many (GST_BIN (pipeline), udpsource, queue1, h263depay,
> caps2, avimuxer, queue2, filedes, NULL);
>
> I created caps2 using GstCaps. The others are created using GstElement. To
> link the elements, I used the following:
>
>   gst_element_link_many(udpsource, queue1, h263depay,caps2,avimuxer,
> queue2, filedes, NULL);
>
> So, the above two statments created the following errors.
> (videorecorder:19632): GStreamer-CRITICAL **: gst_bin_add: assertion
> `GST_IS_ELEMENT (element)' failed
> (videorecorder:19632): GStreamer-CRITICAL **:
> gst_element_link_pads_filtered: assertion `GST_IS_ELEMENT (dest)' failed
>
> So, I want you to help me on how to add caps into pipeline and also link it
> to other elements.
>
> I have attached the whole code herewith.
>
> Thank you.
>
> - Zelalem S.
>
>
>
>
>
>
> ------------------------------
> check out the rest of the Windows Live™. More than mail–Windows Live™ goes
> way beyond your inbox. More than messages<http://www.microsoft.com/windows/windowslive/>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Regards,

Sudarshan Bisht
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090616/4f039e2e/attachment.htm>


More information about the gstreamer-devel mailing list