문제

I'm trying to write a GTK+ application in C that uses gstreamer.

GTK+ needs gtk_main() to execute.

gstreamer needs g_main_loop_run() to execute.

Both of them stall the execution flow.

What can I do that gtk_main() will also hold the GMainLoop that I created for gstreamer?

Thanks

도움이 되었습니까?

해결책

Do not create a GMainLoop, gtk_main() internally creates one already which should suffice for any glib based library that uses events/signals.

See this question which quotes the gtk_main() source

다른 팁

Likewise gtk can use the GMainLoop created by g_main_loop_new() as long as the default context is used (NULL).

Give a look at that tutorial for a simple C example of GTK and GStreamer in C.

Guitar Tuner in C

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top