[gst-devel] Problem with adding cap to pipeline
zelalems at hotmail.com
Tue Jun 16 12:11:53 CEST 2009
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:
Starting program: /home/zelalem/videorecorder
[Thread debugging using libthread_db enabled]
[New Thread 0xb7b2e6b0 (LWP 28619)]
[New Thread 0xb78aeb90 (LWP 28623)]
[New Thread 0xb70adb90 (LWP 28624)]
[New Thread 0xb66ffb90 (LWP 28625)]
Program exited normally.
The following is how I created the pipeline and tried to link the elements:
gst_bin_add_many (GST_BIN (pipeline), udpsource, queue1, h263depay, avimuxer, queue2, filedes, NULL);
gst_element_link_many (udpsource, queue1, h263depay, NULL);
gst_element_link_many (avimuxer, queue2, filedes, NULL);
gboolean link_ok = gst_element_link_filtered (h263depay, avimuxer, caps2);
- Zelalem S.
Date: Tue, 16 Jun 2009 14:15:08 +0530
From: bisht.sudarshan at gmail.com
To: gstreamer-devel at lists.sourceforge.net
Subject: Re: [gst-devel] Problem with adding cap to pipeline
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.
- Zelalem S.
check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. More than messages
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.
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel