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
ec376a01
Commit
ec376a01
authored
6 years ago
by
Kateryna Kostiuk
Committed by
Adrien Béraud
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
call: support screen sharing for macOS
Change-Id: I6737763f9920fbc1b32ee558980b4ef1daadaff8
parent
3e542c1f
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_input.cpp
+30
-3
30 additions, 3 deletions
src/media/video/video_input.cpp
src/media/video/video_input.h
+1
-0
1 addition, 0 deletions
src/media/video/video_input.h
with
31 additions
and
3 deletions
src/media/video/video_input.cpp
+
30
−
3
View file @
ec376a01
...
...
@@ -430,6 +430,31 @@ VideoInput::initX11(std::string display)
return
true
;
}
bool
VideoInput
::
initAVFoundation
(
const
std
::
string
&
display
)
{
size_t
space
=
display
.
find
(
' '
);
clearOptions
();
decOpts_
.
format
=
"avfoundation"
;
decOpts_
.
input
=
"Capture screen 0"
;
decOpts_
.
framerate
=
30
;
if
(
space
!=
std
::
string
::
npos
)
{
std
::
istringstream
iss
(
display
.
substr
(
space
+
1
));
char
sep
;
unsigned
w
,
h
;
iss
>>
w
>>
sep
>>
h
;
decOpts_
.
width
=
round2pow
(
w
,
3
);
decOpts_
.
height
=
round2pow
(
h
,
3
);
}
else
{
decOpts_
.
width
=
default_grab_width
;
decOpts_
.
height
=
default_grab_height
;
}
return
true
;
}
bool
VideoInput
::
initGdiGrab
(
std
::
string
params
)
{
...
...
@@ -535,10 +560,12 @@ VideoInput::switchInput(const std::string& resource)
ready
=
initCamera
(
suffix
);
}
else
if
(
prefix
==
DRing
::
Media
::
VideoProtocolPrefix
::
DISPLAY
)
{
/* X11 display name */
#if
n
def _
WIN32
ready
=
init
X11
(
suffix
);
#el
se
#ifdef _
_APPLE__
ready
=
init
AVFoundation
(
suffix
);
#el
if defined(_WIN32)
ready
=
initGdiGrab
(
suffix
);
#else
ready
=
initX11
(
suffix
);
#endif
}
else
if
(
prefix
==
DRing
::
Media
::
VideoProtocolPrefix
::
FILE
)
{
/* Pathname */
...
...
This diff is collapsed.
Click to expand it.
src/media/video/video_input.h
+
1
−
0
View file @
ec376a01
...
...
@@ -118,6 +118,7 @@ private:
// true if decOpts_ is ready to use, false if using promise/future
bool
initCamera
(
const
std
::
string
&
device
);
bool
initX11
(
std
::
string
display
);
bool
initAVFoundation
(
const
std
::
string
&
display
);
bool
initFile
(
std
::
string
path
);
bool
initGdiGrab
(
std
::
string
params
);
...
...
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