Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
131
Issues
131
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
5458eb86
Commit
5458eb86
authored
Jun 28, 2019
by
Andreas Traczyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videodevices: don't change preference order when changing settings
Change-Id: I743181cb854c5bdc961ade5dceb7f6ccc1b1ba13
parent
ec67b99e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
src/media/video/video_device_monitor.cpp
src/media/video/video_device_monitor.cpp
+6
-4
src/media/video/video_device_monitor.h
src/media/video/video_device_monitor.h
+2
-2
No files found.
src/media/video/video_device_monitor.cpp
View file @
5458eb86
...
...
@@ -80,7 +80,7 @@ VideoDeviceMonitor::getSettings(const string& name)
}
void
VideoDeviceMonitor
::
applySettings
(
const
string
&
name
,
VideoSettings
settings
)
VideoDeviceMonitor
::
applySettings
(
const
string
&
name
,
const
VideoSettings
&
settings
)
{
std
::
lock_guard
<
std
::
mutex
>
l
(
lock_
);
const
auto
iter
=
findDeviceByName
(
name
);
...
...
@@ -89,7 +89,9 @@ VideoDeviceMonitor::applySettings(const string& name, VideoSettings settings)
return
;
iter
->
applySettings
(
settings
);
overwritePreferences
(
iter
->
getSettings
());
auto
it
=
findPreferencesByName
(
settings
.
name
);
if
(
it
!=
preferences_
.
end
())
(
*
it
)
=
settings
;
}
string
...
...
@@ -303,12 +305,12 @@ VideoDeviceMonitor::findPreferencesByName(const string& name)
}
void
VideoDeviceMonitor
::
overwritePreferences
(
VideoSettings
settings
)
VideoDeviceMonitor
::
overwritePreferences
(
const
VideoSettings
&
settings
)
{
auto
it
=
findPreferencesByName
(
settings
.
name
);
if
(
it
!=
preferences_
.
end
())
preferences_
.
erase
(
it
);
preferences_
.
push
_back
(
settings
);
preferences_
.
emplace
_back
(
settings
);
}
void
...
...
src/media/video/video_device_monitor.h
View file @
5458eb86
...
...
@@ -51,7 +51,7 @@ class VideoDeviceMonitor : public Serializable
DRing
::
VideoCapabilities
getCapabilities
(
const
std
::
string
&
name
)
const
;
VideoSettings
getSettings
(
const
std
::
string
&
name
);
void
applySettings
(
const
std
::
string
&
name
,
VideoSettings
settings
);
void
applySettings
(
const
std
::
string
&
name
,
const
VideoSettings
&
settings
);
std
::
string
getDefaultDevice
()
const
;
std
::
string
getMRLForDefaultDevice
()
const
;
...
...
@@ -82,7 +82,7 @@ class VideoDeviceMonitor : public Serializable
*/
std
::
vector
<
VideoSettings
>
preferences_
;
void
overwritePreferences
(
VideoSettings
settings
);
void
overwritePreferences
(
const
VideoSettings
&
settings
);
std
::
vector
<
VideoSettings
>::
iterator
findPreferencesByName
(
const
std
::
string
&
name
);
/*
...
...
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