r1006: configure: Use libx264_pic instead of libx264 if available.
[cinelerra_cv/mob.git] / cinelerra / ffmpeg.h
blobedd4478a019c0a5688821e738a3a2e98bea2105a
1 #ifndef FFMPEG_H
2 #define FFMPEG_H
4 #include <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 */