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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
8c7d11a3
Commit
8c7d11a3
authored
Nov 3, 2022
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
sipcall: fix build without ENABLE_VIDEO, format
Change-Id: I9b2b5ad339407cf80f8839eb2c897fd1a1a2c113
parent
8bc4779e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sip/sipcall.cpp
+38
-37
38 additions, 37 deletions
src/sip/sipcall.cpp
with
38 additions
and
37 deletions
src/sip/sipcall.cpp
+
38
−
37
View file @
8c7d11a3
...
@@ -274,15 +274,14 @@ SIPCall::setupVoiceCallback(const std::shared_ptr<RtpSession>& rtpSession)
...
@@ -274,15 +274,14 @@ SIPCall::setupVoiceCallback(const std::shared_ptr<RtpSession>& rtpSession)
runOnMainThread
([
w
,
voice
]
{
runOnMainThread
([
w
,
voice
]
{
if
(
auto
thisPtr
=
w
.
lock
())
{
if
(
auto
thisPtr
=
w
.
lock
())
{
// TODO: once we support multiple streams, change this to the right one
// TODO: once we support multiple streams, change this to the right one
std
::
string
streamId
;
std
::
string
streamId
=
""
;
#ifdef ENABLE_VIDEO
if
(
not
jami
::
getVideoDeviceMonitor
().
getDeviceList
().
empty
())
{
if
(
not
jami
::
getVideoDeviceMonitor
().
getDeviceList
().
empty
())
{
// if we have a video device
// if we have a video device
streamId
=
sip_utils
::
streamId
(
""
,
sip_utils
::
DEFAULT_VIDEO_STREAMID
);
streamId
=
sip_utils
::
streamId
(
""
,
sip_utils
::
DEFAULT_VIDEO_STREAMID
);
}
else
{
// no video
streamId
=
""
;
}
}
#endif
// send our local voice activity
// send our local voice activity
if
(
auto
conference
=
thisPtr
->
conf_
.
lock
())
{
if
(
auto
conference
=
thisPtr
->
conf_
.
lock
())
{
...
@@ -887,10 +886,7 @@ SIPCall::answer(const std::vector<libjami::MediaMap>& mediaList)
...
@@ -887,10 +886,7 @@ SIPCall::answer(const std::vector<libjami::MediaMap>& mediaList)
JAMI_DBG
(
"[call:%s] Answering incoming call with following media:"
,
getCallId
().
c_str
());
JAMI_DBG
(
"[call:%s] Answering incoming call with following media:"
,
getCallId
().
c_str
());
for
(
size_t
idx
=
0
;
idx
<
mediaAttrList
.
size
();
idx
++
)
{
for
(
size_t
idx
=
0
;
idx
<
mediaAttrList
.
size
();
idx
++
)
{
auto
const
&
mediaAttr
=
mediaAttrList
.
at
(
idx
);
auto
const
&
mediaAttr
=
mediaAttrList
.
at
(
idx
);
JAMI_DEBUG
(
"[call:{:s}] Media @{:d} - {:s}"
,
JAMI_DEBUG
(
"[call:{:s}] Media @{:d} - {:s}"
,
getCallId
(),
idx
,
mediaAttr
.
toString
(
true
));
getCallId
(),
idx
,
mediaAttr
.
toString
(
true
));
}
}
// Apply the media attributes.
// Apply the media attributes.
...
@@ -1130,6 +1126,7 @@ SIPCall::hangup(int reason)
...
@@ -1130,6 +1126,7 @@ SIPCall::hangup(int reason)
void
void
SIPCall
::
detachAudioFromConference
()
SIPCall
::
detachAudioFromConference
()
{
{
#ifdef ENABLE_VIDEO
if
(
auto
conf
=
getConference
())
{
if
(
auto
conf
=
getConference
())
{
if
(
auto
mixer
=
conf
->
getVideoMixer
())
{
if
(
auto
mixer
=
conf
->
getVideoMixer
())
{
for
(
auto
&
stream
:
getRtpSessionList
(
MediaType
::
MEDIA_AUDIO
))
{
for
(
auto
&
stream
:
getRtpSessionList
(
MediaType
::
MEDIA_AUDIO
))
{
...
@@ -1137,6 +1134,7 @@ SIPCall::detachAudioFromConference()
...
@@ -1137,6 +1134,7 @@ SIPCall::detachAudioFromConference()
}
}
}
}
}
}
#endif
}
}
void
void
...
@@ -2648,7 +2646,9 @@ SIPCall::reportMediaNegotiationStatus()
...
@@ -2648,7 +2646,9 @@ SIPCall::reportMediaNegotiationStatus()
// Notify using the parent Id if it's a subcall.
// Notify using the parent Id if it's a subcall.
auto
callId
=
isSubcall
()
?
parent_
->
getCallId
()
:
getCallId
();
auto
callId
=
isSubcall
()
?
parent_
->
getCallId
()
:
getCallId
();
emitSignal
<
libjami
::
CallSignal
::
MediaNegotiationStatus
>
(
emitSignal
<
libjami
::
CallSignal
::
MediaNegotiationStatus
>
(
callId
,
libjami
::
Media
::
MediaNegotiationStatusEvents
::
NEGOTIATION_SUCCESS
,
currentMediaList
());
callId
,
libjami
::
Media
::
MediaNegotiationStatusEvents
::
NEGOTIATION_SUCCESS
,
currentMediaList
());
}
}
void
void
...
@@ -2772,7 +2772,8 @@ SIPCall::handleMediaChangeRequest(const std::vector<libjami::MediaMap>& remoteMe
...
@@ -2772,7 +2772,8 @@ SIPCall::handleMediaChangeRequest(const std::vector<libjami::MediaMap>& remoteMe
// If the offered media does not differ from the current local media, the
// If the offered media does not differ from the current local media, the
// request is answered using the current local media.
// request is answered using the current local media.
if
(
not
checkMediaChangeRequest
(
remoteMediaList
))
{
if
(
not
checkMediaChangeRequest
(
remoteMediaList
))
{
answerMediaChangeRequest
(
MediaAttribute
::
mediaAttributesToMediaMaps
(
getMediaAttributeList
()));
answerMediaChangeRequest
(
MediaAttribute
::
mediaAttributesToMediaMaps
(
getMediaAttributeList
()));
return
;
return
;
}
}
...
@@ -2981,6 +2982,7 @@ SIPCall::getDetails() const
...
@@ -2981,6 +2982,7 @@ SIPCall::getDetails() const
if
(
stream
.
mediaAttribute_
->
type_
==
MediaType
::
MEDIA_VIDEO
)
{
if
(
stream
.
mediaAttribute_
->
type_
==
MediaType
::
MEDIA_VIDEO
)
{
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_SOURCE
,
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_SOURCE
,
stream
.
mediaAttribute_
->
sourceUri_
);
stream
.
mediaAttribute_
->
sourceUri_
);
#ifdef ENABLE_VIDEO
if
(
auto
const
&
rtpSession
=
stream
.
rtpSession_
)
{
if
(
auto
const
&
rtpSession
=
stream
.
rtpSession_
)
{
if
(
auto
codec
=
rtpSession
->
getCodec
())
{
if
(
auto
codec
=
rtpSession
->
getCodec
())
{
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_CODEC
,
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_CODEC
,
...
@@ -2989,17 +2991,16 @@ SIPCall::getDetails() const
...
@@ -2989,17 +2991,16 @@ SIPCall::getDetails() const
std
::
to_string
(
codec
->
systemCodecInfo
.
minBitrate
));
std
::
to_string
(
codec
->
systemCodecInfo
.
minBitrate
));
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_MAX_BITRATE
,
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_MAX_BITRATE
,
std
::
to_string
(
codec
->
systemCodecInfo
.
maxBitrate
));
std
::
to_string
(
codec
->
systemCodecInfo
.
maxBitrate
));
const
auto
&
curvideoRtpSession
if
(
const
auto
&
curvideoRtpSession
=
std
::
static_pointer_cast
<
video
::
VideoRtpSession
>
(
rtpSession
);
=
std
::
static_pointer_cast
<
video
::
VideoRtpSession
>
(
rtpSession
))
{
if
(
curvideoRtpSession
)
{
auto
curBitrate
=
curvideoRtpSession
->
getVideoBitrateInfo
()
.
videoBitrateCurrent
;
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_BITRATE
,
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_BITRATE
,
std
::
to_string
(
curBitrate
));
std
::
to_string
(
curvideoRtpSession
->
getVideoBitrateInfo
()
.
videoBitrateCurrent
));
}
}
}
else
}
else
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_CODEC
,
""
);
details
.
emplace
(
libjami
::
Call
::
Details
::
VIDEO_CODEC
,
""
);
}
}
#endif
}
else
if
(
stream
.
mediaAttribute_
->
type_
==
MediaType
::
MEDIA_AUDIO
)
{
}
else
if
(
stream
.
mediaAttribute_
->
type_
==
MediaType
::
MEDIA_AUDIO
)
{
if
(
auto
const
&
rtpSession
=
stream
.
rtpSession_
)
{
if
(
auto
const
&
rtpSession
=
stream
.
rtpSession_
)
{
if
(
auto
codec
=
rtpSession
->
getCodec
())
{
if
(
auto
codec
=
rtpSession
->
getCodec
())
{
...
...
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