BugFix: not using GST g_main_context to avoid GTK conflict

This commit is contained in:
brunoherbelin
2021-03-27 19:21:18 +01:00
parent 3a0f96c1ec
commit e8b5dc0649
5 changed files with 9 additions and 5 deletions

View File

@@ -111,6 +111,7 @@ std::string DialogToolkit::saveSessionFileDialog(const std::string &path)
// done // done
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
wait_for_event();
#endif #endif
std::string extension = filename.substr(filename.find_last_of(".") + 1); std::string extension = filename.substr(filename.find_last_of(".") + 1);
@@ -170,6 +171,7 @@ std::string DialogToolkit::openSessionFileDialog(const std::string &path)
// done // done
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
wait_for_event();
#endif #endif
return filename; return filename;
@@ -230,6 +232,7 @@ std::string DialogToolkit::ImportFileDialog(const std::string &path)
// done // done
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
wait_for_event();
#endif #endif
return filename; return filename;
@@ -280,6 +283,7 @@ std::string DialogToolkit::FolderDialog(const std::string &path)
// done // done
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);
wait_for_event();
#endif #endif
return foldername; return foldername;
@@ -312,6 +316,7 @@ void DialogToolkit::ErrorDialog(const char* message)
// done // done
gtk_widget_destroy( dialog ); gtk_widget_destroy( dialog );
wait_for_event();
#endif #endif
} }

View File

@@ -21,8 +21,6 @@ using namespace std;
#define MEDIA_PLAYER_DEBUG #define MEDIA_PLAYER_DEBUG
#endif #endif
#define USE_GST_APPSINK_CALLBACKS
std::list<MediaPlayer*> MediaPlayer::registered_; std::list<MediaPlayer*> MediaPlayer::registered_;
MediaPlayer::MediaPlayer() MediaPlayer::MediaPlayer()

View File

@@ -272,8 +272,10 @@ void Rendering::draw()
main_.toggleFullscreen_(); main_.toggleFullscreen_();
output_.toggleFullscreen_(); output_.toggleFullscreen_();
#ifndef USE_GST_APPSINK_CALLBACKS
// no g_main_loop_run(loop) : update global GMainContext // no g_main_loop_run(loop) : update global GMainContext
g_main_context_iteration(NULL, FALSE); g_main_context_iteration(NULL, FALSE);
#endif
// software framerate limiter 60FPS if not v-sync // software framerate limiter 60FPS if not v-sync
if ( Settings::application.render.vsync < 1 ) { if ( Settings::application.render.vsync < 1 ) {

View File

@@ -20,8 +20,6 @@ using namespace std;
#define STREAM_DEBUG #define STREAM_DEBUG
#endif #endif
#define USE_GST_APPSINK_CALLBACKS_
Stream::Stream() Stream::Stream()
{ {
@@ -137,7 +135,7 @@ void Stream::execute_open()
gst_app_sink_set_max_buffers( GST_APP_SINK(sink), 30); gst_app_sink_set_max_buffers( GST_APP_SINK(sink), 30);
gst_app_sink_set_drop (GST_APP_SINK(sink), true); gst_app_sink_set_drop (GST_APP_SINK(sink), true);
#ifdef USE_GST_APPSINK_CALLBACKS_ #ifdef USE_GST_APPSINK_CALLBACKS
// set the callbacks // set the callbacks
GstAppSinkCallbacks callbacks; GstAppSinkCallbacks callbacks;
if (single_frame_) { if (single_frame_) {

View File

@@ -98,5 +98,6 @@
#define COLOR_SLIDER_CIRCLE 0.11f, 0.11f, 0.11f #define COLOR_SLIDER_CIRCLE 0.11f, 0.11f, 0.11f
#define COLOR_STASH_CIRCLE 0.06f, 0.06f, 0.06f #define COLOR_STASH_CIRCLE 0.06f, 0.06f, 0.06f
#define USE_GST_APPSINK_CALLBACKS
#endif // VMIX_DEFINES_H #endif // VMIX_DEFINES_H