Trying to reset the pipeline whithout closing it

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

Trying to reset the pipeline whithout closing it

Sandeep Kumar
Hi,

I have a pipeline as below,

  neonhttpsrc | flutsdemux | mpeg2decoder | xvimagesink

Here, i am trying to reset the location property of neonhttpsrc at run time , without closing the pipeline. Can anyone send the steps for doing it.

Steps  i am following are like this,

gst_element_set_state(pipeline, GST_STATE_NULL);
g_object_set(G_OBJECT (source), "location", new_url, NULL);
gst_element_set_state(pipeline, GST_STATE_PLAYING);

The stream plays on the screen but after a delay(4 seconds first time). And the delay seems to keep increasing 2 folds (doubles after each new request). I dont want to delete the entire pipeline here. Anyone know how to resolve this issue?

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

Re: Trying to reset the pipeline whithout closing it

ak.ashwini
Hi,

You can put the pipeline to READY state and then set the location and put the state back to PLAYING

-Ashwini

On Thu, Sep 15, 2011 at 10:34 AM, Sandeep Kumar <[hidden email]> wrote:
Hi,

I have a pipeline as below,

 neonhttpsrc | flutsdemux | mpeg2decoder | xvimagesink

Here, i am trying to reset the location property of neonhttpsrc at run time , without closing the pipeline. Can anyone send the steps for doing it.

Steps  i am following are like this,

gst_element_set_state(pipeline, GST_STATE_NULL);
g_object_set(G_OBJECT (source), "location", new_url, NULL);
gst_element_set_state(pipeline, GST_STATE_PLAYING);

The stream plays on the screen but after a delay(4 seconds first time). And the delay seems to keep increasing 2 folds (doubles after each new request). I dont want to delete the entire pipeline here. Anyone know how to resolve this issue?

Thanks & Regards,
Sandeep.
_______________________________________________
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: Trying to reset the pipeline whithout closing it

Sandeep Kumar
Hi,

I tried it, but didnt work. Gave the "Error: Internal data flow error" error and pipeline is closed after that. I think, we have to follow the complete cycle of PAUSED to READY to NULL before playing it. I tried few other combinations as well, without much luck. Is there a standard procedure to do this task?

Sandeep

----- Original Message -----
From: "Ashwini Sharma" <[hidden email]>
To: "Discussion of the development of and with GStreamer" <[hidden email]>
Sent: Thursday, September 15, 2011 11:40:23 AM
Subject: Re: Trying to reset the pipeline whithout closing it


Hi,


You can put the pipeline to READY state and then set the location and put the state back to PLAYING


-Ashwini


On Thu, Sep 15, 2011 at 10:34 AM, Sandeep Kumar < [hidden email] > wrote:


Hi,

I have a pipeline as below,

neonhttpsrc | flutsdemux | mpeg2decoder | xvimagesink

Here, i am trying to reset the location property of neonhttpsrc at run time , without closing the pipeline. Can anyone send the steps for doing it.

Steps i am following are like this,

gst_element_set_state(pipeline, GST_STATE_NULL);
g_object_set(G_OBJECT (source), "location", new_url, NULL);
gst_element_set_state(pipeline, GST_STATE_PLAYING);

The stream plays on the screen but after a delay(4 seconds first time). And the delay seems to keep increasing 2 folds (doubles after each new request). I dont want to delete the entire pipeline here. Anyone know how to resolve this issue?

Thanks & Regards,
Sandeep.
_______________________________________________
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
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Trying to reset the pipeline whithout closing it

ak.ashwini
When u set to READY, it goes thru the full cycle of PLAY-> PAUSED->READY.

It should work, as i have tested it on my own

On Thu, Sep 15, 2011 at 12:11 PM, Sandeep Kumar <[hidden email]> wrote:
Hi,

I tried it, but didnt work. Gave the "Error: Internal data flow error" error and pipeline is closed after that. I think, we have to follow the complete cycle of PAUSED to READY to NULL before playing it. I tried few other combinations as well, without much luck. Is there a standard procedure to do this task?

Sandeep

----- Original Message -----
From: "Ashwini Sharma" <[hidden email]>
To: "Discussion of the development of and with GStreamer" <[hidden email]>
Sent: Thursday, September 15, 2011 11:40:23 AM
Subject: Re: Trying to reset the pipeline whithout closing it


Hi,


You can put the pipeline to READY state and then set the location and put the state back to PLAYING


-Ashwini


On Thu, Sep 15, 2011 at 10:34 AM, Sandeep Kumar < [hidden email] > wrote:


Hi,

I have a pipeline as below,

neonhttpsrc | flutsdemux | mpeg2decoder | xvimagesink

Here, i am trying to reset the location property of neonhttpsrc at run time , without closing the pipeline. Can anyone send the steps for doing it.

Steps i am following are like this,

gst_element_set_state(pipeline, GST_STATE_NULL);
g_object_set(G_OBJECT (source), "location", new_url, NULL);
gst_element_set_state(pipeline, GST_STATE_PLAYING);

