Several questions on osxvideosink

Alexey Chernov 4ernov at gmail.com
Sat Jul 6 05:03:34 PDT 2013


Hello,

some time ago I fixed some minor problems in osxvideosink, but there're some 
more remaining ones which I'm working at now. There're also some questions on 
code and structure of osxvideosink which I hope someone could answer.

1. There's a piece of code under RUN_NS_APP_THREAD definition. What's the exact 
purpose of that? If I got it right, it tries to use NS application main loop 
instead of Glib main loop to make the element work even if Glib main loop is 
not running. But is there any point to have that? I believe, all the rest of 
GStreamer elements and core wouldn't work without Glib main loop rotating. 
Please, correct me if I'm wrong.

2. When ontaining a window to display video 
(gst_osx_video_sink_osxwindow_create() function in osxvideosink.m) it first 
posts 'have-ns-view' message in hope that someone would receive it and take 
inner GLView (actually responsible for displaying video) to subviews. 'Embed' 
property also serves this purpose. Is it really needed functionality given 
that we have GstVideoOverlay interface with methods exactly for this case? The 
problem is that it obfuscates the code of 
gst_osx_video_sink_osxwindow_create() considerably as we have to wait for 
answer both on 'have-ns-view' message and 
gst_video_overlay_prepare_window_handle() there.

3. Would anyone mind if we split osxvideosink.h(.m) to two files with one have 
C code of helper functions and another one have Objective C code of 
GstOSXVideoSinkObject and some other objects? I think, it could make the whole 
code simpler.

Best regards,
Alexey Chernov


More information about the gstreamer-devel mailing list