Commit 4aebf1d3 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(src/components/camera/Camera): coding style

parent 906ec740
...@@ -51,16 +51,16 @@ CameraRenderer::CameraRenderer () { ...@@ -51,16 +51,16 @@ CameraRenderer::CameraRenderer () {
CameraRenderer::~CameraRenderer () { CameraRenderer::~CameraRenderer () {
qInfo() << QStringLiteral("Delete context info:") << mContextInfo; qInfo() << QStringLiteral("Delete context info:") << mContextInfo;
CoreManager *core = CoreManager::getInstance(); CoreManager *coreManager = CoreManager::getInstance();
core->lockVideoRender(); coreManager->lockVideoRender();
if (mIsPreview) if (mIsPreview)
CoreManager::getInstance()->getCore()->setNativePreviewWindowId(nullptr); coreManager->getCore()->setNativePreviewWindowId(nullptr);
else if (mLinphoneCall) else if (mLinphoneCall)
mLinphoneCall->setNativeVideoWindowId(nullptr); mLinphoneCall->setNativeVideoWindowId(nullptr);
core->unlockVideoRender(); coreManager->unlockVideoRender();
delete mContextInfo; delete mContextInfo;
} }
...@@ -71,10 +71,10 @@ QOpenGLFramebufferObject *CameraRenderer::createFramebufferObject (const QSize & ...@@ -71,10 +71,10 @@ QOpenGLFramebufferObject *CameraRenderer::createFramebufferObject (const QSize &
format.setInternalTextureFormat(GL_RGBA8); format.setInternalTextureFormat(GL_RGBA8);
format.setSamples(4); format.setSamples(4);
CoreManager *core = CoreManager::getInstance(); CoreManager *coreManager = CoreManager::getInstance();
// It's not the same thread as render. // It's not the same thread as render.
core->lockVideoRender(); coreManager->lockVideoRender();
mContextInfo->width = size.width(); mContextInfo->width = size.width();
mContextInfo->height = size.height(); mContextInfo->height = size.height();
...@@ -83,7 +83,7 @@ QOpenGLFramebufferObject *CameraRenderer::createFramebufferObject (const QSize & ...@@ -83,7 +83,7 @@ QOpenGLFramebufferObject *CameraRenderer::createFramebufferObject (const QSize &
updateWindowId(); updateWindowId();
core->unlockVideoRender(); coreManager->unlockVideoRender();
return new QOpenGLFramebufferObject(size, format); return new QOpenGLFramebufferObject(size, format);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment