Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/demo/main.cpp b/demo/main.cpp
- index 90e5e3c..02a4004 100644
- --- a/demo/main.cpp
- +++ b/demo/main.cpp
- @@ -613,6 +613,8 @@ void MainWin::setSendConfig(const QString &s)
- ui.le_sendConfig->setEnabled(true);
- ui.le_sendConfig->setText(s);
- ui.le_sendConfig->setCursorPosition(0);
- + if(ui.le_receiveConfig->text().isEmpty())
- + ui.le_receiveConfig->setText(s);
- } else {
- ui.lb_sendConfig->setEnabled(false);
- ui.le_sendConfig->setEnabled(false);
- diff --git a/gstprovider/devices.cpp b/gstprovider/devices.cpp
- index 1d542a5..e5519a4 100644
- --- a/gstprovider/devices.cpp
- +++ b/gstprovider/devices.cpp
- @@ -294,9 +294,11 @@ void DeviceMonitor::onDeviceRemoved(const GstDevice &dev)
- DeviceMonitor::DeviceMonitor(GstMainLoop *mainLoop) : d(new Private(this))
- {
- qRegisterMetaType<GstDevice>("GstDevice");
- - Q_ASSERT(mainLoop->mainContext() == g_main_context_default());
- + //Q_ASSERT(mainLoop->mainContext() == g_main_context_default());
- - // auto context = mainLoop->mainContext();
- + auto context = mainLoop->mainContext();
- + if(context != g_main_context_default())
- + g_main_context_push_thread_default(context);
- d->_platform = new PlatformDeviceMonitor;
- d->_monitor = gst_device_monitor_new();
- @@ -324,6 +326,7 @@ DeviceMonitor::DeviceMonitor(GstMainLoop *mainLoop) : d(new Private(this))
- if (!gst_device_monitor_start(d->_monitor)) {
- qWarning("failed to start device monitor");
- }
- + g_main_context_pop_thread_default(context);
- }
- DeviceMonitor::~DeviceMonitor()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement