Changeset 4006 for pjproject


Ignore:
Timestamp:
Apr 2, 2012 8:40:54 AM (13 years ago)
Author:
nanang
Message:

Misc (re #1446): Added macro PJMEDIA_MAX_VID_PAYLOAD_SIZE, also updated the default encoding MTU of ffmpeg codec & H263/H264 packetizers to this macro setting.

Location:
pjproject/trunk/pjmedia
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/config.h

    r3999 r4006  
    11601160#endif 
    11611161 
     1162 
     1163/** 
     1164 * Maximum video payload size. Note that this must not be greater than 
     1165 * PJMEDIA_MAX_MTU. 
     1166 * 
     1167 * Default: (PJMEDIA_MAX_MTU - 100) 
     1168 */ 
     1169#ifndef PJMEDIA_MAX_VID_PAYLOAD_SIZE                     
     1170#  define PJMEDIA_MAX_VID_PAYLOAD_SIZE          (PJMEDIA_MAX_MTU - 100) 
     1171#endif 
     1172 
     1173 
    11621174/** 
    11631175 * @} 
  • pjproject/trunk/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c

    r3998 r4006  
    933933    attr->enc_fmt.det.vid.max_bps = desc->max_bps; 
    934934 
    935     /* MTU */ 
    936     attr->enc_mtu = PJMEDIA_MAX_MTU; 
     935    /* Encoding MTU */ 
     936    attr->enc_mtu = PJMEDIA_MAX_VID_PAYLOAD_SIZE; 
    937937 
    938938    return PJ_SUCCESS; 
     
    12141214 
    12151215    pj_memcpy(&ff->param, attr, sizeof(*attr)); 
     1216 
     1217    /* Normalize encoding MTU in codec param */ 
     1218    if (attr->enc_mtu > PJMEDIA_MAX_VID_PAYLOAD_SIZE) 
     1219        attr->enc_mtu = PJMEDIA_MAX_VID_PAYLOAD_SIZE; 
    12161220 
    12171221    /* Open the codec */ 
  • pjproject/trunk/pjmedia/src/pjmedia-codec/h263_packetizer.c

    r3715 r4006  
    9999    } else { 
    100100        p_->cfg.mode = PJMEDIA_H263_PACKETIZER_MODE_RFC4629; 
    101         p_->cfg.mtu = PJMEDIA_MAX_MTU; 
     101        p_->cfg.mtu = PJMEDIA_MAX_VID_PAYLOAD_SIZE; 
    102102    } 
    103103 
  • pjproject/trunk/pjmedia/src/pjmedia-codec/h264_packetizer.c

    r3819 r4006  
    105105    } else { 
    106106        p_->cfg.mode = PJMEDIA_H264_PACKETIZER_MODE_NON_INTERLEAVED; 
    107         p_->cfg.mtu = PJMEDIA_MAX_MTU; 
     107        p_->cfg.mtu = PJMEDIA_MAX_VID_PAYLOAD_SIZE; 
    108108    } 
    109109 
Note: See TracChangeset for help on using the changeset viewer.