alsasink pause

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

alsasink pause

Robert Rosengren
Hi,

I noticed that when pausing an audio pipeline ending up in the alsasink, the sink itself does not care about state changes. Should the alsasink actually pause the ALSA device upon a pausing the pipeline? The benefit would be if the ALSA-device have configured long buffers/latency, the audio would be paused instantly instead of playing until buffer is empty.

Looking into the code of gstalsasink, there does not seem to exist any callbacks from gstaudiosink notifying on pause and gstalsasink has not registered for change_state callbacks. Which mechanism would be the appropriate way for gstalsasink to handle pause?

Not all ALSA devices support pause, and this should be retrieved from ALSA layer. In addition, one might want to be able to configure this via property.

Does this sound like a good idea, or is there any pitfalls by actually pausing/resuming ALSA device?

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

Re: alsasink pause

filnet
Hi,

I worked on a similar issue affecting directsoundsink.

Note that the issue title is wrong (should mention directsoundsink and note directsoundsrc).
In that issue I also talk about alsasink.

Related issues:

Regards,
Philippe.






Le Jeudi 12 avril 2018 10h05, Robert Rosengren <[hidden email]> a écrit :


Hi,

I noticed that when pausing an audio pipeline ending up in the alsasink, the sink itself does not care about state changes. Should the alsasink actually pause the ALSA device upon a pausing the pipeline? The benefit would be if the ALSA-device have configured long buffers/latency, the audio would be paused instantly instead of playing until buffer is empty.

Looking into the code of gstalsasink, there does not seem to exist any callbacks from gstaudiosink notifying on pause and gstalsasink has not registered for change_state callbacks. Which mechanism would be the appropriate way for gstalsasink to handle pause?

Not all ALSA devices support pause, and this should be retrieved from ALSA layer. In addition, one might want to be able to configure this via property.

Does this sound like a good idea, or is there any pitfalls by actually pausing/resuming ALSA device?

BR, Robert
_______________________________________________
gstreamer-devel mailing list



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

Re: alsasink pause

Robert Rosengren
Thanks for letting me know. https://bugzilla.gnome.org/show_bug.cgi?id=788361 seems to give the tools needed for alsasink pause implementation. Any input on the patches yet?

On 04/12/2018 10:18 AM, philippe renon wrote:

> Hi,
> I worked on a similar issue affecting directsoundsink.
> See https://bugzilla.gnome.org/show_bug.cgi?id=788362
> Note that the issue title is wrong (should mention directsoundsink and note directsoundsrc).In that issue I also talk about alsasink.
> Related issues:https://bugzilla.gnome.org/show_bug.cgi?id=788361
> https://bugzilla.gnome.org/show_bug.cgi?id=788562
> Regards,Philippe.
>
>
>     Le Jeudi 12 avril 2018 10h05, Robert Rosengren <[hidden email]> a écrit :
>  
>
>  Hi,
>
> I noticed that when pausing an audio pipeline ending up in the alsasink, the sink itself does not care about state changes. Should the alsasink actually pause the ALSA device upon a pausing the pipeline? The benefit would be if the ALSA-device have configured long buffers/latency, the audio would be paused instantly instead of playing until buffer is empty.
>
> Looking into the code of gstalsasink, there does not seem to exist any callbacks from gstaudiosink notifying on pause and gstalsasink has not registered for change_state callbacks. Which mechanism would be the appropriate way for gstalsasink to handle pause?
>
> Not all ALSA devices support pause, and this should be retrieved from ALSA layer. In addition, one might want to be able to configure this via property.
>
> Does this sound like a good idea, or is there any pitfalls by actually pausing/resuming ALSA device?
>
> BR, Robert
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: alsasink pause

filnet
No input as of yet. A GStreamer maintainer would have to look at those patches.


Le Vendredi 13 avril 2018 9h27, Robert Rosengren <[hidden email]> a écrit :


Thanks for letting me know. https://bugzilla.gnome.org/show_bug.cgi?id=788361 seems to give the tools needed for alsasink pause implementation. Any input on the patches yet?

On 04/12/2018 10:18 AM, philippe renon wrote:

> Hi,
> I worked on a similar issue affecting directsoundsink.
> See https://bugzilla.gnome.org/show_bug.cgi?id=788362
> Note that the issue title is wrong (should mention directsoundsink and note directsoundsrc).In that issue I also talk about alsasink.
> Related issues:https://bugzilla.gnome.org/show_bug.cgi?id=788361
> https://bugzilla.gnome.org/show_bug.cgi?id=788562
> Regards,Philippe.
>
>
>    Le Jeudi 12 avril 2018 10h05, Robert Rosengren <[hidden email]> a écrit :

>
>  Hi,
>
> I noticed that when pausing an audio pipeline ending up in the alsasink, the sink itself does not care about state changes. Should the alsasink actually pause the ALSA device upon a pausing the pipeline? The benefit would be if the ALSA-device have configured long buffers/latency, the audio would be paused instantly instead of playing until buffer is empty.
>
> Looking into the code of gstalsasink, there does not seem to exist any callbacks from gstaudiosink notifying on pause and gstalsasink has not registered for change_state callbacks. Which mechanism would be the appropriate way for gstalsasink to handle pause?
>
> Not all ALSA devices support pause, and this should be retrieved from ALSA layer. In addition, one might want to be able to configure this via property.
>
> Does this sound like a good idea, or is there any pitfalls by actually pausing/resuming ALSA device?
>
> BR, Robert
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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



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

Re: alsasink pause

filnet
And update the title of the first issue to mention directsoundsink instead of directsoundsrc

See https://bugzilla.gnome.org/show_bug.cgi?id=788362


Le Samedi 14 avril 2018 14h11, philippe renon <[hidden email]> a écrit :


No input as of yet. A GStreamer maintainer would have to look at those patches.


Le Vendredi 13 avril 2018 9h27, Robert Rosengren <[hidden email]> a écrit :


Thanks for letting me know. https://bugzilla.gnome.org/show_bug.cgi?id=788361 seems to give the tools needed for alsasink pause implementation. Any input on the patches yet?

On 04/12/2018 10:18 AM, philippe renon wrote:

> Hi,
> I worked on a similar issue affecting directsoundsink.
> See https://bugzilla.gnome.org/show_bug.cgi?id=788362
> Note that the issue title is wrong (should mention directsoundsink and note directsoundsrc).In that issue I also talk about alsasink.
> Related issues:https://bugzilla.gnome.org/show_bug.cgi?id=788361
> https://bugzilla.gnome.org/show_bug.cgi?id=788562
> Regards,Philippe.
>
>
>    Le Jeudi 12 avril 2018 10h05, Robert Rosengren <[hidden email]> a écrit :

>
>  Hi,
>
> I noticed that when pausing an audio pipeline ending up in the alsasink, the sink itself does not care about state changes. Should the alsasink actually pause the ALSA device upon a pausing the pipeline? The benefit would be if the ALSA-device have configured long buffers/latency, the audio would be paused instantly instead of playing until buffer is empty.
>
> Looking into the code of gstalsasink, there does not seem to exist any callbacks from gstaudiosink notifying on pause and gstalsasink has not registered for change_state callbacks. Which mechanism would be the appropriate way for gstalsasink to handle pause?
>
> Not all ALSA devices support pause, and this should be retrieved from ALSA layer. In addition, one might want to be able to configure this via property.
>
> Does this sound like a good idea, or is there any pitfalls by actually pausing/resuming ALSA device?
>
> BR, Robert
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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





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