About hardware resources liberation notification (e.g. alsasrc)

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

About hardware resources liberation notification (e.g. alsasrc)

Florent THIERY-2
Hi

When you stop a pipeline containing hardware-related elements (e.g.
alsasrc) by setting the state to NULL for instance, you need to wait a
few seconds for the hardware device to be available again. Is there a
state/notification which would let me know exactly when the device has
been liberated ? I understand the other way (waiting for the elements
to settle before processing) is implemented (through PREROLL), but
what about resources liberation ? Should there be some post EOS signal
or intermediary state ? I can also use probing (starting some fakesink
pipeline to see if i am getting errors), but this feels really
unelegant to me.

Thanks for any comments

Florent

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: About hardware resources liberation notification (e.g. alsasrc)

michael smith-6-3
On Sat, Nov 7, 2009 at 4:58 AM, Florent <[hidden email]> wrote:

> Hi
>
> When you stop a pipeline containing hardware-related elements (e.g.
> alsasrc) by setting the state to NULL for instance, you need to wait a
> few seconds for the hardware device to be available again. Is there a
> state/notification which would let me know exactly when the device has
> been liberated ? I understand the other way (waiting for the elements
> to settle before processing) is implemented (through PREROLL), but
> what about resources liberation ? Should there be some post EOS signal
> or intermediary state ? I can also use probing (starting some fakesink
> pipeline to see if i am getting errors), but this feels really
> unelegant to me.

Once you set a pipeline to NULL, it no longer uses any resources - if
you have to wait for several seconds _after_ that, then that sounds
like a bug somewhere - and it's unlikely to be in the gstreamer
elements.

So: no, there's no notification of this, because there shouldn't ever
be any reason to wait beyond setting it to NULL.

Mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: About hardware resources liberation notification (e.g. alsasrc)

Florent THIERY-2
Hello,

> So: no, there's no notification of this, because there shouldn't ever
> be any reason to wait beyond setting it to NULL.

Then is there a way to know when the NULL state setting has been "applied" ?

Thanks

Florent

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: About hardware resources liberation notification (e.g. alsasrc)

michael smith-6-3
On Sat, Nov 7, 2009 at 12:07 PM, Florent <[hidden email]> wrote:
> Hello,
>
>> So: no, there's no notification of this, because there shouldn't ever
>> be any reason to wait beyond setting it to NULL.
>
> Then is there a way to know when the NULL state setting has been "applied" ?

Yes: when your call to gst_element_set_state() returns. Of course, you
can check that that function call succeeds - but a downwards state
change should never fail (nor should they be asynchronous).

Mike

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel