r807: Minor fix...
[cinelerra_cv/mob.git] / cinelerra / ffmpeg.h
blobfcfdcf56f1b6b1adc76605bd5f8acdbac1aa99da
1 #ifndef FFMPEG_H
2 #define FFMPEG_H
4 #include "ffmpeg/libavcodec/avcodec.h"
6 #include "asset.h"
7 #include "guicast.h"
9 #define FFMPEG_LATENCY -9
11 class FFMPEG
13 public:
14 FFMPEG(Asset *asset_in);
15 ~FFMPEG();
16 int init(char *codec_string);
17 int decode(uint8_t *data, long data_size, VFrame *frame_out);
19 static int convert_cmodel(AVPicture *picture_in, PixelFormat pix_fmt,
20 int width_in, int height_in,
21 VFrame *frame_out);
22 static int convert_cmodel(VFrame *frame_in, VFrame *frame_out);
24 static int convert_cmodel_transfer(VFrame *frame_in,VFrame *frame_out);
25 static int init_picture_from_frame(AVPicture *picture, VFrame *frame);
27 static CodecID codec_id(char *codec_string);
29 private:
30 static PixelFormat color_model_to_pix_fmt(int color_model);
31 static int pix_fmt_to_color_model(PixelFormat pix_fmt);
33 int got_picture;
34 Asset *asset;
35 AVCodec *codec;
36 AVCodecContext *context;
37 AVFrame *picture;
41 #endif /* FFMPEG_H */