Mercurial > mplayer.hg
comparison libmpcodecs/vd_ffmpeg.c @ 32768:3544ba7244bf
Change deprecated PKT_FLAG_KEY, CODEC_TYPE_* and SAMPLE_FMT_* to their
new names.
author | reimar |
---|---|
date | Sat, 05 Feb 2011 14:02:49 +0000 |
parents | cf80c8f31a1b |
children | fafbc46915db |
comparison
equal
deleted
inserted
replaced
32767:414aaa8b9357 | 32768:3544ba7244bf |
---|---|
196 | 196 |
197 if(ptr){ | 197 if(ptr){ |
198 if(!strcmp(avc->class_name, "AVCodecContext")){ | 198 if(!strcmp(avc->class_name, "AVCodecContext")){ |
199 AVCodecContext *s= ptr; | 199 AVCodecContext *s= ptr; |
200 if(s->codec){ | 200 if(s->codec){ |
201 if(s->codec->type == CODEC_TYPE_AUDIO){ | 201 if(s->codec->type == AVMEDIA_TYPE_AUDIO){ |
202 if(s->codec->decode) | 202 if(s->codec->decode) |
203 type= MSGT_DECAUDIO; | 203 type= MSGT_DECAUDIO; |
204 }else if(s->codec->type == CODEC_TYPE_VIDEO){ | 204 }else if(s->codec->type == AVMEDIA_TYPE_VIDEO){ |
205 if(s->codec->decode) | 205 if(s->codec->decode) |
206 type= MSGT_DECVIDEO; | 206 type= MSGT_DECVIDEO; |
207 } | 207 } |
208 //FIXME subtitles, encoders (what msgt for them? there is no appropriate ...) | 208 //FIXME subtitles, encoders (what msgt for them? there is no appropriate ...) |
209 } | 209 } |
290 | 290 |
291 ctx->pic = avcodec_alloc_frame(); | 291 ctx->pic = avcodec_alloc_frame(); |
292 ctx->avctx = avcodec_alloc_context(); | 292 ctx->avctx = avcodec_alloc_context(); |
293 avctx = ctx->avctx; | 293 avctx = ctx->avctx; |
294 avctx->opaque = sh; | 294 avctx->opaque = sh; |
295 avctx->codec_type = CODEC_TYPE_VIDEO; | 295 avctx->codec_type = AVMEDIA_TYPE_VIDEO; |
296 avctx->codec_id = lavc_codec->id; | 296 avctx->codec_id = lavc_codec->id; |
297 | 297 |
298 #if CONFIG_VDPAU | 298 #if CONFIG_VDPAU |
299 if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ | 299 if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){ |
300 avctx->get_format = get_format; | 300 avctx->get_format = get_format; |
832 ((int *)data)[0], ((int *)data)[1], ((int *)data)[2], ((int *)data)[3]); | 832 ((int *)data)[0], ((int *)data)[1], ((int *)data)[2], ((int *)data)[3]); |
833 av_init_packet(&pkt); | 833 av_init_packet(&pkt); |
834 pkt.data = data; | 834 pkt.data = data; |
835 pkt.size = len; | 835 pkt.size = len; |
836 // HACK: make PNGs decode normally instead of as CorePNG delta frames | 836 // HACK: make PNGs decode normally instead of as CorePNG delta frames |
837 pkt.flags = PKT_FLAG_KEY; | 837 pkt.flags = AV_PKT_FLAG_KEY; |
838 ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt); | 838 ret = avcodec_decode_video2(avctx, pic, &got_picture, &pkt); |
839 | 839 |
840 dr1= ctx->do_dr1; | 840 dr1= ctx->do_dr1; |
841 if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n"); | 841 if(ret<0) mp_msg(MSGT_DECVIDEO, MSGL_WARN, "Error while decoding frame!\n"); |
842 //printf("repeat: %d\n", pic->repeat_pict); | 842 //printf("repeat: %d\n", pic->repeat_pict); |