Changes between Version 44 and Version 45 of Video_Users_Guide


Ignore:
Timestamp:
Mar 21, 2012 5:07:56 AM (12 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Video_Users_Guide

    v44 v45  
    2626      {{{ 
    2727$ ./configure --enable-shared --disable-static --enable-memalign-hack 
    28                                 # add other options if needed, e.g: optimization, install dir, search path particularly CFLAGS and LDFLAGS for x264 
     28                                # add other options if needed, e.g: optimization, install dir, search path  
     29                                # particularly CFLAGS and LDFLAGS for x264 
    2930                                # to enable H264, add "--enable-gpl --enable-libx264" 
    3031$ make && make install 
     
    3233 1. Optional for H.264: [http://www.videolan.org/developers/x264.html libx264]. We tested with the latest from git (as of October 2011): 
    3334     {{{ 
    34 $ ./configure --enable-static                   # add options if needed, e.g: optimization, install dir, search path 
     35$ ./configure --enable-static      # add options if needed, e.g: optimization, install dir, search path 
    3536$ make && make install-lib-static  # default install dir is /usr/local 
    3637      }}} 
     
    297298{{{ 
    298299const pj_str_t codec_id = {"H264", 4}; 
    299 pjmedia_vid_codec_param *param; 
     300pjmedia_vid_codec_param param; 
    300301 
    301302pjsua_vid_codec_get_param(&codec_id, &param); 
     
    311312    {{{ 
    312313/* Sending 1280 x 720 */ 
    313 pjmedia_vid_codec_param.enc_fmt.vid.size.w = 1280; 
    314 pjmedia_vid_codec_param.enc_fmt.vid.size.h = 720; 
     314param.enc_fmt.vid.size.w = 1280; 
     315param.enc_fmt.vid.size.h = 720; 
    315316    }}} 
    316317    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. 
     
    321322         {{{ 
    322323/* 1st preference: 352 x 288 (CIF) */ 
    323 pjmedia_vid_codec_param.dec_fmtp.param[n].name = pj_str("CIF"); 
     324param.dec_fmtp.param[n].name = pj_str("CIF"); 
    324325/* The value actually specifies framerate, see framerate section below */ 
    325 pjmedia_vid_codec_param.dec_fmtp.param[n].value = pj_str("1"); 
     326param.dec_fmtp.param[n].value = pj_str("1"); 
    326327/* 2nd preference: 176 x 144 (QCIF) */ 
    327 pjmedia_vid_codec_param.dec_fmtp.param[n+1].name = pj_str("QCIF"); 
     328param.dec_fmtp.param[n+1].name = pj_str("QCIF"); 
    328329/* The value actually specifies framerate, see framerate section below */ 
    329 pjmedia_vid_codec_param.dec_fmtp.param[n+1].value = pj_str("1"); 
     330param.dec_fmtp.param[n+1].value = pj_str("1"); 
    330331         }}} 
    331332       - 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: 
    332333         {{{ 
    333334/* Can receive up to 1280×720 @30fps */ 
    334 pjmedia_vid_codec_param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 
     335param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 
    335336/* Set the profile level to "1f", which means level 3.1 */ 
    336 pjmedia_vid_codec_param.dec_fmtp.param[n].value = pj_str("xxxx1f"); 
     337param.dec_fmtp.param[n].value = pj_str("xxxx1f"); 
    337338         }}} 
    338339 
     
    344345    {{{ 
    345346/* Sending @30fps */ 
    346 pjmedia_vid_codec_param.enc_fmt.vid.fps.num   = 30; 
    347 pjmedia_vid_codec_param.enc_fmt.vid.fps.denum = 1; 
     347param.enc_fmt.vid.fps.num   = 30; 
     348param.enc_fmt.vid.fps.denum = 1; 
    348349    }}} 
    349350    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. 
     
    354355         {{{ 
    355356/* 3000/(1.001*2) fps for CIF */ 
    356 pjmedia_vid_codec_param.dec_fmtp.param[m].name = pj_str("CIF"); 
    357 pjmedia_vid_codec_param.dec_fmtp.param[m].value = pj_str("2"); 
     357param.dec_fmtp.param[m].name = pj_str("CIF"); 
     358param.dec_fmtp.param[m].value = pj_str("2"); 
    358359/* 3000/(1.001*1) fps for QCIF */ 
    359 pjmedia_vid_codec_param.dec_fmtp.param[n].name = pj_str("QCIF"); 
    360 pjmedia_vid_codec_param.dec_fmtp.param[n].value = pj_str("1"); 
     360param.dec_fmtp.param[n].name = pj_str("QCIF"); 
     361param.dec_fmtp.param[n].value = pj_str("1"); 
    361362         }}} 
    362363       - 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: 
    363364         {{{ 
    364365/* Can receive up to 1280×720 @30fps */ 
    365 pjmedia_vid_codec_param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 
    366 pjmedia_vid_codec_param.dec_fmtp.param[n].value = pj_str("xxxx1f"); 
     366param.dec_fmtp.param[n].name = pj_str("profile-level-id"); 
     367param.dec_fmtp.param[n].value = pj_str("xxxx1f"); 
    367368         }}} 
    368369 
     
    374375{{{ 
    375376/* Bitrate range preferred: 512-1024kbps */ 
    376 pjmedia_vid_codec_param.enc_fmt.vid.avg_bps = 512000; 
    377 pjmedia_vid_codec_param.enc_fmt.vid.max_bps = 1024000; 
     377param.enc_fmt.vid.avg_bps = 512000; 
     378param.enc_fmt.vid.max_bps = 1024000; 
    378379}}} 
    379380 
     
    385386   {{{ 
    386387/* H263 specific maximum bitrate 512kbps */ 
    387 pjmedia_vid_codec_param.dec_fmtp.param[n].name = pj_str("MaxBR"); 
    388 pjmedia_vid_codec_param.dec_fmtp.param[n].value = pj_str("5120"); /* = max_bps / 100 */ 
     388param.dec_fmtp.param[n].name = pj_str("MaxBR"); 
     389param.dec_fmtp.param[n].value = pj_str("5120"); /* = max_bps / 100 */ 
    389390   }}} 
    390391