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
Sergio Ammirata
bitstream
Commits
d3409a23
Commit
d3409a23
authored
Oct 25, 2018
by
Sergio Ammirata
Browse files
Add support for sdes and other items needed by the RIST protocol
parent
4626b9f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
ietf/rtcp_fb.h
View file @
d3409a23
...
...
@@ -30,6 +30,19 @@ static inline void rtcp_fb_set_ssrc_pkt_sender(uint8_t *p_rtcp_fb,
p_rtcp_fb
[
7
]
=
pi_ssrc
[
3
];
}
static
inline
void
rtcp_fb_set_int_ssrc_pkt_sender
(
uint8_t
*
p_rtcp_fb
,
uint32_t
i_ssrc
)
{
p_rtcp_fb
[
4
]
=
(
i_ssrc
>>
24
)
&
0xff
;
p_rtcp_fb
[
5
]
=
(
i_ssrc
>>
16
)
&
0xff
;
p_rtcp_fb
[
6
]
=
(
i_ssrc
>>
8
)
&
0xff
;
p_rtcp_fb
[
7
]
=
i_ssrc
&
0xff
;
}
static
inline
uint32_t
rtcp_fb_get_int_ssrc_pkt_sender
(
const
uint8_t
*
p_rtcp_fb
)
{
return
(
p_rtcp_fb
[
4
]
<<
24
)
|
(
p_rtcp_fb
[
5
]
<<
16
)
|
(
p_rtcp_fb
[
6
]
<<
8
)
|
p_rtcp_fb
[
7
];
}
static
inline
void
rtcp_fb_set_ssrc_media_src
(
uint8_t
*
p_rtcp_fb
,
const
uint8_t
pi_ssrc
[
4
])
{
...
...
ietf/rtcp_sdes.h
0 → 100644
View file @
d3409a23
#ifndef __BITSTREAM_IETF_RTCP_SDES_H__
# define __BITSTREAM_IETF_RTCP_SDES_H__
# include <inttypes.h>
# include <bitstream/ietf/rtcp.h>
# define RTCP_SDES_SIZE 10
# define RTCP_PT_SDES 202
static
inline
void
rtcp_sdes_set_pt
(
uint8_t
*
p_rtcp_rr
)
{
rtcp_set_pt
(
p_rtcp_rr
,
RTCP_PT_SDES
);
}
static
inline
uint8_t
rtcp_sdes_get_cname
(
const
uint8_t
*
p_rtcp_sdes
)
{
return
p_rtcp_sdes
[
8
];
}
static
inline
void
rtcp_sdes_set_cname
(
uint8_t
*
p_rtcp_sdes
,
uint8_t
cname
)
{
p_rtcp_sdes
[
8
]
=
cname
;
}
static
inline
int8_t
rtcp_sdes_get_name_length
(
const
uint8_t
*
p_rtcp_sdes
)
{
return
p_rtcp_sdes
[
9
];
}
static
inline
void
rtcp_sdes_set_name_length
(
uint8_t
*
p_rtcp_sdes
,
int8_t
name_length
)
{
p_rtcp_sdes
[
9
]
=
name_length
;
}
#endif
/* !__BITSTREAM_IETF_RTCP_SDES_H__ */
ietf/rtp.h
View file @
d3409a23
...
...
@@ -168,6 +168,19 @@ static inline void rtp_get_ssrc(const uint8_t *p_rtp, uint8_t pi_ssrc[4])
pi_ssrc
[
3
]
=
p_rtp
[
11
];
}
static
inline
void
rtp_set_int_ssrc
(
uint8_t
*
p_rtp
,
uint32_t
i_ssrc
)
{
p_rtp
[
8
]
=
(
i_ssrc
>>
24
)
&
0xff
;
p_rtp
[
9
]
=
(
i_ssrc
>>
16
)
&
0xff
;
p_rtp
[
10
]
=
(
i_ssrc
>>
8
)
&
0xff
;
p_rtp
[
11
]
=
i_ssrc
&
0xff
;
}
static
inline
uint32_t
rtp_get_int_ssrc
(
const
uint8_t
*
p_rtp
)
{
return
(
p_rtp
[
8
]
<<
24
)
|
(
p_rtp
[
9
]
<<
16
)
|
(
p_rtp
[
10
]
<<
8
)
|
p_rtp
[
11
];
}
static
inline
uint8_t
*
rtp_extension
(
uint8_t
*
p_rtp
)
{
return
p_rtp
+
RTP_HEADER_SIZE
+
4
*
rtp_get_cc
(
p_rtp
);
...
...
Write
Preview
Markdown
is supported
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