Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
belle-sip
Commits
60eb6537
Commit
60eb6537
authored
Jun 24, 2014
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add handling of "rtcp-fb ccm fir" attribute.
parent
cd1a6958
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
include/belle-sip/belle-sdp.h
include/belle-sip/belle-sdp.h
+4
-2
src/belle_sdp_impl.c
src/belle_sdp_impl.c
+11
-0
src/grammars/belle_sdp.g
src/grammars/belle_sdp.g
+15
-0
No files found.
include/belle-sip/belle-sdp.h
View file @
60eb6537
...
...
@@ -57,14 +57,16 @@ BELLESIP_EXPORT void belle_sdp_raw_attribute_set_value(belle_sdp_raw_attribute_t
typedef
enum
_belle_sdp_rtcp_fb_val_type
{
BELLE_SDP_RTCP_FB_ACK
,
BELLE_SDP_RTCP_FB_NACK
,
BELLE_SDP_RTCP_FB_TRR_INT
BELLE_SDP_RTCP_FB_TRR_INT
,
BELLE_SDP_RTCP_FB_CCM
}
belle_sdp_rtcp_fb_val_type_t
;
typedef
enum
_belle_sdp_rtcp_fb_val_param
{
BELLE_SDP_RTCP_FB_NONE
,
BELLE_SDP_RTCP_FB_PLI
,
BELLE_SDP_RTCP_FB_SLI
,
BELLE_SDP_RTCP_FB_RPSI
,
BELLE_SDP_RTCP_FB_APP
BELLE_SDP_RTCP_FB_APP
,
BELLE_SDP_RTCP_FB_FIR
}
belle_sdp_rtcp_fb_val_param_t
;
typedef
struct
_belle_sdp_rtcp_fb_attribute
belle_sdp_rtcp_fb_attribute_t
;
BELLESIP_EXPORT
belle_sdp_rtcp_fb_attribute_t
*
belle_sdp_rtcp_fb_attribute_new
();
...
...
src/belle_sdp_impl.c
View file @
60eb6537
...
...
@@ -238,6 +238,17 @@ belle_sip_error_code belle_sdp_rtcp_fb_attribute_marshal(belle_sdp_rtcp_fb_attri
case
BELLE_SDP_RTCP_FB_TRR_INT
:
error
=
belle_sip_snprintf
(
buff
,
buff_size
,
offset
,
"trr-int %u"
,
belle_sdp_rtcp_fb_attribute_get_trr_int
(
attribute
));
break
;
case
BELLE_SDP_RTCP_FB_CCM
:
error
=
belle_sip_snprintf
(
buff
,
buff_size
,
offset
,
"ccm"
);
if
(
error
!=
BELLE_SIP_OK
)
return
error
;
switch
(
param
)
{
case
BELLE_SDP_RTCP_FB_FIR
:
error
=
belle_sip_snprintf
(
buff
,
buff_size
,
offset
,
" fir"
);
break
;
default:
break
;
}
break
;
}
return
error
;
}
...
...
src/grammars/belle_sdp.g
View file @
60eb6537
...
...
@@ -310,6 +310,7 @@ rtcp_fb_val :
(rtcp_fb_ack_val)=>rtcp_fb_ack_val
| (rtcp_fb_nack_val)=>rtcp_fb_nack_val
| (rtcp_fb_trr_int_val)=>rtcp_fb_trr_int_val
| (rtcp_fb_ccm_val)=>rtcp_fb_ccm_val
| (rtcp_fb_id_val)=>rtcp_fb_id_val;
rtcp_fb_ack_val:
...
...
@@ -328,6 +329,11 @@ rtcp_fb_trr_int_val:
belle_sdp_rtcp_fb_attribute_set_trr_int($rtcp_fb_attribute::current,(uint16_t)atoi((const char*)$integer.text->chars));
};
rtcp_fb_ccm_val:
{IS_TOKEN(ccm)}? rtcp_fb_attribute_name /*'ccm'*/ SPACE rtcp_fb_ccm_param {
belle_sdp_rtcp_fb_attribute_set_type($rtcp_fb_attribute::current,BELLE_SDP_RTCP_FB_CCM);
};
rtcp_fb_id_val:
rtcp_fb_attribute_name (SPACE rtcp_fb_param)?;
...
...
@@ -367,6 +373,15 @@ rtcp_fb_app_param:
belle_sdp_rtcp_fb_attribute_set_param($rtcp_fb_attribute::current,BELLE_SDP_RTCP_FB_APP);
};
rtcp_fb_ccm_param:
(rtcp_fb_fir_param)=>rtcp_fb_fir_param
| (rtcp_fb_token_param)=>rtcp_fb_token_param;
rtcp_fb_fir_param:
{IS_TOKEN(fir)}? rtcp_fb_attribute_name /*'fir'*/ {
belle_sdp_rtcp_fb_attribute_set_param($rtcp_fb_attribute::current,BELLE_SDP_RTCP_FB_FIR);
};
rtcp_fb_token_param:
rtcp_fb_attribute_name (SPACE byte_string)?;
...
...
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