Changes between Version 45 and Version 46 of Video_Users_Guide


Ignore:
Timestamp:
Apr 2, 2012 2:20:49 AM (7 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Video_Users_Guide

    v45 v46  
    309309Specify video picture dimension. 
    310310 
    311  a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt.vid.size}}}, e.g: 
     311 a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt.det.vid.size}}}, e.g: 
    312312    {{{ 
    313313/* Sending 1280 x 720 */ 
    314 param.enc_fmt.vid.size.w = 1280; 
    315 param.enc_fmt.vid.size.h = 720; 
     314param.enc_fmt.det.vid.size.w = 1280; 
     315param.enc_fmt.det.vid.size.h = 720; 
    316316    }}} 
    317317    Note that there is a possibility that the value will be adjusted to follow remote capability. For example, if remote signals that maximum resolution supported is 640 x 480 and locally the encoding direction size is set to 1280 x 720, then 640 x 480 will be used. 
    318318 b. For decoding direction, two steps are needed: 
    319     1. {{{pjmedia_vid_codec_param.dec_fmt.vid.size}}} should be set to the highest value expected for incoming video size. 
     319    1. {{{pjmedia_vid_codec_param.dec_fmt.det.vid.size}}} should be set to the highest value expected for incoming video size. 
    320320    2. signalling to remote, configured via codec specific SDP format parameter (fmtp): {{{pjmedia_vid_codec_param.dec_fmtp}}}. 
    321321       - H263-1998, e.g: 
     
    324324param.dec_fmtp.param[n].name = pj_str("CIF"); 
    325325/* The value actually specifies framerate, see framerate section below */ 
    326 param.dec_fmtp.param[n].value = pj_str("1"); 
     326param.dec_fmtp.param[n].val = pj_str("1"); 
    327327/* 2nd preference: 176 x 144 (QCIF) */ 
    328328param.dec_fmtp.param[n+1].name = pj_str("QCIF"); 
    329329/* The value actually specifies framerate, see framerate section below */ 
    330 param.dec_fmtp.param[n+1].value = pj_str("1"); 
     330param.dec_fmtp.param[n+1].val = pj_str("1"); 
    331331         }}} 
    332332       - H264, the size is implicitly specified in H264 level (check the standard specification or [http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels this]) and on SDP, the H264 level is signalled via H264 SDP fmtp [http://tools.ietf.org/html/rfc6184#section-8.1 profile-level-id], e.g: 
     
    335335param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 
    336336/* Set the profile level to "1f", which means level 3.1 */ 
    337 param.dec_fmtp.param[n].value = pj_str("xxxx1f"); 
     337param.dec_fmtp.param[n].val = pj_str("xxxx1f"); 
    338338         }}} 
    339339 
     
    342342Specify number of frames processed per second. 
    343343 
    344  a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt.vid.fps}}}, e.g: 
     344 a. For encoding direction, configured via {{{pjmedia_vid_codec_param.enc_fmt.det.vid.fps}}}, e.g: 
    345345    {{{ 
    346346/* Sending @30fps */ 
    347 param.enc_fmt.vid.fps.num   = 30; 
    348 param.enc_fmt.vid.fps.denum = 1; 
     347param.enc_fmt.det.vid.fps.num   = 30; 
     348param.enc_fmt.det.vid.fps.denum = 1; 
    349349    }}} 
    350350    Note that there is a possibility that the value will be adjusted to follow remote capability. For example, if remote signals that maximum framerate supported is 10fps and locally the encoding direction framerate is set to 30fps, then 10fps will be used. 
    351351 b. For decoding direction, two steps are needed: 
    352     1. {{{pjmedia_vid_codec_param.dec_fmt.vid.fps}}} should be set to the highest value expected for incoming video framerate. Note that it is even better if this is set to 1.5x (or more) of the expected incoming framerate because the renderer will use this setting for its clock and there is always possibility that remote clock runs a bit faster (clock drift), so setting it higher will avoid high latency issue caused by clock drift. 
     352    1. {{{pjmedia_vid_codec_param.dec_fmt.det.vid.fps}}} should be set to the highest value expected for incoming video framerate. Note that it is even better if this is set to 1.5x (or more) of the expected incoming framerate because the renderer will use this setting for its clock and there is always possibility that remote clock runs a bit faster (clock drift), so setting it higher will avoid high latency issue caused by clock drift. 
    353353    2. signalling to remote, configured via codec specific SDP format parameter (fmtp): {{{pjmedia_vid_codec_param.dec_fmtp}}}. 
    354354       - H263-1998, maximum framerate is specified per size/resolution basis, check [http://tools.ietf.org/html/rfc4629#section-8.1.1 here] for more info. 
     
    356356/* 3000/(1.001*2) fps for CIF */ 
    357357param.dec_fmtp.param[m].name = pj_str("CIF"); 
    358 param.dec_fmtp.param[m].value = pj_str("2"); 
     358param.dec_fmtp.param[m].val = pj_str("2"); 
    359359/* 3000/(1.001*1) fps for QCIF */ 
    360360param.dec_fmtp.param[n].name = pj_str("QCIF"); 
    361 param.dec_fmtp.param[n].value = pj_str("1"); 
     361param.dec_fmtp.param[n].val = pj_str("1"); 
    362362         }}} 
    363363       - H264, similar to size/resolution, the framerate is implicitly specified in H264 level (check the standard specification, or http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels) and the H264 level is signalled via H264 SDP fmtp {{{profile-level-id}}}, e.g: 
     
    365365/* Can receive up to 1280×720 @30fps */ 
    366366param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 
    367 param.dec_fmtp.param[n].value = pj_str("xxxx1f"); 
     367param.dec_fmtp.param[n].val = pj_str("xxxx1f"); 
    368368         }}} 
    369369 
     
    372372Specify bandwidth requirement for video payloads stream delivery. 
    373373 
    374 This is configurable via {{{pjmedia_vid_codec_param.enc_fmt.vid.avg_bps}}} and {{{pjmedia_vid_codec_param.enc_fmt.vid.max_bps}}}, e.g: 
     374This is configurable via {{{pjmedia_vid_codec_param.enc_fmt.det.vid.avg_bps}}} and {{{pjmedia_vid_codec_param.enc_fmt.det.vid.max_bps}}}, e.g: 
    375375{{{ 
    376376/* Bitrate range preferred: 512-1024kbps */ 
    377 param.enc_fmt.vid.avg_bps = 512000; 
    378 param.enc_fmt.vid.max_bps = 1024000; 
     377param.enc_fmt.det.vid.avg_bps = 512000; 
     378param.enc_fmt.det.vid.max_bps = 1024000; 
    379379}}} 
    380380 
     
    387387/* H263 specific maximum bitrate 512kbps */ 
    388388param.dec_fmtp.param[n].name = pj_str("MaxBR"); 
    389 param.dec_fmtp.param[n].value = pj_str("5120"); /* = max_bps / 100 */ 
     389param.dec_fmtp.param[n].val = pj_str("5120"); /* = max_bps / 100 */ 
    390390   }}} 
    391391