Skip to content
GitLab
Explore
Sign in
Register
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
b4167b17
Commit
b4167b17
authored
3 years ago
by
Kateryna Kostiuk
Committed by
Kateryna Kostiuk
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
screensharing: add framerate for macOS
Change-Id: I2a22e80a8ea826641afef9a82bf3b17ca35fcaed
parent
dc71d87c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/media/video/osxvideo/video_device_impl.mm
+28
-1
28 additions, 1 deletion
src/media/video/osxvideo/video_device_impl.mm
src/media/video/osxvideo/video_device_monitor_impl.mm
+1
-0
1 addition, 0 deletions
src/media/video/osxvideo/video_device_monitor_impl.mm
with
29 additions
and
1 deletion
src/media/video/osxvideo/video_device_impl.mm
+
28
−
1
View file @
b4167b17
...
...
@@ -61,6 +61,16 @@ class VideoDeviceImpl {
VideoSize
current_size_
;
FrameRate
rate_
{};
std
::
map
<
VideoSize
,
std
::
vector
<
FrameRate
>>
available_rates_
;
FrameRate
desktopFrameRate_
=
{
30
};
std
::
vector
<
FrameRate
>
desktopFrameRates_
=
{
FrameRate
(
5
),
FrameRate
(
10
),
FrameRate
(
15
),
FrameRate
(
20
),
FrameRate
(
25
),
FrameRate
(
30
),
FrameRate
(
60
),
FrameRate
(
120
),
FrameRate
(
144
)};
};
VideoDeviceImpl
::
VideoDeviceImpl
(
const
std
::
string
&
uniqueID
)
...
...
@@ -69,6 +79,14 @@ VideoDeviceImpl::VideoDeviceImpl(const std::string& uniqueID)
,
avDevice_
([
AVCaptureDevice
deviceWithUniqueID
:
[
NSString
stringWithCString
:
uniqueID
.
c_str
()
encoding
:[
NSString
defaultCStringEncoding
]]])
{
if
(
id
==
DEVICE_DESKTOP
)
{
name
=
DEVICE_DESKTOP
;
VideoSize
size
{
0
,
0
};
available_sizes_
.
emplace_back
(
size
);
available_rates_
[
size
]
=
desktopFrameRates_
;
return
;
}
name
=
[[
avDevice_
localizedName
]
UTF8String
];
available_sizes_
.
reserve
(
avDevice_
.
formats
.
count
);
...
...
@@ -111,9 +129,13 @@ DeviceParams
VideoDeviceImpl
::
getDeviceParams
()
const
{
DeviceParams
params
;
params
.
name
=
[[
avDevice_
localizedName
]
UTF8String
];
params
.
unique_id
=
id
;
params
.
input
=
id
;
if
(
id
==
DEVICE_DESKTOP
)
{
params
.
framerate
=
desktopFrameRate_
;
return
params
;
}
params
.
name
=
[[
avDevice_
localizedName
]
UTF8String
];
params
.
framerate
=
rate_
;
params
.
format
=
"avfoundation"
;
params
.
pixel_format
=
"nv12"
;
...
...
@@ -125,6 +147,11 @@ VideoDeviceImpl::getDeviceParams() const
void
VideoDeviceImpl
::
setDeviceParams
(
const
DeviceParams
&
params
)
{
if
(
id
==
DEVICE_DESKTOP
)
{
name
=
DEVICE_DESKTOP
;
desktopFrameRate_
=
params
.
framerate
;
return
;
}
rate_
=
params
.
framerate
;
current_size_
=
extractSize
({
params
.
width
,
params
.
height
});
}
...
...
This diff is collapsed.
Click to expand it.
src/media/video/osxvideo/video_device_monitor_impl.mm
+
1
−
0
View file @
b4167b17
...
...
@@ -127,6 +127,7 @@ VideoDeviceMonitor::VideoDeviceMonitor() :
monitorImpl_
(
new
VideoDeviceMonitorImpl
(
this
))
{
monitorImpl_
->
start
();
addDevice
(
DEVICE_DESKTOP
,
{});
}
VideoDeviceMonitor
::~
VideoDeviceMonitor
()
...
...
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