How to destruct a pipeline??

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to destruct a pipeline??

akaChella
Hi all,

I have 2 pipelines. One is to play the video file locally and the other is to play the video and stream the audio.

I am constructing one of the pipeline at a time and is working fine.

Now i want to destroy the pipeline whatever has been constructed previously (say pipeline 1) and want to create the other pipeline (pipeline 2) during run time.

I have used gst_deinit() to destroy the pipeline.

and then initialised the gstreamer using gst_init() and later constructed the other pipeline.

But everytime it says, it is unable to construct the source element. i.e, gst_element_factory_make () returns -1.

Any idea on this issue???
Reply | Threaded
Open this post in threaded view
|

Re: How to destruct a pipeline??

Tiago Katcipis
Hi,

On Thu, Oct 20, 2011 at 7:41 AM, akaChella <[hidden email]> wrote:
Hi all,

I have 2 pipelines. One is to play the video file locally and the other is
to play the video and stream the audio.

I am constructing one of the pipeline at a time and is working fine.

Now i want to destroy the pipeline whatever has been constructed previously
(say pipeline 1) and want to create the other pipeline (pipeline 2) during
run time.

I have used gst_deinit() to destroy the pipeline.

You should not call gst_deinit to destroy the pipeline, to destroy the pipeline call:

gst_element_set_state (pipeline, GST_STATE_NULL);

and then

g_object_unref (pipeline);
 

and then initialised the gstreamer using gst_init() and later constructed
the other pipeline.

No need to call gst_init more than once.
 

But everytime it says, it is unable to construct the source element. i.e,
gst_element_factory_make () returns -1.

Any idea on this issue??? 

Best regards,
Katcipis
 

--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-destruct-a-pipeline-tp3921391p3921391.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to destruct a pipeline??

Xabier Rodríguez Calvar
O Xov, 20-10-2011 ás 23:02 -0200, Tiago Katcipis escribiu:

>        
>         I have used gst_deinit() to destroy the pipeline.
>
> You should not call gst_deinit to destroy the pipeline, to destroy the
> pipeline call:
>
> gst_element_set_state (pipeline, GST_STATE_NULL);
>
> and then
>
> g_object_unref (pipeline);
>  
>        
>         and then initialised the gstreamer using gst_init() and later
>         constructed
>         the other pipeline.
>
> No need to call gst_init more than once.
And actually, you shouldn't call gst_deinit unless you are are not going
to use gstreamer anymore during that program execution.

Br.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to destruct a pipeline??

akaChella
This post was updated on .
In reply to this post by Tiago Katcipis
Thank u so much Katcipis and Xabier.

It works!!