X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fcinelerra%2Fffmpeg.h;h=8400751bc5f63329f8c6271c2d509f88e7675b79;hb=5aad2133f228b736f033d6c48e1629078b858286;hp=28b191489c950117049afe3c0ba23ddc2009a7fe;hpb=91efd376233a15f6572e6f68d28a5bee69797e87;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/cinelerra/ffmpeg.h b/cinelerra-5.0/cinelerra/ffmpeg.h index 28b19148..8400751b 100644 --- a/cinelerra-5.0/cinelerra/ffmpeg.h +++ b/cinelerra-5.0/cinelerra/ffmpeg.h @@ -77,9 +77,12 @@ public: virtual int encode_activate(); virtual int decode_activate(); int read_packet(); + int write_packet(FFPacket &pkt); + int flush(); int decode(AVFrame *frame); virtual int decode_frame(AVFrame *frame, int &got_frame) = 0; + virtual int encode_frame(FFPacket &pkt, AVFrame *frame, int &got_frame) = 0; virtual int init_frame(AVFrame *frame) = 0; virtual int create_filter(const char *filter_spec, AVCodecContext *src_ctx, AVCodecContext *sink_ctx) = 0; @@ -153,6 +156,7 @@ public: virtual ~FFAudioStream(); int load_history(uint8_t **data, int len); int decode_frame(AVFrame *frame, int &got_frame); + int encode_frame(FFPacket &pkt, AVFrame *frame, int &got_frame); int create_filter(const char *filter_spec, AVCodecContext *src_ctx, AVCodecContext *sink_ctx); @@ -183,6 +187,7 @@ public: FFVideoStream(FFMPEG *ffmpeg, AVStream *strm, int idx); virtual ~FFVideoStream(); int decode_frame(AVFrame *frame, int &got_frame); + int encode_frame(FFPacket &pkt, AVFrame *frame, int &got_frame); int create_filter(const char *filter_spec, AVCodecContext *src_ctx, AVCodecContext *sink_ctx); @@ -222,7 +227,7 @@ public: int check_sample_rate(AVCodec *codec, int sample_rate); AVRational check_frame_rate(AVCodec *codec, double frame_rate); - AVRational to_sample_aspect_ratio(double aspect_ratio); + AVRational to_sample_aspect_ratio(Asset *asset); AVRational to_time_base(int sample_rate); static void set_option_path(char *path, const char *fmt, ...);