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
906ec740
Commit
906ec740
authored
Apr 20, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Settings/SettingsVideo): hide preview when at least on call exists
parent
c6cae422
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
CameraPreview.cpp
linphone-desktop/src/components/camera/CameraPreview.cpp
+8
-8
SettingsVideo.js
linphone-desktop/ui/views/App/Settings/SettingsVideo.js
+14
-0
SettingsVideo.qml
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
+11
-0
No files found.
linphone-desktop/src/components/camera/CameraPreview.cpp
View file @
906ec740
...
...
@@ -51,11 +51,11 @@ CameraPreviewRenderer::CameraPreviewRenderer () {
CameraPreviewRenderer
::~
CameraPreviewRenderer
()
{
qInfo
()
<<
QStringLiteral
(
"Delete context info:"
)
<<
mContextInfo
;
CoreManager
*
core
=
CoreManager
::
getInstance
();
CoreManager
*
core
Manager
=
CoreManager
::
getInstance
();
core
->
lockVideoRender
();
CoreManager
::
getInstance
()
->
getCore
()
->
setNativePreviewWindowId
(
nullptr
);
core
->
unlockVideoRender
();
core
Manager
->
lockVideoRender
();
coreManager
->
getCore
()
->
setNativePreviewWindowId
(
nullptr
);
core
Manager
->
unlockVideoRender
();
delete
mContextInfo
;
}
...
...
@@ -66,10 +66,10 @@ QOpenGLFramebufferObject *CameraPreviewRenderer::createFramebufferObject (const
format
.
setInternalTextureFormat
(
GL_RGBA8
);
format
.
setSamples
(
4
);
CoreManager
*
core
=
CoreManager
::
getInstance
();
CoreManager
*
core
Manager
=
CoreManager
::
getInstance
();
// It's not the same thread as render.
core
->
lockVideoRender
();
core
Manager
->
lockVideoRender
();
mContextInfo
->
width
=
size
.
width
();
mContextInfo
->
height
=
size
.
height
();
...
...
@@ -78,7 +78,7 @@ QOpenGLFramebufferObject *CameraPreviewRenderer::createFramebufferObject (const
updateWindowId
();
core
->
unlockVideoRender
();
core
Manager
->
unlockVideoRender
();
return
new
QOpenGLFramebufferObject
(
size
,
format
);
}
...
...
@@ -88,7 +88,7 @@ void CameraPreviewRenderer::render () {
{
QOpenGLFunctions
*
f
=
QOpenGLContext
::
currentContext
()
->
functions
();
f
->
glClearColor
(
0.
f
,
0.
f
,
0.
f
,
0
.
f
);
f
->
glClearColor
(
0.
f
,
0.
f
,
0.
f
,
1
.
f
);
f
->
glClear
(
GL_COLOR_BUFFER_BIT
|
GL_DEPTH_BUFFER_BIT
);
CoreManager
*
coreManager
=
CoreManager
::
getInstance
();
...
...
linphone-desktop/ui/views/App/Settings/SettingsVideo.js
View file @
906ec740
...
...
@@ -2,6 +2,20 @@
// `SettingsVideo.qml` Logic.
// =============================================================================
.
import
Linphone
1.0
as
Linphone
// =============================================================================
function
showVideoPreview
(
account
)
{
window
.
attachVirtualWindow
(
Qt
.
resolvedUrl
(
'
SettingsVideoPreview.qml
'
))
}
function
updateVideoPreview
()
{
var
count
=
Linphone
.
CallsListModel
.
rowCount
()
if
(
count
===
0
)
{
showCameraPreview
.
enabled
=
true
}
else
if
(
count
===
1
)
{
showCameraPreview
.
enabled
=
false
window
.
detachVirtualWindow
()
}
}
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
View file @
906ec740
...
...
@@ -108,10 +108,21 @@ TabContainer {
}
TextButtonB
{
id
:
showCameraPreview
anchors.right
:
parent
.
right
enabled
:
CallsListModel
.
rowCount
()
===
0
text
:
qsTr
(
'
showCameraPreview
'
)
onClicked
:
Logic
.
showVideoPreview
()
Connections
{
target
:
CallsListModel
onRowsInserted
:
Logic
.
updateVideoPreview
()
onRowsRemoved
:
Logic
.
updateVideoPreview
()
}
}
// -------------------------------------------------------------------------
...
...
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