Commit 60eb6537 authored by Ghislain MARY's avatar Ghislain MARY

Add handling of "rtcp-fb ccm fir" attribute.

parent cd1a6958
......@@ -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();
......
......@@ -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;
}
......
......@@ -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)?;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment