Ignore:
Timestamp:
Mar 2, 2011 8:37:31 AM (13 years ago)
Author:
nanang
Message:

Re #1182:

  • Added remote frame-rate detection in to video stream.
  • Fixed bitrate settings in ffmpeg codec.
  • Fixed SDL dev to update internal SDL info when format changed.
  • Minor fixes/updates, e.g:
    • added cleanup steps, fixed logs, etc, in sample app simpleua.c and vid_streamutil.c
    • fixed/added docs of the new APIs in the jitter buffer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c

    r3432 r3435  
    182182                                                /**< expected output format of  
    183183                                                     ffmpeg decoder         */ 
    184     struct SwsContext               *sws_ctx;   /**< the format converter for  
    185                                                      post decoding          */ 
    186  
    187184} ffmpeg_private; 
    188185 
     
    207204    pjmedia_vid_codec_info       info; 
    208205    pjmedia_format_id            base_fmt_id; 
     206    pj_uint32_t                  avg_bps; 
     207    pj_uint32_t                  max_bps; 
    209208    func_packetize               packetize; 
    210209    func_unpacketize             unpacketize; 
     
    248247    { 
    249248        {PJMEDIA_FORMAT_H263P,  {"H263-1998",9},    PJMEDIA_RTP_PT_H263}, 
    250         PJMEDIA_FORMAT_H263, 
     249        PJMEDIA_FORMAT_H263,    1000000,    2000000, 
    251250        &h263_packetize, &h263_unpacketize, &h263_parse_fmtp, 
    252251        {2, { {{"CIF",3}, {"2",1}}, {{"QCIF",4}, {"1",1}}, } }, 
     
    254253    { 
    255254        {PJMEDIA_FORMAT_H263,   {"H263",4},         PJMEDIA_RTP_PT_H263}, 
    256         0, 
     255        0,                      1000000,    2000000, 
    257256        &h263_packetize, &h263_unpacketize, &h263_parse_fmtp, 
    258257        {2, { {{"CIF",3}, {"2",1}}, {{"QCIF",4}, {"1",1}}, } }, 
     
    802801    attr->dec_fmtp = desc->dec_fmtp; 
    803802 
     803    /* Bitrate */ 
     804    attr->enc_fmt.det.vid.avg_bps = desc->avg_bps; 
     805    attr->enc_fmt.det.vid.max_bps = desc->max_bps; 
     806 
    804807    return PJ_SUCCESS; 
    805808} 
     
    989992            ctx->time_base.num = vfd->fps.denum; 
    990993            ctx->time_base.den = vfd->fps.num; 
    991             if (vfd->avg_bps) 
     994            if (vfd->avg_bps) { 
    992995                ctx->bit_rate = vfd->avg_bps; 
    993             if (vfd->max_bps) 
    994                 ctx->rc_max_rate = vfd->max_bps; 
     996                if (vfd->max_bps) 
     997                    ctx->bit_rate_tolerance = vfd->max_bps - vfd->avg_bps; 
     998            } 
    995999 
    9961000            /* For encoder, should be better to be strict to the standards */ 
     
    11241128        av_free(ff->dec_ctx); 
    11251129    } 
    1126     if (ff->sws_ctx) { 
    1127         sws_freeContext(ff->sws_ctx); 
    1128     } 
    11291130    ff->enc_ctx = NULL; 
    11301131    ff->dec_ctx = NULL; 
    1131     ff->sws_ctx = NULL; 
    11321132    pj_mutex_unlock(ff_mutex); 
    11331133 
     
    14091409#ifdef _MSC_VER 
    14101410#   pragma comment( lib, "avcodec.lib") 
    1411 #   pragma comment( lib, "swscale.lib") 
    14121411#endif 
    14131412 
Note: See TracChangeset for help on using the changeset viewer.