Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
5458eb86
Commit
5458eb86
authored
5 years ago
by
Andreas Traczyk
Browse files
Options
Downloads
Patches
Plain Diff
videodevices: don't change preference order when changing settings
Change-Id: I743181cb854c5bdc961ade5dceb7f6ccc1b1ba13
parent
ec67b99e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/media/video/video_device_monitor.cpp
+6
-4
6 additions, 4 deletions
src/media/video/video_device_monitor.cpp
src/media/video/video_device_monitor.h
+2
-2
2 additions, 2 deletions
src/media/video/video_device_monitor.h
with
8 additions
and
6 deletions
src/media/video/video_device_monitor.cpp
+
6
−
4
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
...
...
This diff is collapsed.
Click to expand it.
src/media/video/video_device_monitor.h
+
2
−
2
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
);
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment