Bug 1022008: Hook up SDP negotiation for H.264 GMP codecs r=ehugg a=bajaj
authorRandell Jesup <rjesup@jesup.org>
Tue, 08 Jul 2014 15:28:56 -0400
changeset 207796 94714370dfc31fd0a35114843555eae5c5f21be9
parent 207795 aaea56c38e4598a477e42e1b9882d7171f1e71a7
child 207797 65562a267f08c5ccaf5aa6b994004109b9ce0d37
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehugg, bajaj
bugs1022008
milestone32.0a2
Bug 1022008: Hook up SDP negotiation for H.264 GMP codecs r=ehugg a=bajaj
media/webrtc/signaling/src/media-conduit/CodecConfig.h
media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
media/webrtc/signaling/src/sipcc/core/sdp/ccsdp.c
media/webrtc/signaling/src/sipcc/core/sdp/sdp.h
media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
media/webrtc/signaling/src/sipcc/include/ccsdp.h
media/webrtc/signaling/src/sipcc/include/vcm.h
--- a/media/webrtc/signaling/src/media-conduit/CodecConfig.h
+++ b/media/webrtc/signaling/src/media-conduit/CodecConfig.h
@@ -40,64 +40,91 @@ struct AudioCodecConfig
                                                      mChannels(channels),
                                                      mRate(rate)
 
   {
   }
 };
 
 /*
- * Minimalisitc video codec configuration
+ * Minimalistic video codec configuration
  * More to be added later depending on the use-case
  */
 
-struct VideoCodecConfig
+#define    MAX_SPROP_LEN    128
+
+// used for holding SDP negotiation results
+struct VideoCodecConfigH264
 {
+    char       sprop_parameter_sets[MAX_SPROP_LEN];
+    int        packetization_mode;
+    int        profile_level_id;
+    int        max_mbps;
+    int        max_fs;
+    int        max_cpb;
+    int        max_dpb;
+    int        max_br;
+    int        tias_bw;
+};
+
+
+// class so the std::strings can get freed more easily/reliably
+class VideoCodecConfig
+{
+public:
   /*
    * The data-types for these properties mimic the
    * corresponding webrtc::VideoCodec data-types.
    */
   int mType; // payload type
   std::string mName;
   uint32_t mRtcpFbTypes;
   unsigned int mMaxFrameSize;
   unsigned int mMaxFrameRate;
+  unsigned int mMaxMBPS;    // in macroblocks-per-second
+  unsigned int mMaxBitrate;
+  // max_cpb & max_dpb would be streaming/mode-2 only
+  std::string mSpropParameterSets;
   uint8_t mProfile;
   uint8_t mConstraints;
   uint8_t mLevel;
   uint8_t mPacketizationMode;
   // TODO: add external negotiated SPS/PPS
 
   VideoCodecConfig(int type,
                    std::string name,
                    int rtcpFbTypes,
-                   uint8_t profile = 0x42,
-                   uint8_t constraints = 0xC0,
-                   uint8_t level = 30,
-                   uint8_t packetization = 0) :
-                                     mType(type),
-                                     mName(name),
-                                     mRtcpFbTypes(rtcpFbTypes),
-                                     mMaxFrameSize(0),
-                                     mMaxFrameRate(0),
-                                     mProfile(profile),
-                                     mConstraints(constraints),
-                                     mLevel(level),
-                                     mPacketizationMode(packetization) {}
-
-  VideoCodecConfig(int type,
-                   std::string name,
-                   int rtcpFbTypes,
-                   unsigned int max_fs,
-                   unsigned int max_fr) :
-                                         mType(type),
-                                         mName(name),
-                                         mRtcpFbTypes(rtcpFbTypes),
-                                         mMaxFrameSize(max_fs),
-                                         mMaxFrameRate(max_fr) {}
+                   unsigned int max_fs = 0,
+                   unsigned int max_fr = 0,
+                   const struct VideoCodecConfigH264 *h264 = nullptr) :
+    mType(type),
+    mName(name),
+    mRtcpFbTypes(rtcpFbTypes),
+    mMaxFrameSize(max_fs), // may be overridden
+    mMaxFrameRate(max_fr),
+    mMaxMBPS(0),
+    mMaxBitrate(0),
+    mProfile(0x42),
+    mConstraints(0xE0),
+    mLevel(0x0C),
+    mPacketizationMode(1)
+  {
+    if (h264) {
+      if (max_fs == 0 || (h264->max_fs != 0 && (unsigned int) h264->max_fs < max_fs)) {
+        mMaxFrameSize = h264->max_fs;
+      }
+      mMaxMBPS = h264->max_mbps;
+      mMaxBitrate = h264->max_br;
+      mProfile = (h264->profile_level_id & 0x00FF0000) >> 16;
+      mConstraints = (h264->profile_level_id & 0x0000FF00) >> 8;
+      mLevel = (h264->profile_level_id & 0x000000FF);
+      mPacketizationMode = h264->packetization_mode;
+      mSpropParameterSets = h264->sprop_parameter_sets;
+    }
+  }
 
   bool RtcpFbIsSet(sdp_rtcp_fb_nack_type_e type) const
   {
     return mRtcpFbTypes & sdp_rtcp_fb_nack_to_bitmap(type);
   }
 
   bool RtcpFbIsSet(sdp_rtcp_fb_ack_type_e type) const
   {
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp
@@ -1277,16 +1277,24 @@ WebrtcVideoConduit::CodecConfigToWebRTCC
   cinst.maxBitrate = mMaxBitrate;
 
   if (cinst.codecType == webrtc::kVideoCodecH264)
   {
     cinst.codecSpecific.H264.profile = codecInfo->mProfile;
     cinst.codecSpecific.H264.constraints = codecInfo->mConstraints;
     cinst.codecSpecific.H264.level = codecInfo->mLevel;
     cinst.codecSpecific.H264.packetizationMode = codecInfo->mPacketizationMode;
+    if (codecInfo->mMaxBitrate > 0 && codecInfo->mMaxBitrate < cinst.maxBitrate) {
+      cinst.maxBitrate = codecInfo->mMaxBitrate;
+    }
+    if (codecInfo->mMaxMBPS > 0) {
+      // Not supported yet!
+      CSFLogError(logTag,  "%s H.264 max_mbps not supported yet  ", __FUNCTION__);
+    }
+    // XXX parse the encoded SPS/PPS data
     // paranoia
     cinst.codecSpecific.H264.spsData = nullptr;
     cinst.codecSpecific.H264.spsLen = 0;
     cinst.codecSpecific.H264.ppsData = nullptr;
     cinst.codecSpecific.H264.ppsLen = 0;
   }
 }
 
