mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
fix(Camera): share opengl context, avoid reset of window id
This commit is contained in:
parent
a3dc41ec55
commit
b21d16a15f
2 changed files with 8 additions and 4 deletions
|
|
@ -50,6 +50,9 @@ AppController::AppController (int &argc, char *argv[]) {
|
|||
|
||||
QGuiApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||
|
||||
// Useful to share camera on Fullscreen (other context).
|
||||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// App creation.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -56,12 +56,13 @@ CameraRenderer::~CameraRenderer () {
|
|||
qInfo() << QStringLiteral("Delete context info:") << mContextInfo;
|
||||
|
||||
CoreManager *coreManager = CoreManager::getInstance();
|
||||
|
||||
coreManager->lockVideoRender();
|
||||
|
||||
if (mIsPreview)
|
||||
coreManager->getCore()->setNativePreviewWindowId(nullptr);
|
||||
else if (mCall)
|
||||
shared_ptr<linphone::Core> core = coreManager->getCore();
|
||||
if (mIsPreview) {
|
||||
if (core->getNativePreviewWindowId() == mContextInfo)
|
||||
core->setNativePreviewWindowId(nullptr);
|
||||
} else if (mCall && mCall->getNativeVideoWindowId() == mContextInfo)
|
||||
mCall->setNativeVideoWindowId(nullptr);
|
||||
|
||||
coreManager->unlockVideoRender();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue