- Timestamp:
- Mar 2, 2011 8:37:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c
r3432 r3435 182 182 /**< expected output format of 183 183 ffmpeg decoder */ 184 struct SwsContext *sws_ctx; /**< the format converter for185 post decoding */186 187 184 } ffmpeg_private; 188 185 … … 207 204 pjmedia_vid_codec_info info; 208 205 pjmedia_format_id base_fmt_id; 206 pj_uint32_t avg_bps; 207 pj_uint32_t max_bps; 209 208 func_packetize packetize; 210 209 func_unpacketize unpacketize; … … 248 247 { 249 248 {PJMEDIA_FORMAT_H263P, {"H263-1998",9}, PJMEDIA_RTP_PT_H263}, 250 PJMEDIA_FORMAT_H263, 249 PJMEDIA_FORMAT_H263, 1000000, 2000000, 251 250 &h263_packetize, &h263_unpacketize, &h263_parse_fmtp, 252 251 {2, { {{"CIF",3}, {"2",1}}, {{"QCIF",4}, {"1",1}}, } }, … … 254 253 { 255 254 {PJMEDIA_FORMAT_H263, {"H263",4}, PJMEDIA_RTP_PT_H263}, 256 0, 255 0, 1000000, 2000000, 257 256 &h263_packetize, &h263_unpacketize, &h263_parse_fmtp, 258 257 {2, { {{"CIF",3}, {"2",1}}, {{"QCIF",4}, {"1",1}}, } }, … … 802 801 attr->dec_fmtp = desc->dec_fmtp; 803 802 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 804 807 return PJ_SUCCESS; 805 808 } … … 989 992 ctx->time_base.num = vfd->fps.denum; 990 993 ctx->time_base.den = vfd->fps.num; 991 if (vfd->avg_bps) 994 if (vfd->avg_bps) { 992 995 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 } 995 999 996 1000 /* For encoder, should be better to be strict to the standards */ … … 1124 1128 av_free(ff->dec_ctx); 1125 1129 } 1126 if (ff->sws_ctx) {1127 sws_freeContext(ff->sws_ctx);1128 }1129 1130 ff->enc_ctx = NULL; 1130 1131 ff->dec_ctx = NULL; 1131 ff->sws_ctx = NULL;1132 1132 pj_mutex_unlock(ff_mutex); 1133 1133 … … 1409 1409 #ifdef _MSC_VER 1410 1410 # pragma comment( lib, "avcodec.lib") 1411 # pragma comment( lib, "swscale.lib")1412 1411 #endif 1413 1412
Note: See TracChangeset
for help on using the changeset viewer.