--- a/media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
+++ b/media/webrtc/signaling/src/media/VcmSIPCCBinding.cpp
@@ -380,33 +380,18 @@ VideoControl * VcmSIPCCBinding::getVideo
 extern "C" {
 
 
 /* MediaTermination APIs expect dynmic payload type in upper 16 bits and
    codec type in lower 16 bits. */
 #define CREATE_MT_MAP(a,b)        ((a << 16) | b)
 #define DYNAMIC_PAYLOAD_TYPE(x)    ((x >> 16) & 0xFFFF)
 
-#define    MAX_SPROP_LEN    32
-
 #define VCM_ERROR -1
 
-struct h264_video
-{
-    char       sprop_parameter_set[MAX_SPROP_LEN];
-    int        packetization_mode;
-    int        profile_level_id;
-    int        max_mbps;
-    int        max_fs;
-    int        max_cpb;
-    int        max_dpb;
-    int        max_br;
-    int        tias_bw;
-};
-
 /**
  *  start/stop ringing
  *
  *  @param[in] ringMode   - VCM ring mode (ON/OFF)
  *  @param[in] once       - type of ring - continuous or one shot.
  *  @param[in] alert_info - header specified ring mode.
  *  @param[in] line       - the line on which to start/stop ringing
  *
@@ -2389,25 +2374,34 @@ static int vcmTxCreateAudioConduit(int l
  *  @param[in]   level        - the m-line index
  *  @param[in]   payload      - codec info
  *  @param[in]   pc           - the peer connection
  *  @param[out]  conduit      - the conduit to create
  */
 static int vcmTxCreateVideoConduit(int level,
                                    const vcm_payload_info_t *payload,
                                    sipcc::PeerConnectionWrapper &pc,
+                                   const vcm_mediaAttrs_t *attrs,
                                    mozilla::RefPtr<mozilla::MediaSessionConduit> &conduit)
 {
   mozilla::VideoCodecConfig *config_raw;
+  struct VideoCodecConfigH264 *negotiated = nullptr;
+
+  if (attrs->video.opaque &&
+      (payload->codec_type == RTP_H264_P0 || payload->codec_type == RTP_H264_P1)) {
+    negotiated = static_cast<struct VideoCodecConfigH264 *>(attrs->video.opaque);
+  }
+
   config_raw = new mozilla::VideoCodecConfig(
     payload->remote_rtp_pt,
     ccsdpCodecName(payload->codec_type),
     payload->video.rtcp_fb_types,
     payload->video.max_fs,
-    payload->video.max_fr);
+    payload->video.max_fr,
+    negotiated);
 
   // Take possession of this pointer
   mozilla::ScopedDeletePtr<mozilla::VideoCodecConfig> config(config_raw);
 
   // Instantiate an appropriate conduit
   mozilla::RefPtr<mozilla::MediaSessionConduit> rx_conduit =
     pc.impl()->media()->GetConduit(level, true);
   MOZ_ASSERT_IF(rx_conduit, rx_conduit->type() == MediaSessionConduit::VIDEO);
@@ -2503,17 +2497,17 @@ static int vcmTxStartICE_m(cc_mcapid_t m
   const char *mediaType;
   mozilla::RefPtr<mozilla::MediaSessionConduit> conduit;
   int err = VCM_ERROR;
   if (CC_IS_AUDIO(mcap_id)) {
     mediaType = "audio";
     err = vcmTxCreateAudioConduit(level, payload, pc, attrs, conduit);
   } else if (CC_IS_VIDEO(mcap_id)) {
     mediaType = "video";
-    err = vcmTxCreateVideoConduit(level, payload, pc, conduit);
+    err = vcmTxCreateVideoConduit(level, payload, pc, attrs, conduit);
   } else {
     CSFLogError(logTag, "%s: mcap_id unrecognized", __FUNCTION__);
   }
   if (err) {
     return err;
   }
 
   pc.impl()->media()->AddConduit(level, false, conduit);
@@ -2952,103 +2946,109 @@ void vcmFreeMediaPtr(void *ptr)
  * @param [in] media_type - codec for which we are negotiating
  * @param [in] sdp_p - opaque SDP pointer to be used via SDP helper APIs
  * @param [in] level - Parameter to be used with SDP helper APIs
  * @param [out] rcapptr - variable to return the allocated attrib structure
  *
  * @return cc_boolean - true if attributes are accepted false otherwise
  */
 
-cc_boolean vcmCheckAttribs(cc_uint32_t media_type, void *sdp_p, int level, void **rcapptr)
+cc_boolean vcmCheckAttribs(cc_uint32_t media_type, void *sdp_p, int level,
+                           int remote_pt, void **rcapptr)
 {
     CSFLogDebug( logTag, "vcmCheckAttribs(): media=%d", media_type);
 
     cc_uint16_t     temp;
     const char      *ptr;
     uint32_t        t_uint;
-    struct h264_video *rcap;
+    struct VideoCodecConfigH264 *rcap;
 
     *rcapptr = nullptr;
 
+    int fmtp_inst = ccsdpAttrGetFmtpInst(sdp_p, level, remote_pt);
+    if (fmtp_inst < 0) {
+      return TRUE;
+    }
+
     switch (media_type)
     {
     case RTP_VP8:
         return TRUE;
 
     case RTP_H264_P0:
     case RTP_H264_P1:
 
-        rcap = (struct h264_video *) cpr_malloc( sizeof(struct h264_video) );
+        rcap = (struct VideoCodecConfigH264 *) cpr_malloc( sizeof(struct VideoCodecConfigH264) );
         if ( rcap == nullptr )
         {
             CSFLogDebug( logTag, "vcmCheckAttribs(): Malloc Failed for rcap");
             return FALSE;
         }
-        memset( rcap, 0, sizeof(struct h264_video) );
-
-        if ( (ptr = ccsdpAttrGetFmtpParamSets(sdp_p, level, 0, 1)) != nullptr )
+        memset( rcap, 0, sizeof(struct VideoCodecConfigH264) );
+
+        if ( (ptr = ccsdpAttrGetFmtpParamSets(sdp_p, level, 0, fmtp_inst)) != nullptr )
         {
-            memset(rcap->sprop_parameter_set, 0, csf_countof(rcap->sprop_parameter_set));
-            sstrncpy(rcap->sprop_parameter_set, ptr, csf_countof(rcap->sprop_parameter_set));
+            memset(rcap->sprop_parameter_sets, 0, csf_countof(rcap->sprop_parameter_sets));
+            sstrncpy(rcap->sprop_parameter_sets, ptr, csf_countof(rcap->sprop_parameter_sets));
         }
 
-        if ( ccsdpAttrGetFmtpPackMode(sdp_p, level, 0, 1, &temp) == SDP_SUCCESS )
+        if ( ccsdpAttrGetFmtpPackMode(sdp_p, level, 0, fmtp_inst, &temp) == SDP_SUCCESS )
         {
             rcap->packetization_mode = temp;
         }
 
-        if ( (ptr = ccsdpAttrGetFmtpProfileLevelId(sdp_p, level, 0, 1)) != nullptr )
+        if ( (ptr = ccsdpAttrGetFmtpProfileLevelId(sdp_p, level, 0, fmtp_inst)) != nullptr )
         {
 #ifdef _WIN32
             sscanf_s(ptr, "%x", &rcap->profile_level_id, sizeof(int*));
 #else
             sscanf(ptr, "%x", &rcap->profile_level_id);
 #endif
         }
 
-        if ( ccsdpAttrGetFmtpMaxMbps(sdp_p, level, 0, 1, &t_uint) == SDP_SUCCESS )
+        if ( ccsdpAttrGetFmtpMaxMbps(sdp_p, level, 0, fmtp_inst, &t_uint) == SDP_SUCCESS )
         {
             rcap->max_mbps = t_uint;
         }
 
-        if ( ccsdpAttrGetFmtpMaxFs(sdp_p, level, 0, 1, &t_uint) == SDP_SUCCESS )
+        if ( ccsdpAttrGetFmtpMaxFs(sdp_p, level, 0, fmtp_inst, &t_uint) == SDP_SUCCESS )
         {
             rcap->max_fs = t_uint;
         }
 
-        if ( ccsdpAttrGetFmtpMaxCpb(sdp_p, level, 0, 1, &t_uint) == SDP_SUCCESS )
+        if ( ccsdpAttrGetFmtpMaxCpb(sdp_p, level, 0, fmtp_inst, &t_uint) == SDP_SUCCESS )
         {
             rcap->max_cpb = t_uint;
         }
 
-        if ( ccsdpAttrGetFmtpMaxCpb(sdp_p, level, 0, 1, &t_uint) == SDP_SUCCESS )
+        if ( ccsdpAttrGetFmtpMaxCpb(sdp_p, level, 0, fmtp_inst, &t_uint) == SDP_SUCCESS )
         {
             rcap->max_dpb = t_uint;
         }
 
-        if ( ccsdpAttrGetFmtpMaxCpb(sdp_p, level, 0, 1, &t_uint) == SDP_SUCCESS )
+        if ( ccsdpAttrGetFmtpMaxCpb(sdp_p, level, 0, fmtp_inst, &t_uint) == SDP_SUCCESS )
         {
             rcap->max_br = t_uint;
         }
 
-        rcap->tias_bw = ccsdpGetBandwidthValue(sdp_p, level, 1);
+        rcap->tias_bw = ccsdpGetBandwidthValue(sdp_p, level, fmtp_inst);
         if ( rcap->tias_bw == 0 )
         {
             // received bandwidth of 0 reject this
             free(rcap);
             return FALSE;
         }
         else if ( rcap->tias_bw == SDP_INVALID_VALUE )
         {
             // bandwidth not received pass 0 to ms
             rcap->tias_bw = 0;
         }
 
         CSFLogDebug( logTag, "vcmCheckAttribs(): Negotiated media attrs\nsprop=%s\npack_mode=%d\nprofile_level_id=%X\nmbps=%d\nmax_fs=%d\nmax_cpb=%d\nmax_dpb=%d\nbr=%d bw=%d\n",
-            rcap->sprop_parameter_set,
+            rcap->sprop_parameter_sets,
             rcap->packetization_mode,
             rcap->profile_level_id,
             rcap->max_mbps,
             rcap->max_fs,
             rcap->max_cpb,
             rcap->max_dpb,
             rcap->max_br,
             rcap->tias_bw);
--- a/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c
@@ -3496,22 +3496,22 @@ gsmsdp_negotiate_codec (fsmdef_dcb_t *dc
                                   DEB_L_C_F_PREFIX_ARGS(GSM, dcb_p->line,
                                   dcb_p->call_id, fname), codec);
                             payload_info->audio.packet_size = -1;
                             payload_info->audio.bitrate = -1;
                         } /* end switch */
 
 
                 } else if (media->type == SDP_MEDIA_VIDEO) {
-                    if ( media-> video != NULL ) {
+                    if ( media->video != NULL ) {
                        vcmFreeMediaPtr(media->video);
                        media->video = NULL;
                     }
 
-                    if (!vcmCheckAttribs(codec, sdp_p, level,
+                    if (!vcmCheckAttribs(codec, sdp_p, level, remote_pt,
                                          &media->video)) {
                           GSM_DEBUG(DEB_L_C_F_PREFIX"codec= %d ignored - "
                                "attribs not accepted\n",
                                DEB_L_C_F_PREFIX_ARGS(GSM, dcb_p->line,
                                dcb_p->call_id, fname), codec);
                           explicit_reject = TRUE;
                           continue; /* keep looking */
                     }
--- a/media/webrtc/signaling/src/sipcc/core/sdp/ccsdp.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/ccsdp.c
@@ -1,15 +1,23 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "sdp.h"
 #include "ccapi.h"
 
+int ccsdpAttrGetFmtpInst(void *sdp_ptr, u16 level, u16 payload_num)
+{
+  cc_sdp_t *sdpp = sdp_ptr;
+  if ( sdpp->dest_sdp == NULL ) {
+    return NULL;
+  }
+  return sdp_find_fmtp_inst(sdpp->dest_sdp, level, payload_num);
+}
 
 const char* ccsdpAttrGetFmtpParamSets(void *sdp_ptr, u16 level,
                                             u8 cap_num, u16 inst_num)
 {
   cc_sdp_t *sdpp = sdp_ptr;
 
   if ( sdpp->dest_sdp == NULL ) {
     return NULL;
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp.h
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp.h
@@ -1220,16 +1220,17 @@ extern sdp_result_e sdp_add_media_profil
                                            sdp_transport_e profile);
 extern sdp_result_e sdp_add_media_payload_type(void *sdp_ptr, u16 level,
                                u16 payload_type, sdp_payload_ind_e indicator);
 extern sdp_result_e sdp_add_media_profile_payload_type(void *sdp_ptr,
                                u16 level, u16 prof_num, u16 payload_type,
                                sdp_payload_ind_e indicator);
 
 /* sdp_attr_access.c */
+extern int sdp_find_fmtp_inst(sdp_t *sdp_ptr, u16 level, u16 payload_num);
 extern sdp_result_e sdp_add_new_attr(void *sdp_ptr, u16 level, u8 cap_num,
                                      sdp_attr_e attr_type, u16 *inst_num);
 extern sdp_result_e sdp_copy_attr (void *src_sdp_ptr, void *dst_sdp_ptr,
                                    u16 src_level, u16 dst_level,
                                    u8 src_cap_num, u8 dst_cap_num,
                                    sdp_attr_e src_attr_type, u16 src_inst_num);
 extern sdp_result_e sdp_copy_all_attrs(void *src_sdp_ptr, void *dst_sdp_ptr,
                                        u16 src_level, u16 dst_level);
--- a/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
+++ b/media/webrtc/signaling/src/sipcc/core/sdp/sdp_attr_access.c
@@ -1731,16 +1731,43 @@ sdp_result_e sdp_find_attr_list (sdp_t *
         }
         cap_p = cap_attr_p->attr.cap_p;
         *attr_p = cap_p->media_attrs_p;
     }
 
     return (SDP_SUCCESS);
 }
 
+/* Find fmtp inst_num with correct payload value or -1 for failure */
+int sdp_find_fmtp_inst (sdp_t *sdp_p, u16 level, u16 payload_num)
+{
+    u16          attr_count=0;
+    sdp_mca_t   *mca_p;
+    sdp_mca_t   *cap_p;
+    sdp_attr_t  *attr_p;
+
+    /* Attr is at a media level */
+    mca_p = sdp_find_media_level(sdp_p, level);
+    if (mca_p == NULL) {
+      return (-1);
+    }
+    for (attr_p = mca_p->media_attrs_p; attr_p != NULL;
+         attr_p = attr_p->next_p) {
+      if (attr_p->type == SDP_ATTR_FMTP) {
+        attr_count++;
+        if (attr_p->attr.fmtp.payload_num == payload_num) {
+          return (attr_count);
+        }
+      }
+    }
+
+    return (-1);
+
+}
+
 /* Function:    sdp_find_attr
  * Description: Find the specified attribute in an SDP structure.
  *              Note: This is not an API for the application but an internal
  *              routine used by the SDP library.
  * Parameters:  sdp_ptr     The SDP handle returned by sdp_init_description.
  *              level       The level to check for the attribute.
  *              cap_num     The capability number associated with the
  *                          attribute if any.  If none, should be zero.
@@ -12623,9 +12650,8 @@ sdp_attr_set_extmap(void *sdp_ptr, u16 l
         sdp_p->conf_p->num_invalid_param++;
         return (SDP_INVALID_PARAMETER);
     }
 
     attr_p->attr.extmap.id = id;
     sstrncpy(attr_p->attr.extmap.uri, uri, SDP_MAX_STRING_LEN+1);
     return (SDP_SUCCESS);
 }
-
--- a/media/webrtc/signaling/src/sipcc/include/ccsdp.h
+++ b/media/webrtc/signaling/src/sipcc/include/ccsdp.h
@@ -259,16 +259,27 @@ typedef enum {
     SDP_SETUP_PASSIVE,
     SDP_SETUP_ACTPASS,
     SDP_SETUP_HOLDCONN,
     SDP_MAX_SETUP,
     SDP_SETUP_UNKNOWN
 } sdp_setup_type_e;
 
 /**
+ * Returns the inst_num value for the specified FTMP attr
+ *
+ * @param[in]  sdp_handle     The SDP handle
+ * @param[in]  level       The level to check for the attribute.
+ *
+ * @return     inst_num    The attribute instance number to check, or -1 for failure
+ */
+
+int ccsdpAttrGetFmtpInst(void *sdp_handle, uint16_t level, uint16_t payload_num);
+
+/**
  * Gets the value of the fmtp attribute- parameter-sets parameter for H.264 codec
  *
  * @param[in]  sdp_handle     The SDP handle
  * @param[in]  level       The level to check for the attribute.
  * @param[in]  cap_num     The capability number associated with the attribute if any.  If none, should be zero.
  * @param[in]  inst_num    The attribute instance number to check.
  *
  * @return      parameter-sets value.
--- a/media/webrtc/signaling/src/sipcc/include/vcm.h
+++ b/media/webrtc/signaling/src/sipcc/include/vcm.h
@@ -1004,22 +1004,24 @@ void vcmSetRtcpDscp(cc_groupid_t group_i
  * attributes are acceptable. If the attributes are acceptable any attribute
  * values if needed by vcmTxStart method should be bundled in the desired
  * structure and its pointer should be returned in rccappptr. This opaque
  * pointer shall be provided again when vcmTxStart is invoked.
  *
  * @param [in] media_type - codec for which we are negotiating
  * @param [in] sdp_p - opaque SDP pointer to be used via SDP helper APIs
  * @param [in] level - Parameter to be used with SDP helper APIs
+ * @param [in] remote_pt - payload type remote is using for this codec
  * @param [out] rcapptr - variable to return the allocated attrib structure
  *
  * @return cc_boolean - true if attributes are accepted false otherwise
  */
 
-cc_boolean vcmCheckAttribs(cc_uint32_t media_type, void *sdp_p, int level, void **rcapptr);
+cc_boolean vcmCheckAttribs(cc_uint32_t media_type, void *sdp_p, int level,
+                           int remote_pt, void **rcapptr);
 
 /**
  * Add Video attributes in the offer/answer SDP
  *
  * This method is called for video codecs only. This method should populate the
  * Video SDP attributes using the SDP helper API
  *
  * @param [in] sdp_p - opaque SDP pointer to be used via SDP helper APIs