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
1cdbbdda
Commit
1cdbbdda
authored
12 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #18261: sdp: add RTCP info (for audio) to SDP
parent
331fe61c
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
daemon/src/sip/sdp.cpp
+24
-1
24 additions, 1 deletion
daemon/src/sip/sdp.cpp
daemon/src/sip/sdp.h
+2
-0
2 additions, 0 deletions
daemon/src/sip/sdp.h
with
26 additions
and
1 deletion
daemon/src/sip/sdp.cpp
+
24
−
1
View file @
1cdbbdda
...
@@ -272,12 +272,35 @@ Sdp::setMediaDescriptorLines(bool audio)
...
@@ -272,12 +272,35 @@ Sdp::setMediaDescriptorLines(bool audio)
if
(
!
zrtpHelloHash_
.
empty
())
if
(
!
zrtpHelloHash_
.
empty
())
addZrtpAttribute
(
med
,
zrtpHelloHash_
);
addZrtpAttribute
(
med
,
zrtpHelloHash_
);
if
(
audio
)
if
(
audio
)
{
setTelephoneEventRtpmap
(
med
);
setTelephoneEventRtpmap
(
med
);
addRTCPAttribute
(
med
);
// video has its own RTCP
}
return
med
;
return
med
;
}
}
void
Sdp
::
addRTCPAttribute
(
pjmedia_sdp_media
*
med
)
{
// FIXME: get this from CCRTP directly, don't just assume that the RTCP port is
// RTP + 1
std
::
ostringstream
os
;
os
<<
localIpAddr_
<<
":"
<<
(
localAudioPort_
+
1
);
const
std
::
string
str
(
os
.
str
());
const
pj_str_t
input_str
=
{(
char
*
)
str
.
c_str
(),
str
.
size
()};
pj_sockaddr
outputAddr
;
pj_status_t
status
=
pj_sockaddr_parse
(
PJ_AF_UNSPEC
,
0
,
&
input_str
,
&
outputAddr
);
if
(
status
!=
PJ_SUCCESS
)
{
ERROR
(
"Could not parse address %s"
,
str
.
c_str
());
return
;
}
pjmedia_sdp_attr
*
attr
=
pjmedia_sdp_attr_create_rtcp
(
memPool_
,
&
outputAddr
);
if
(
attr
)
pjmedia_sdp_attr_add
(
&
med
->
attr_count
,
med
->
attr
,
attr
);
}
void
Sdp
::
setTelephoneEventRtpmap
(
pjmedia_sdp_media
*
med
)
void
Sdp
::
setTelephoneEventRtpmap
(
pjmedia_sdp_media
*
med
)
{
{
pjmedia_sdp_attr
*
attr_rtpmap
=
static_cast
<
pjmedia_sdp_attr
*>
(
pj_pool_zalloc
(
memPool_
,
sizeof
(
pjmedia_sdp_attr
)));
pjmedia_sdp_attr
*
attr_rtpmap
=
static_cast
<
pjmedia_sdp_attr
*>
(
pj_pool_zalloc
(
memPool_
,
sizeof
(
pjmedia_sdp_attr
)));
...
...
This diff is collapsed.
Click to expand it.
daemon/src/sip/sdp.h
+
2
−
0
View file @
1cdbbdda
...
@@ -357,6 +357,8 @@ class Sdp {
...
@@ -357,6 +357,8 @@ class Sdp {
* @throw SdpException
* @throw SdpException
*/
*/
void
addZrtpAttribute
(
pjmedia_sdp_media
*
media
,
std
::
string
hash
);
void
addZrtpAttribute
(
pjmedia_sdp_media
*
media
,
std
::
string
hash
);
void
addRTCPAttribute
(
pjmedia_sdp_media
*
med
);
};
};
...
...
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