Deadlock when calling gst_pad_pause_task going from PLAYING to PAUSE state

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

Deadlock when calling gst_pad_pause_task going from PLAYING to PAUSE state

goussepi
Hi All,

I am writing my own plugin for a live audio/video source hardware, it has 1 ALWAYS video pad and 1 SOMETIMES audio pad.

In my test application I connect to an xvimagesink and an alsasink.

When i close the window i exit the main loop and set the pipeline state to NULL.

In my plugin when going from PLAYING to PAUSE i call gst_pad_pause_task on each pad.

The gst_pad_pause_task call for the audio pad is locked in GST_PAD_STREAM_LOCK

The task for the audio pad is locked in gst_base_sink_wait_preroll call within the gst_pad_push call

Shouldnt gst_pad_pause_task be called when changing PLAYING to PAUSE ?

Should i push/send a special event on the pad before calling gst_pad_xxx_task function ?

Is there principle to follow to ensure no deadlocks when calling a gst_pad_xxx_task function ?

Thanks for your help,

Pierre


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

Re: Deadlock when calling gst_pad_pause_task going from PLAYING to PAUSE state

Wim Taymans
On 06/16/2011 05:38 PM, pierre gousseau wrote:

> Hi All,
>
> I am writing my own plugin for a live audio/video source hardware, it
> has 1 ALWAYS video pad and 1 SOMETIMES audio pad.
>
> In my test application I connect to an xvimagesink and an alsasink.
>
> When i close the window i exit the main loop and set the pipeline state
> to NULL.
>
> In my plugin when going from PLAYING to PAUSE i call gst_pad_pause_task
> on each pad.
>
> The gst_pad_pause_task call for the audio pad is locked in
> GST_PAD_STREAM_LOCK
>
> The task for the audio pad is locked in gst_base_sink_wait_preroll call
> within the gst_pad_push call
>
> Shouldnt gst_pad_pause_task be called when changing PLAYING to PAUSE ?

No, it should not be called, it will deadlock exactly as you describe.

Wim

>
> Should i push/send a special event on the pad before calling
> gst_pad_xxx_task function ?
>
> Is there principle to follow to ensure no deadlocks when calling a
> gst_pad_xxx_task function ?
>
> Thanks for your help,
>
> Pierre
>
>
>
> _______________________________________________
> 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