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
da4d2505
Commit
da4d2505
authored
Mar 03, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Settings/SettingsVideo): supports video parameters
parent
7ea31e5b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
243 additions
and
0 deletions
+243
-0
en.ts
linphone-desktop/assets/languages/en.ts
+39
-0
fr.ts
linphone-desktop/assets/languages/fr.ts
+39
-0
SettingsModel.cpp
linphone-desktop/src/components/settings/SettingsModel.cpp
+54
-0
SettingsModel.hpp
linphone-desktop/src/components/settings/SettingsModel.hpp
+29
-0
SettingsVideo.qml
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
+82
-0
No files found.
linphone-desktop/assets/languages/en.ts
View file @
da4d2505
...
@@ -899,6 +899,45 @@ Server url not configured.</translation>
...
@@ -899,6 +899,45 @@ Server url not configured.</translation>
<
translation
>
System
locale
<
/translation
>
<
translation
>
System
locale
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
name
>
SettingsVideo
<
/name
>
<
message
>
<
source
>
videoInputDeviceLabel
<
/source
>
<
translation
>
Video
input
device
<
/translation
>
<
/message
>
<
message
>
<
source
>
useCustomVideoFramerateLabel
<
/source
>
<
translation
type
=
"
vanished
"
>
Use
custom
framerate
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoFramerateLabel
<
/source
>
<
translation
>
Framerate
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoCaptureTitle
<
/source
>
<
translation
>
Video
capture
parameters
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoPresetLabel
<
/source
>
<
translation
>
Video
preset
<
/translation
>
<
/message
>
<
message
>
<
source
>
presetDefault
<
/source
>
<
translation
>
Default
<
/translation
>
<
/message
>
<
message
>
<
source
>
presetHighFps
<
/source
>
<
translation
>
High
FPS
<
/translation
>
<
/message
>
<
message
>
<
source
>
presetCustom
<
/source
>
<
translation
>
Custom
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoSizeLabel
<
/source
>
<
translation
>
Video
resolution
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
context
>
<
name
>
SettingsWindow
<
/name
>
<
name
>
SettingsWindow
<
/name
>
<
message
>
<
message
>
...
...
linphone-desktop/assets/languages/fr.ts
View file @
da4d2505
...
@@ -909,6 +909,45 @@ Url du serveur non configurée.</translation>
...
@@ -909,6 +909,45 @@ Url du serveur non configurée.</translation>
<
translation
>
Locale
du
syst
è
me
<
/translation
>
<
translation
>
Locale
du
syst
è
me
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
name
>
SettingsVideo
<
/name
>
<
message
>
<
source
>
videoInputDeviceLabel
<
/source
>
<
translation
>
P
é
riph
é
rique
de
capture
vid
é
o
<
/translation
>
<
/message
>
<
message
>
<
source
>
useCustomVideoFramerateLabel
<
/source
>
<
translation
type
=
"
vanished
"
>
Forcer
n
.
b
.
images
/
s
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoFramerateLabel
<
/source
>
<
translation
>
Images
/
s
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoCaptureTitle
<
/source
>
<
translation
>
Param
è
tres
de
capture
vid
é
o
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoPresetLabel
<
/source
>
<
translation
>
Profil
vid
é
o
<
/translation
>
<
/message
>
<
message
>
<
source
>
presetDefault
<
/source
>
<
translation
>
D
é
faut
<
/translation
>
<
/message
>
<
message
>
<
source
>
presetHighFps
<
/source
>
<
translation
>
Fluide
<
/translation
>
<
/message
>
<
message
>
<
source
>
presetCustom
<
/source
>
<
translation
>
Personnalis
é
<
/translation
>
<
/message
>
<
message
>
<
source
>
videoSizeLabel
<
/source
>
<
translation
>
D
é
finition
<
/translation
>
<
/message
>
<
/context
>
<
context
>
<
context
>
<
name
>
SettingsWindow
<
/name
>
<
name
>
SettingsWindow
<
/name
>
<
message
>
<
message
>
...
...
linphone-desktop/src/components/settings/SettingsModel.cpp
View file @
da4d2505
...
@@ -148,6 +148,60 @@ void SettingsModel::setEchoCancellationEnabled (bool status) {
...
@@ -148,6 +148,60 @@ void SettingsModel::setEchoCancellationEnabled (bool status) {
emit
echoCancellationEnabledChanged
(
status
);
emit
echoCancellationEnabledChanged
(
status
);
}
}
// =============================================================================
// Video.
// =============================================================================
QStringList
SettingsModel
::
getVideoDevices
()
const
{
QStringList
list
;
for
(
const
auto
&
device
:
CoreManager
::
getInstance
()
->
getCore
()
->
getVideoDevices
())
list
<<
::
Utils
::
linphoneStringToQString
(
device
);
return
list
;
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getVideoDevice
()
const
{
return
::
Utils
::
linphoneStringToQString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getVideoDevice
()
);
}
void
SettingsModel
::
setVideoDevice
(
const
QString
&
device
)
{
CoreManager
::
getInstance
()
->
getCore
()
->
setVideoDevice
(
::
Utils
::
qStringToLinphoneString
(
device
)
);
emit
videoDeviceChanged
(
device
);
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getVideoPreset
()
const
{
return
::
Utils
::
linphoneStringToQString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getVideoPreset
()
);
}
void
SettingsModel
::
setVideoPreset
(
const
QString
&
preset
)
{
CoreManager
::
getInstance
()
->
getCore
()
->
setVideoPreset
(
::
Utils
::
qStringToLinphoneString
(
preset
)
);
emit
videoPresetChanged
(
preset
);
}
// -----------------------------------------------------------------------------
int
SettingsModel
::
getVideoFramerate
()
const
{
return
static_cast
<
int
>
(
CoreManager
::
getInstance
()
->
getCore
()
->
getPreferredFramerate
());
}
void
SettingsModel
::
setVideoFramerate
(
int
framerate
)
{
CoreManager
::
getInstance
()
->
getCore
()
->
setPreferredFramerate
(
static_cast
<
float
>
(
framerate
));
emit
videoFramerateChanged
(
framerate
);
}
// =============================================================================
// =============================================================================
// Chat & calls.
// Chat & calls.
// =============================================================================
// =============================================================================
...
...
linphone-desktop/src/components/settings/SettingsModel.hpp
View file @
da4d2505
...
@@ -49,6 +49,15 @@ class SettingsModel : public QObject {
...
@@ -49,6 +49,15 @@ class SettingsModel : public QObject {
Q_PROPERTY
(
bool
echoCancellationEnabled
READ
getEchoCancellationEnabled
WRITE
setEchoCancellationEnabled
NOTIFY
echoCancellationEnabledChanged
);
Q_PROPERTY
(
bool
echoCancellationEnabled
READ
getEchoCancellationEnabled
WRITE
setEchoCancellationEnabled
NOTIFY
echoCancellationEnabledChanged
);
// Video. --------------------------------------------------------------------
Q_PROPERTY
(
QStringList
videoDevices
READ
getVideoDevices
CONSTANT
);
Q_PROPERTY
(
QString
videoDevice
READ
getVideoDevice
WRITE
setVideoDevice
NOTIFY
videoDeviceChanged
);
Q_PROPERTY
(
QString
videoPreset
READ
getVideoPreset
WRITE
setVideoPreset
NOTIFY
videoPresetChanged
);
Q_PROPERTY
(
int
videoFramerate
READ
getVideoFramerate
WRITE
setVideoFramerate
NOTIFY
videoFramerateChanged
);
// Chat & calls. -------------------------------------------------------------
// Chat & calls. -------------------------------------------------------------
Q_PROPERTY
(
bool
autoAnswerStatus
READ
getAutoAnswerStatus
WRITE
setAutoAnswerStatus
NOTIFY
autoAnswerStatusChanged
);
Q_PROPERTY
(
bool
autoAnswerStatus
READ
getAutoAnswerStatus
WRITE
setAutoAnswerStatus
NOTIFY
autoAnswerStatusChanged
);
...
@@ -147,6 +156,19 @@ public:
...
@@ -147,6 +156,19 @@ public:
bool
getEchoCancellationEnabled
()
const
;
bool
getEchoCancellationEnabled
()
const
;
void
setEchoCancellationEnabled
(
bool
status
);
void
setEchoCancellationEnabled
(
bool
status
);
// Video. --------------------------------------------------------------------
QStringList
getVideoDevices
()
const
;
QString
getVideoDevice
()
const
;
void
setVideoDevice
(
const
QString
&
device
);
QString
getVideoPreset
()
const
;
void
setVideoPreset
(
const
QString
&
preset
);
int
getVideoFramerate
()
const
;
void
setVideoFramerate
(
int
framerate
);
// Chat & calls. -------------------------------------------------------------
// Chat & calls. -------------------------------------------------------------
bool
getAutoAnswerStatus
()
const
;
bool
getAutoAnswerStatus
()
const
;
...
@@ -249,6 +271,13 @@ signals:
...
@@ -249,6 +271,13 @@ signals:
void
echoCancellationEnabledChanged
(
bool
status
);
void
echoCancellationEnabledChanged
(
bool
status
);
// Video. --------------------------------------------------------------------
void
videoDeviceChanged
(
const
QString
&
device
);
void
videoPresetChanged
(
const
QString
&
preset
);
void
videoFramerateChanged
(
int
framerate
);
// Chat & calls. -------------------------------------------------------------
// Chat & calls. -------------------------------------------------------------
void
autoAnswerStatusChanged
(
bool
status
);
void
autoAnswerStatusChanged
(
bool
status
);
...
...
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
View file @
da4d2505
import
QtQuick
2.7
import
QtQuick
2.7
import
Common
1.0
import
Common
1.0
import
Linphone
1.0
import
Utils
1.0
// =============================================================================
// =============================================================================
TabContainer
{
TabContainer
{
Form
{
title
:
qsTr
(
'
videoCaptureTitle
'
)
width
:
parent
.
width
FormLine
{
FormGroup
{
label
:
qsTr
(
'
videoInputDeviceLabel
'
)
ComboBox
{
model
:
SettingsModel
.
videoDevices
Component.onCompleted
:
currentIndex
=
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
videoDevice
})
onActivated
:
SettingsModel
.
videoDevice
=
model
[
index
]
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
videoPresetLabel
'
)
ComboBox
{
model
:
ListModel
{
id
:
presets
ListElement
{
key
:
qsTr
(
'
presetDefault
'
)
value
:
'
default
'
}
ListElement
{
key
:
qsTr
(
'
presetHighFps
'
)
value
:
'
high-fps
'
}
ListElement
{
key
:
qsTr
(
'
presetCustom
'
)
value
:
'
custom
'
}
}
textRole
:
'
key
'
Component.onCompleted
:
{
var
preset
=
SettingsModel
.
videoPreset
currentIndex
=
Number
(
Utils
.
findIndex
([
'
default
'
,
'
high-fps
'
,
'
custom
'
],
function
(
value
)
{
return
preset
===
value
}))
}
onActivated
:
SettingsModel
.
videoPreset
=
presets
.
get
(
index
).
value
}
}
}
FormLine
{
FormGroup
{
label
:
qsTr
(
'
videoSizeLabel
'
)
ComboBox
{
// TODO
}
}
FormGroup
{
label
:
qsTr
(
'
videoFramerateLabel
'
)
NumericField
{
maxValue
:
60
minValue
:
1
readOnly
:
SettingsModel
.
videoPreset
!==
'
custom
'
text
:
SettingsModel
.
videoFramerate
onEditingFinished
:
SettingsModel
.
videoFramerate
=
text
}
}
}
}
}
}
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