Reusing osxvideosink

Ilya Kulakov kulakov.ilya at gmail.com
Wed Jun 26 01:36:10 PDT 2013


> So this new thread with the run loop is only
> started when the sink needs to create its own window and the application
> didn't start any run loop.
> This hack we made to make osxvideosink work with gst-launch, but in a
> normal scenario, the application should have started a run loop and this
> internal thread will not be created.
This does not explain why new thread is created for each instance. It to should be created once for the whole class and reused.
Used hack does not support scenario with multiple osxvideosink instances which is pretty possible even with get-launch.

Also the hack itself is very very unstable. One should not mangle with mainThread like this and just let the main thread to be what AppKit decides.
Since, as you pointed, the only real use case when osxvideosink has to create new thread is with gst-launch, wouldn't it be simpler to update it in the same manner
as other cross platform UI frameworks work (like Qt or wxWidgets)?

> Could to please open a new bug and attach a test case?

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


More information about the gstreamer-devel mailing list