g_idle_add() thread removal when state changed from PLAYING to NULL.
Nicolas Dufresne
nicolas at ndufresne.ca
Fri Jul 6 15:33:11 UTC 2018
Le vendredi 06 juillet 2018 à 06:54 -0700, Sujith reddy a écrit :
> Hi All,
>
> The problem is:
>
> we have appsrc element as input to the pipeline.
>
> Now we are feeding data to the pipeline element by adding
> g_idle_add().
>
> Suddenly i wanted to stop the pipeline ,i made it has GST_STATE_NULL
> ,
> Now my Question is wheteher g_idle_add() thread is in middle of the
> push
> data then what happens to this thread when we changed from
> GST_STATE_PLAYING
> to GST_STATE_NULL state.
You need to ensure to keep a pipeline ref as long as you have avec
callback that may need access. Though, having a concurrent callback
with state change should work. gst_app_src_push_buffer() should return
GST_FLOW_FLUSHING.
>
>
> The g_idle_add() is removed or we want to remove the thread
> forcefully?
Any reason why not using a g_idle_add() callback to stop the pipeline
in the first place ? It would remove the concurrency. You could also
stop your main loop, and then stop the pipeline when main_loop_run()
returns.
>
> can anyone suggest on this.
>
>
> Thanks
> Sujith
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180706/dbc3f243/attachment.sig>
More information about the gstreamer-devel
mailing list