]> git.sesse.net Git - ffmpeg/blobdiff - ffmpeg.h
avfilter: add floodfill filter
[ffmpeg] / ffmpeg.h
index 4d0456c1fbe1e5f90f4b92e3a5de5bb356e6a5d3..d2deb432b79f06cf209aba39a2f9cf3673023f1e 100644 (file)
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -42,6 +42,7 @@
 #include "libavutil/dict.h"
 #include "libavutil/eval.h"
 #include "libavutil/fifo.h"
+#include "libavutil/hwcontext.h"
 #include "libavutil/pixfmt.h"
 #include "libavutil/rational.h"
 #include "libavutil/threadmessage.h"
@@ -67,6 +68,7 @@ enum HWAccelID {
     HWACCEL_QSV,
     HWACCEL_VAAPI,
     HWACCEL_CUVID,
+    HWACCEL_D3D11VA,
 };
 
 typedef struct HWAccel {
@@ -74,8 +76,15 @@ typedef struct HWAccel {
     int (*init)(AVCodecContext *s);
     enum HWAccelID id;
     enum AVPixelFormat pix_fmt;
+    enum AVHWDeviceType device_type;
 } HWAccel;
 
+typedef struct HWDevice {
+    char *name;
+    enum AVHWDeviceType type;
+    AVBufferRef *device_ref;
+} HWDevice;
+
 /* select an input stream for an output stream */
 typedef struct StreamMap {
     int disabled;           /* 1 is this mapping is disabled by a negative map */
@@ -226,6 +235,8 @@ typedef struct OptionsContext {
     int        nb_program;
     SpecifierOpt *time_bases;
     int        nb_time_bases;
+    SpecifierOpt *enc_time_bases;
+    int        nb_enc_time_bases;
 } OptionsContext;
 
 typedef struct InputFilter {
@@ -453,9 +464,9 @@ typedef struct OutputStream {
     int64_t last_mux_dts;
     // the timebase of the packets sent to the muxer
     AVRational mux_timebase;
+    AVRational enc_timebase;
 
     int                    nb_bitstream_filters;
-    uint8_t                  *bsf_extradata_updated;
     AVBSFContext            **bsf_ctx;
 
     AVCodecContext *enc_ctx;
@@ -618,6 +629,7 @@ extern AVBufferRef *hw_device_ctx;
 #if CONFIG_QSV
 extern char *qsv_device;
 #endif
+extern HWDevice *filter_hw_device;
 
 
 void term_init(void);
@@ -638,6 +650,7 @@ void choose_sample_fmt(AVStream *st, AVCodec *codec);
 
 int configure_filtergraph(FilterGraph *fg);
 int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out);
+void check_filter_outputs(void);
 int ist_in_filtergraph(FilterGraph *fg, InputStream *ist);
 int filtergraph_is_simple(FilterGraph *fg);
 int init_simple_filtergraph(InputStream *ist, OutputStream *ost);
@@ -649,13 +662,18 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame);
 
 int ffmpeg_parse_options(int argc, char **argv);
 
-int vdpau_init(AVCodecContext *s);
-int dxva2_init(AVCodecContext *s);
 int vda_init(AVCodecContext *s);
 int videotoolbox_init(AVCodecContext *s);
 int qsv_init(AVCodecContext *s);
-int vaapi_decode_init(AVCodecContext *avctx);
-int vaapi_device_init(const char *device);
 int cuvid_init(AVCodecContext *s);
 
+HWDevice *hw_device_get_by_name(const char *name);
+int hw_device_init_from_string(const char *arg, HWDevice **dev);
+void hw_device_free_all(void);
+
+int hw_device_setup_for_decode(InputStream *ist);
+int hw_device_setup_for_encode(OutputStream *ost);
+
+int hwaccel_decode_init(AVCodecContext *avctx);
+
 #endif /* FFMPEG_H */