Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
7c87f5e8
Commit
7c87f5e8
authored
Jul 04, 2019
by
Adrien Béraud
Browse files
video: use high precision to_string for framerate
Change-Id: Iea2f6f9c8fe08eacfcb3acaa055f921daf5ef347
parent
18bddb39
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/media/video/video_device.h
View file @
7c87f5e8
...
...
@@ -83,7 +83,7 @@ public:
auto
rates
=
getRateList
(
chan
,
size
);
std
::
vector
<
std
::
string
>
rates_str
{
rates
.
size
()};
std
::
transform
(
rates
.
begin
(),
rates
.
end
(),
rates_str
.
begin
(),
[](
FrameRate
r
)
{
return
std
::
to_string
(
r
.
real
());
});
[](
FrameRate
r
)
{
return
jami
::
to_string
(
r
.
real
());
});
cap
[
chan
][
sz
.
str
()]
=
std
::
move
(
rates_str
);
}
...
...
@@ -124,7 +124,7 @@ public:
std
::
stringstream
video_size
;
video_size
<<
max_size
.
first
<<
"x"
<<
max_size
.
second
;
settings
.
video_size
=
video_size
.
str
();
settings
.
framerate
=
std
::
to_string
(
max_size_rate
.
real
());
settings
.
framerate
=
jami
::
to_string
(
max_size_rate
.
real
());
JAMI_WARN
(
"Default video settings: %s, %s FPS"
,
settings
.
video_size
.
c_str
(),
settings
.
framerate
.
c_str
());
}
...
...
@@ -141,7 +141,7 @@ public:
settings
.
name
=
params
.
name
;
settings
.
channel
=
params
.
channel_name
;
settings
.
video_size
=
sizeToString
(
params
.
width
,
params
.
height
);
settings
.
framerate
=
std
::
to_string
(
params
.
framerate
.
real
());
settings
.
framerate
=
jami
::
to_string
(
params
.
framerate
.
real
());
return
settings
;
}
...
...
Write
Preview
Supports
Markdown
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