projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Credit ffmpeg team - security fix for ffmpeg 5.1
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
ffmpeg.h
diff --git
a/cinelerra-5.1/cinelerra/ffmpeg.h
b/cinelerra-5.1/cinelerra/ffmpeg.h
index 18516d3611c1bd5a6116698a290622ca8e477f75..af5e43000b639dd4f1d478fc75254d85e0fac21d 100644
(file)
--- a/
cinelerra-5.1/cinelerra/ffmpeg.h
+++ b/
cinelerra-5.1/cinelerra/ffmpeg.h
@@
-28,6
+28,9
@@
extern "C" {
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavcodec/avcodec.h"
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59,18,100)
+#include "libavcodec/bsf.h"
+#endif
#include "libavfilter/avfilter.h"
#include "libavutil/avutil.h"
#include "libavfilter/buffersrc.h"
#include "libavfilter/avfilter.h"
#include "libavutil/avutil.h"
#include "libavfilter/buffersrc.h"
@@
-86,7
+89,11
@@
public:
virtual int encode_activate();
virtual int decode_activate();
virtual AVHWDeviceType decode_hw_activate();
virtual int encode_activate();
virtual int decode_activate();
virtual AVHWDeviceType decode_hw_activate();
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59,16,100)
+ virtual int decode_hw_format(const AVCodec *decoder, AVHWDeviceType type);
+#else
virtual int decode_hw_format(AVCodec *decoder, AVHWDeviceType type);
virtual int decode_hw_format(AVCodec *decoder, AVHWDeviceType type);
+#endif
virtual int write_packet(FFPacket &pkt);
int read_packet();
int seek(int64_t no, double rate);
virtual int write_packet(FFPacket &pkt);
int read_packet();
int seek(int64_t no, double rate);
@@
-99,11
+106,12
@@
public:
virtual int decode_frame(AVFrame *frame) = 0;
virtual int encode_frame(AVFrame *frame) = 0;
virtual int init_frame(AVFrame *frame) = 0;
virtual int decode_frame(AVFrame *frame) = 0;
virtual int encode_frame(AVFrame *frame) = 0;
virtual int init_frame(AVFrame *frame) = 0;
- virtual int create_filter(const char *filter_spec
, AVCodecParameters *avpar
) = 0;
+ virtual int create_filter(const char *filter_spec) = 0;
virtual void load_markers() = 0;
virtual IndexMarks *get_markers() = 0;
virtual void load_markers() = 0;
virtual IndexMarks *get_markers() = 0;
- int create_filter(const char *filter_spec);
- int load_filter(AVFrame *frame);
+ int insert_filter(const char *name, const char *arg, const char *inst_name=0);
+ int config_filters(const char *filter_spec, AVFilterContext *fsrc);
+ virtual int load_filter(AVFrame *frame);
int read_filter(AVFrame *frame);
int read_frame(AVFrame *frame);
int open_stats_file();
int read_filter(AVFrame *frame);
int read_frame(AVFrame *frame);
int open_stats_file();
@@
-117,8
+125,10
@@
public:
AVFormatContext *fmt_ctx;
AVCodecContext *avctx;
AVFormatContext *fmt_ctx;
AVCodecContext *avctx;
- AVFilterContext *buffersink_ctx;
+ AVFilterContext *filt_ctx;
+ int filt_id;
AVFilterContext *buffersrc_ctx;
AVFilterContext *buffersrc_ctx;
+ AVFilterContext *buffersink_ctx;
AVFilterGraph *filter_graph;
AVFrame *frame, *fframe;
AVFrame *probe_frame;
AVFilterGraph *filter_graph;
AVFrame *frame, *fframe;
AVFrame *probe_frame;
@@
-135,7
+145,7
@@
public:
int64_t seek_pos, curr_pos;
int fidx;
int reading, writing;
int64_t seek_pos, curr_pos;
int fidx;
int reading, writing;
- int seeked, eof;
+ int seek
ing, seek
ed, eof;
int hw_pixfmt;
AVBufferRef *hw_device_ctx;
int hw_pixfmt;
AVBufferRef *hw_device_ctx;
@@
-177,7
+187,7
@@
public:
int load_history(uint8_t **data, int len);
int decode_frame(AVFrame *frame);
int encode_frame(AVFrame *frame);
int load_history(uint8_t **data, int len);
int decode_frame(AVFrame *frame);
int encode_frame(AVFrame *frame);
- int create_filter(const char *filter_spec
, AVCodecParameters *avpar
);
+ int create_filter(const char *filter_spec);
void load_markers();
IndexMarks *get_markers();
void load_markers();
IndexMarks *get_markers();
@@
-243,21
+253,28
@@
public:
int is_video() { return 1; }
int decode_frame(AVFrame *frame);
AVHWDeviceType decode_hw_activate();
int is_video() { return 1; }
int decode_frame(AVFrame *frame);
AVHWDeviceType decode_hw_activate();
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59,16,100)
+ int decode_hw_format(const AVCodec *decoder, AVHWDeviceType type);
+#else
int decode_hw_format(AVCodec *decoder, AVHWDeviceType type);
int decode_hw_format(AVCodec *decoder, AVHWDeviceType type);
+#endif
AVHWDeviceType encode_hw_activate(const char *hw_dev);
int encode_hw_write(FFrame *picture);
int encode_frame(AVFrame *frame);
AVHWDeviceType encode_hw_activate(const char *hw_dev);
int encode_hw_write(FFrame *picture);
int encode_frame(AVFrame *frame);
- int create_filter(const char *filter_spec
, AVCodecParameters *avpar
);
+ int create_filter(const char *filter_spec);
void load_markers();
IndexMarks *get_markers();
int init_frame(AVFrame *picture);
int load(VFrame *vframe, int64_t pos);
void load_markers();
IndexMarks *get_markers();
int init_frame(AVFrame *picture);
int load(VFrame *vframe, int64_t pos);
+ int probe(int64_t pos);
int video_seek(int64_t pos);
int encode(VFrame *vframe);
int drain();
int video_seek(int64_t pos);
int encode(VFrame *vframe);
int drain();
+ int convert_hw_frame(AVFrame *ifrm, AVFrame *ofrm);
+ int load_filter(AVFrame *frame);
double get_rotation_angle();
double get_rotation_angle();
-
void flip(
);
+
int flip(double theta
);
int idx;
double frame_rate;
int idx;
double frame_rate;
@@
-268,6
+285,7
@@
public:
int interlaced;
int top_field_first;
int color_space, color_range;
int interlaced;
int top_field_first;
int color_space, color_range;
+ struct SwsContext *fconvert_ctx;
};
class FFCodecRemap
};
class FFCodecRemap
@@
-283,7
+301,11
@@
class FFCodecRemaps : public ArrayList<FFCodecRemap>
public:
FFCodecRemaps() {}
int add(const char *val);
public:
FFCodecRemaps() {}
int add(const char *val);
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59,16,100)
+ int update(AVCodecID &codec_id, const AVCodec *&decoder);
+#else
int update(AVCodecID &codec_id, AVCodec *&decoder);
int update(AVCodecID &codec_id, AVCodec *&decoder);
+#endif
};
// for get_initial_timecode auto deletes
};
// for get_initial_timecode auto deletes
@@
-324,7
+346,11
@@
public:
static void ff_lock(const char *cp=0) { fflock.lock(cp); }
static void ff_unlock() { fflock.unlock(); }
static void ff_lock(const char *cp=0) { fflock.lock(cp); }
static void ff_unlock() { fflock.unlock(); }
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(59,16,100)
+ int check_sample_rate(const AVCodec *codec, int sample_rate);
+#else
int check_sample_rate(AVCodec *codec, int sample_rate);
int check_sample_rate(AVCodec *codec, int sample_rate);
+#endif
AVRational check_frame_rate(const AVRational *p, double frame_rate);
AVRational to_sample_aspect_ratio(Asset *asset);
AVRational to_time_base(int sample_rate);
AVRational check_frame_rate(const AVRational *p, double frame_rate);
AVRational to_sample_aspect_ratio(Asset *asset);
AVRational to_time_base(int sample_rate);
@@
-362,6
+388,10
@@
public:
static double to_secs(int64_t time, AVRational time_base);
int info(char *text, int len);
static double to_secs(int64_t time, AVRational time_base);
int info(char *text, int len);
+ void put_cache_frame(VFrame *frame, int64_t position);
+ int get_use_cache();
+ void purge_cache();
+
int init_decoder(const char *filename);
int open_decoder();
int init_encoder(const char *filename);
int init_decoder(const char *filename);
int open_decoder();
int init_encoder(const char *filename);
@@
-373,6
+403,7
@@
public:
double get_initial_timecode(int data_type, int channel, double frame_rate);
int audio_seek(int ch, int64_t pos);
double get_initial_timecode(int data_type, int channel, double frame_rate);
int audio_seek(int ch, int64_t pos);
+ int video_probe(int64_t pos);
int video_seek(int layer, int64_t pos);
int decode(int chn, int64_t pos, double *samples, int len);
int video_seek(int layer, int64_t pos);
int decode(int chn, int64_t pos, double *samples, int len);
@@
-424,6
+455,7
@@
public:
int decoding, encoding;
int has_audio, has_video;
int decoding, encoding;
int has_audio, has_video;
+ int interlace_from_codec;
FFMPEG(FileBase *file_base=0);
~FFMPEG();
FFMPEG(FileBase *file_base=0);
~FFMPEG();
@@
-453,6
+485,7
@@
public:
float ff_aspect_ratio(int stream);
int ff_color_range(int stream);
int ff_color_space(int stream);
float ff_aspect_ratio(int stream);
int ff_color_range(int stream);
int ff_color_space(int stream);
+ int ff_interlace(int stream);
double ff_frame_rate(int stream);
const char *ff_video_codec(int stream);
int64_t ff_video_frames(int stream);
double ff_frame_rate(int stream);
const char *ff_video_codec(int stream);
int64_t ff_video_frames(int stream);