g_main_loop_run() freeze the window

doon don-prog at mail.ru
Thu Dec 17 05:12:34 PST 2015


Thanks for your response! Can you provide a code sample or link which
describe how I can do it right?
Yes, I already saw Gstreamer bindings for C# but they not fully
cross-platform.

Sebastian Dröge-3 wrote
> On Di, 2015-12-15 at 13:47 -0800, doon wrote:
>> I trying to create Gstreamer video player in C#. So I use Pinvoke for
>> import Gstreamer C++ functions. All looking nice but if I add in C++
>> "g_main_loop_run(loop);" my C# application going to freeze, I just
>> can't click any button or move my window. I think there is some
>> problem due to gmaincontext, but I don't know exactly what problem
>> and how I can resolve it. 
> 
> g_main_loop_run() will block until g_main_loop_quit() is called. It's a
> normal event loop.
> 
> If you want to use a GMainLoop, you probably want to run it in a
> different thread to not block your C# application's event loop. You
> don't have to use one though, you can also integrate the GstBus in
> whatever event loop you have in your application already.
> 
> 
> Also, did you see the C# bindings for GStreamer? That way you don't
> have to P/invoke and write C code.
> 
> -- 
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> 
> 
> _______________________________________________
> gstreamer-devel mailing list

> gstreamer-devel at .freedesktop

> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> signature.asc (968 bytes)
> <http://gstreamer-devel.966125.n4.nabble.com/attachment/4674924/0/signature.asc>





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/g-main-loop-run-freeze-the-window-tp4674922p4674944.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list