The stream plays on the screen but after a delay(4 seconds first time). And the delay seems to keep increasing 2 folds (doubles after each new request). I dont want to delete the entire pipeline here. Anyone know how to resolve this issue?

Thanks & Regards,
Sandeep.
_______________________________________________
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
_______________________________________________
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: Trying to reset the pipeline whithout closing it

Stefan Sauer
In reply to this post by Sandeep Kumar
On 09/15/11 07:04, Sandeep Kumar wrote:

> Hi,
>
> I have a pipeline as below,
>
>   neonhttpsrc | flutsdemux | mpeg2decoder | xvimagesink
>
> Here, i am trying to reset the location property of neonhttpsrc at run time , without closing the pipeline. Can anyone send the steps for doing it.
>
> Steps  i am following are like this,
>
> gst_element_set_state(pipeline, GST_STATE_NULL);
GST_STATE_PAUSED is sufficient.

> g_object_set(G_OBJECT (source), "location", new_url, NULL);
> gst_element_set_state(pipeline, GST_STATE_PLAYING);
>
> The stream plays on the screen but after a delay(4 seconds first time). And the delay seems to keep increasing 2 folds (doubles after each new request). I dont want to delete the entire pipeline here. Anyone know how to resolve this issue?
There will be some delay for buffering from the net.

Stefan

> Thanks & Regards,
> Sandeep.
> _______________________________________________
> 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: Trying to reset the pipeline whithout closing it

Stefan Sauer
In reply to this post by Sandeep Kumar
On 09/15/11 08:41, Sandeep Kumar wrote:
> Hi,
>
> I tried it, but didnt work. Gave the "Error: Internal data flow error" error and pipeline is closed after that.
File a bug please. Also consider trying e.g. souphttpsrc.

Stefan

> I think, we have to follow the complete cycle of PAUSED to READY to NULL before playing it. I tried few other combinations as well, without much luck. Is there a standard procedure to do this task?
> Sandeep
>
> ----- Original Message -----
> From: "Ashwini Sharma" <[hidden email]>
> To: "Discussion of the development of and with GStreamer" <[hidden email]>
> Sent: Thursday, September 15, 2011 11:40:23 AM
> Subject: Re: Trying to reset the pipeline whithout closing it
>
>
> Hi,
>
>
> You can put the pipeline to READY state and then set the location and put the state back to PLAYING
>
>
> -Ashwini
>
>
> On Thu, Sep 15, 2011 at 10:34 AM, Sandeep Kumar < [hidden email] > wrote:
>
>
> Hi,
>
> I have a pipeline as below,
>
> neonhttpsrc | flutsdemux | mpeg2decoder | xvimagesink
>
> Here, i am trying to reset the location property of neonhttpsrc at run time , without closing the pipeline. Can anyone send the steps for doing it.
>
> Steps i am following are like this,
>
> gst_element_set_state(pipeline, GST_STATE_NULL);
> g_object_set(G_OBJECT (source), "location", new_url, NULL);
> gst_element_set_state(pipeline, GST_STATE_PLAYING);
>
> The stream plays on the screen but after a delay(4 seconds first time). And the delay seems to keep increasing 2 folds (doubles after each new request). I dont want to delete the entire pipeline here. Anyone know how to resolve this issue?
>
> Thanks & Regards,
> Sandeep.
> _______________________________________________
> 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
> _______________________________________________
> 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: Trying to reset the pipeline whithout closing it

Steve
Hi guys,

The post is quite old but I have the same problem here, with a different pipeline (audio one with filesrc / wavdec / audioconvert / private plugin / fakesink) runned from a python program.
I can't tell exactly what is the problem for now, but what I can say is that the time is not really doubled, as mentionned above.
Here, the pipeline waits for the previous "processed" time as if the buffers were dropped until they are correct regarding the actual clock.

For example,

start / wait for 2 s / stop : the last buffer timestamp is 0:00:02
start / NO DATA IN CHAIN FUNCTION for 2s, then it starts / wait for 3 s / stop : the last buffer timestamp is 0:00:05
start / NO DATA IN CHAIN FUNCTION for 5s, then it starts / wait for 2 s / stop : the last buffer timestamp is 0:00:07
...

I guess I need to reset the clock somewhere, or maybe to implement something in my plugin to forward a missing event, but no clue for now.
I'll tell you if I find something, but if you have already experienced this issue and you can give me a direction, you are welcome :-)
Regards,

Steve

-----
Search tags
gstreamer null ready states longer and longer
gstreamer pipeline start latency
gstreamer stop start longer and longer
gstreamer doesn't start immediately

Reply | Threaded
Open this post in threaded view
|

Re: Trying to reset the pipeline whithout closing it

Steve
Hi,

OK, the problem was located in my plugin since I wrongly set the timestamp after a stop/start cycle.
If you have this issue, you may search for GST_BUFFER_TIMESTAMP(GstBuffer * buf) calls and print them to troubleshoot:
g_printerr("timestamp %" GST_TIME_FORMAT "\n", GST_TIME_ARGS(GST_BUFFER_TIMESTAMP (buf)));

Regards,

Steve