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
2d9bef6a
Commit
2d9bef6a
authored
Apr 20, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Settings/SettingsVideo): supports preview
parent
2a507f48
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
109 additions
and
9 deletions
+109
-9
en.ts
linphone-desktop/assets/languages/en.ts
+7
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+7
-0
resources.qrc
linphone-desktop/resources.qrc
+4
-1
App.cpp
linphone-desktop/src/app/App.cpp
+1
-1
Camera.cpp
linphone-desktop/src/components/camera/Camera.cpp
+5
-1
CameraPreview.cpp
linphone-desktop/src/components/camera/CameraPreview.cpp
+17
-0
CameraPreview.hpp
linphone-desktop/src/components/camera/CameraPreview.hpp
+5
-1
CoreManager.cpp
linphone-desktop/src/components/core/CoreManager.cpp
+0
-1
SettingsVideo.js
linphone-desktop/ui/views/App/Settings/SettingsVideo.js
+7
-0
SettingsVideo.qml
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
+3
-1
SettingsVideoPreview.qml
...ne-desktop/ui/views/App/Settings/SettingsVideoPreview.qml
+34
-0
SettingsVideoPreviewStyle.qml
...i/views/App/Styles/Settings/SettingsVideoPreviewStyle.qml
+14
-0
qmldir
linphone-desktop/ui/views/App/Styles/qmldir
+3
-1
linphone
submodules/linphone
+1
-1
mediastreamer2
submodules/mediastreamer2
+1
-1
No files found.
linphone-desktop/assets/languages/en.ts
View file @
2d9bef6a
...
...
@@ -1133,6 +1133,13 @@ Server url not configured.</translation>
<
translation
>
VIDEO
PREVIEW
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsVideoPreview
<
/name
>
<
message
>
<
source
>
confirm
<
/source
>
<
translation
>
OK
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsWindow
<
/name
>
<
message
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
2d9bef6a
...
...
@@ -1133,6 +1133,13 @@ Url du serveur non configurée.</translation>
<
translation
>
APER
Ç
U
DE
LA
VID
É
O
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsVideoPreview
<
/name
>
<
message
>
<
source
>
confirm
<
/source
>
<
translation
>
VALIDER
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
name
>
SettingsWindow
<
/name
>
<
message
>
...
...
linphone-desktop/resources.qrc
View file @
2d9bef6a
...
...
@@ -308,8 +308,8 @@
<file>
ui/modules/Linphone/Styles/Blocks/CardBlockStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Blocks/RequestBlockStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Calls/CallControlsStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Calls/CallStatisticsStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Calls/CallsStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Calls/CallStatisticsStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Chat/ChatStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Codecs/CodecsViewerStyle.qml
</file>
<file>
ui/modules/Linphone/Styles/Contact/AvatarStyle.qml
</file>
...
...
@@ -375,6 +375,8 @@
<file>
ui/views/App/Settings/SettingsSipAccounts.js
</file>
<file>
ui/views/App/Settings/SettingsSipAccounts.qml
</file>
<file>
ui/views/App/Settings/SettingsUi.qml
</file>
<file>
ui/views/App/Settings/SettingsVideo.js
</file>
<file>
ui/views/App/Settings/SettingsVideoPreview.qml
</file>
<file>
ui/views/App/Settings/SettingsVideo.qml
</file>
<file>
ui/views/App/Settings/SettingsWindow.qml
</file>
<file>
ui/views/App/SplashScreen/SplashScreen.qml
</file>
...
...
@@ -397,6 +399,7 @@
<file>
ui/views/App/Styles/Main/ManageAccountsStyle.qml
</file>
<file>
ui/views/App/Styles/qmldir
</file>
<file>
ui/views/App/Styles/Settings/SettingsSipAccountsEditStyle.qml
</file>
<file>
ui/views/App/Styles/Settings/SettingsVideoPreviewStyle.qml
</file>
<file>
ui/views/App/Styles/Settings/SettingsWindowStyle.qml
</file>
<file>
ui/views/App/Styles/SplashScreen/SplashScreenStyle.qml
</file>
</qresource>
...
...
linphone-desktop/src/app/App.cpp
View file @
2d9bef6a
...
...
@@ -278,7 +278,7 @@ void App::registerTypes () {
qmlRegisterType
<
AssistantModel
>
(
"Linphone"
,
1
,
0
,
"AssistantModel"
);
qmlRegisterType
<
Authentication
>
(
"Linphone"
,
1
,
0
,
"Authentication"
);
qmlRegisterType
<
Camera
>
(
"Linphone"
,
1
,
0
,
"Camera"
);
qmlRegisterType
<
Camera
>
(
"Linphone"
,
1
,
0
,
"CameraPreview"
);
qmlRegisterType
<
Camera
Preview
>
(
"Linphone"
,
1
,
0
,
"CameraPreview"
);
qmlRegisterType
<
ChatModel
>
(
"Linphone"
,
1
,
0
,
"ChatModel"
);
qmlRegisterType
<
ChatProxyModel
>
(
"Linphone"
,
1
,
0
,
"ChatProxyModel"
);
qmlRegisterType
<
ContactsListProxyModel
>
(
"Linphone"
,
1
,
0
,
"ContactsListProxyModel"
);
...
...
linphone-desktop/src/components/camera/Camera.cpp
View file @
2d9bef6a
...
...
@@ -123,7 +123,11 @@ void CameraRenderer::synchronize (QQuickFramebufferObject *item) {
Camera
*
camera
=
qobject_cast
<
Camera
*>
(
item
);
mLinphoneCall
=
camera
->
getCall
()
->
getLinphoneCall
();
{
CallModel
*
model
=
camera
->
getCall
();
mLinphoneCall
=
model
?
model
->
getLinphoneCall
()
:
nullptr
;
}
mIsPreview
=
camera
->
mIsPreview
;
updateWindowId
();
...
...
linphone-desktop/src/components/camera/CameraPreview.cpp
View file @
2d9bef6a
...
...
@@ -126,7 +126,17 @@ void CameraPreviewRenderer::updateWindowId () {
// -----------------------------------------------------------------------------
QMutex
CameraPreview
::
mCounterMutex
;
int
CameraPreview
::
mCounter
=
0
;
// -----------------------------------------------------------------------------
CameraPreview
::
CameraPreview
(
QQuickItem
*
parent
)
:
QQuickFramebufferObject
(
parent
)
{
mCounterMutex
.
lock
();
if
(
++
mCounter
==
1
)
CoreManager
::
getInstance
()
->
getCore
()
->
enableVideoPreview
(
true
);
mCounterMutex
.
unlock
();
// The fbo content must be y-mirrored because the ms rendering is y-inverted.
setMirrorVertically
(
true
);
...
...
@@ -142,6 +152,13 @@ CameraPreview::CameraPreview (QQuickItem *parent) : QQuickFramebufferObject(pare
mRefreshTimer
->
start
();
}
CameraPreview
::~
CameraPreview
()
{
mCounterMutex
.
lock
();
if
(
--
mCounter
==
0
)
CoreManager
::
getInstance
()
->
getCore
()
->
enableVideoPreview
(
false
);
mCounterMutex
.
unlock
();
}
QQuickFramebufferObject
::
Renderer
*
CameraPreview
::
createRenderer
()
const
{
return
new
CameraPreviewRenderer
();
}
linphone-desktop/src/components/camera/CameraPreview.hpp
View file @
2d9bef6a
...
...
@@ -23,6 +23,7 @@
#ifndef CAMERA_PREVIEW_H_
#define CAMERA_PREVIEW_H_
#include <QMutex>
#include <QOpenGLFramebufferObject>
#include <QQuickFramebufferObject>
...
...
@@ -61,12 +62,15 @@ class CameraPreview : public QQuickFramebufferObject {
public:
CameraPreview
(
QQuickItem
*
parent
=
Q_NULLPTR
);
~
CameraPreview
()
=
default
;
~
CameraPreview
();
QQuickFramebufferObject
::
Renderer
*
createRenderer
()
const
override
;
private:
QTimer
*
mRefreshTimer
;
static
QMutex
mCounterMutex
;
static
int
mCounter
;
};
#endif // CAMERA_PREVIEW_H_
linphone-desktop/src/components/core/CoreManager.cpp
View file @
2d9bef6a
...
...
@@ -25,7 +25,6 @@
#include "CoreManager.hpp"
#include <QDebug>
#include <QDir>
#include <QtConcurrent>
#include <QTimer>
...
...
linphone-desktop/ui/views/App/Settings/SettingsVideo.js
0 → 100644
View file @
2d9bef6a
// =============================================================================
// `SettingsVideo.qml` Logic.
// =============================================================================
function
showVideoPreview
(
account
)
{
window
.
attachVirtualWindow
(
Qt
.
resolvedUrl
(
'
SettingsVideoPreview.qml
'
))
}
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
View file @
2d9bef6a
...
...
@@ -6,6 +6,8 @@ import Utils 1.0
import
App
.
Styles
1.0
import
'
SettingsVideo.js
'
as
Logic
// =============================================================================
TabContainer
{
...
...
@@ -109,7 +111,7 @@ TabContainer {
anchors.right
:
parent
.
right
text
:
qsTr
(
'
showCameraPreview
'
)
onClicked
:
console
.
log
(
'
TODO
'
)
onClicked
:
Logic
.
showVideoPreview
(
)
}
// -------------------------------------------------------------------------
...
...
linphone-desktop/ui/views/App/Settings/SettingsVideoPreview.qml
0 → 100644
View file @
2d9bef6a
import
QtQuick
2.7
import
Common
1.0
import
Linphone
1.0
import
App
.
Styles
1.0
// =============================================================================
DialogPlus
{
id
:
dialog
buttons
:
[
TextButtonB
{
text
:
qsTr
(
'
confirm
'
)
onClicked
:
exit
(
1
)
}
]
centeredButtons
:
true
height
:
SettingsVideoPreviewStyle
.
height
width
:
SettingsVideoPreviewStyle
.
width
// ---------------------------------------------------------------------------
CameraPreview
{
anchors
{
fill
:
parent
leftMargin
:
SettingsVideoPreviewStyle
.
preview
.
leftMargin
rightMargin
:
SettingsVideoPreviewStyle
.
preview
.
rightMargin
}
}
}
linphone-desktop/ui/views/App/Styles/Settings/SettingsVideoPreviewStyle.qml
0 → 100644
View file @
2d9bef6a
pragma
Singleton
import
QtQuick
2.7
// =============================================================================
QtObject
{
property
int
height
:
480
property
int
width
:
640
property
QtObject
preview
:
QtObject
{
property
int
leftMargin
:
25
property
int
rightMargin
:
25
}
}
linphone-desktop/ui/views/App/Styles/qmldir
View file @
2d9bef6a
...
...
@@ -24,6 +24,8 @@ singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarSty
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton ManageAccountsStyle 1.0 Main/ManageAccountsStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
singleton SettingsSipAccountsEditStyle 1.0 Settings/SettingsSipAccountsEditStyle.qml
singleton SettingsVideoPreviewStyle 1.0 Settings/SettingsVideoPreviewStyle.qml
singleton SettingsWindowStyle 1.0 Settings/SettingsWindowStyle.qml
singleton SplashScreenStyle 1.0 SplashScreen/SplashScreenStyle.qml
linphone
@
740eac98
Subproject commit
fba1e7ccb12cd83865b736d873bcd8ac28e73920
Subproject commit
740eac982a2f15c93d30499a8972a8c9d5144f4f
mediastreamer2
@
ecc40cd8
Subproject commit
dc46e818fe9b621eca3c132dfebbed39f2f232e3
Subproject commit
ecc40cd8c874b833cc6ec1a05b59769d7c7c891d
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