Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
419aa73b
Commit
419aa73b
authored
Apr 03, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(src/components/camera/Camera): clean video context
parent
74311876
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
Camera.cpp
linphone-desktop/src/components/camera/Camera.cpp
+19
-4
No files found.
linphone-desktop/src/components/camera/Camera.cpp
View file @
419aa73b
...
@@ -49,6 +49,19 @@ CameraRenderer::CameraRenderer () {
...
@@ -49,6 +49,19 @@ CameraRenderer::CameraRenderer () {
}
}
CameraRenderer
::~
CameraRenderer
()
{
CameraRenderer
::~
CameraRenderer
()
{
qInfo
()
<<
QStringLiteral
(
"Delete context info:"
)
<<
m_context_info
;
CoreManager
*
core
=
CoreManager
::
getInstance
();
core
->
lockVideoRender
();
memset
(
m_context_info
,
0
,
sizeof
*
m_context_info
);
m_update_context_info
=
true
;
updateWindowId
();
core
->
unlockVideoRender
();
delete
m_context_info
;
delete
m_context_info
;
}
}
...
@@ -60,14 +73,16 @@ QOpenGLFramebufferObject *CameraRenderer::createFramebufferObject (const QSize &
...
@@ -60,14 +73,16 @@ QOpenGLFramebufferObject *CameraRenderer::createFramebufferObject (const QSize &
CoreManager
*
core
=
CoreManager
::
getInstance
();
CoreManager
*
core
=
CoreManager
::
getInstance
();
// It's not the same thread as render.
core
->
lockVideoRender
();
m_context_info
->
width
=
size
.
width
();
m_context_info
->
width
=
size
.
width
();
m_context_info
->
height
=
size
.
height
();
m_context_info
->
height
=
size
.
height
();
m_context_info
->
functions
=
MSFunctions
::
getInstance
()
->
getFunctions
();
m_context_info
->
functions
=
MSFunctions
::
getInstance
()
->
getFunctions
();
m_update_context_info
=
true
;
m_update_context_info
=
true
;
// It's not the same thread as render.
core
->
lockVideoRender
();
updateWindowId
();
updateWindowId
();
core
->
unlockVideoRender
();
core
->
unlockVideoRender
();
return
new
QOpenGLFramebufferObject
(
size
,
format
);
return
new
QOpenGLFramebufferObject
(
size
,
format
);
...
@@ -120,8 +135,8 @@ void CameraRenderer::updateWindowId () {
...
@@ -120,8 +135,8 @@ void CameraRenderer::updateWindowId () {
m_update_context_info
=
false
;
m_update_context_info
=
false
;
qInfo
()
<<
"Thread"
<<
QThread
::
currentThread
()
<<
QStringLiteral
(
"Set context info (width: %1, height: %2, is_preview: %3)
.
"
)
qInfo
()
<<
"Thread"
<<
QThread
::
currentThread
()
<<
QStringLiteral
(
"Set context info (width: %1, height: %2, is_preview: %3)
:
"
)
.
arg
(
m_context_info
->
width
).
arg
(
m_context_info
->
height
).
arg
(
m_is_preview
);
.
arg
(
m_context_info
->
width
).
arg
(
m_context_info
->
height
).
arg
(
m_is_preview
)
<<
m_context_info
;
if
(
m_is_preview
)
if
(
m_is_preview
)
CoreManager
::
getInstance
()
->
getCore
()
->
setNativePreviewWindowId
(
m_context_info
);
CoreManager
::
getInstance
()
->
getCore
()
->
setNativePreviewWindowId
(
m_context_info
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment