comparison h263dec.c @ 10788:0c8f9288b5e4 libavcodec

Split flv decoding out.
author michael
date Thu, 07 Jan 2010 05:36:45 +0000
parents 1d22da3122b9
children 48adb5a1b47b
comparison
equal deleted inserted replaced
10787:3f8e40fe25c2 10788:0c8f9288b5e4
31 #include "mpegvideo.h" 31 #include "mpegvideo.h"
32 #include "h263_parser.h" 32 #include "h263_parser.h"
33 #include "mpeg4video_parser.h" 33 #include "mpeg4video_parser.h"
34 #include "msmpeg4.h" 34 #include "msmpeg4.h"
35 #include "vdpau_internal.h" 35 #include "vdpau_internal.h"
36 #include "flv.h"
36 37
37 //#define DEBUG 38 //#define DEBUG
38 //#define PRINT_FRAME_TIME 39 //#define PRINT_FRAME_TIME
39 40
40 av_cold int ff_h263_decode_init(AVCodecContext *avctx) 41 av_cold int ff_h263_decode_init(AVCodecContext *avctx)
412 ret = ff_mpeg4_decode_picture_header(s, &gb); 413 ret = ff_mpeg4_decode_picture_header(s, &gb);
413 } 414 }
414 ret = ff_mpeg4_decode_picture_header(s, &s->gb); 415 ret = ff_mpeg4_decode_picture_header(s, &s->gb);
415 } else if (s->codec_id == CODEC_ID_H263I) { 416 } else if (s->codec_id == CODEC_ID_H263I) {
416 ret = intel_h263_decode_picture_header(s); 417 ret = intel_h263_decode_picture_header(s);
417 } else if (s->h263_flv) { 418 } else if (CONFIG_FLV_DECODER && s->h263_flv) {
418 ret = flv_h263_decode_picture_header(s); 419 ret = ff_flv_decode_picture_header(s);
419 } else { 420 } else {
420 ret = h263_decode_picture_header(s); 421 ret = h263_decode_picture_header(s);
421 } 422 }
422 423
423 if(ret==FRAME_SKIPPED) return get_consumed_bytes(s, buf_size); 424 if(ret==FRAME_SKIPPED) return get_consumed_bytes(s, buf_size);
825 NULL, 826 NULL,
826 ff_h263_decode_end, 827 ff_h263_decode_end,
827 ff_h263_decode_frame, 828 ff_h263_decode_frame,
828 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1, 829 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
829 .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"), 830 .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"),
830 .pix_fmts= ff_pixfmt_list_420,
831 };
832
833 AVCodec flv_decoder = {
834 "flv",
835 CODEC_TYPE_VIDEO,
836 CODEC_ID_FLV1,
837 sizeof(MpegEncContext),
838 ff_h263_decode_init,
839 NULL,
840 ff_h263_decode_end,
841 ff_h263_decode_frame,
842 CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
843 .long_name= NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"),
844 .pix_fmts= ff_pixfmt_list_420, 831 .pix_fmts= ff_pixfmt_list_420,
845 }; 832 };
846 833
847 #if CONFIG_MPEG4_VDPAU_DECODER 834 #if CONFIG_MPEG4_VDPAU_DECODER
848 AVCodec mpeg4_vdpau_decoder = { 835 AVCodec mpeg4_vdpau_decoder = {