summaryrefslogtreecommitdiff
path: root/ffmpeg.h
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2017-03-04 23:57:30 +0000
committerMark Thompson <sw@jkqxz.net>2017-06-14 22:26:32 +0100
commit06043cc0bc72b530db352a67776392cf61a54104 (patch)
treea231ad41bad12b7ab393981b59a0eee1accb5b44 /ffmpeg.h
parent0b1794a43e1083644aa3db2a09323681cfe080ec (diff)
ffmpeg: Generic device setup
Not yet enabled for any hwaccels. (cherry picked from commit d2e6dd32a445b5744a51d090c0822dbd7e434592) (cherry picked from commit 9203aac22874c7259e155b7d00f1f33bb1355129)
Diffstat (limited to 'ffmpeg.h')
-rw-r--r--ffmpeg.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ffmpeg.h b/ffmpeg.h
index a806445e0d..5c115cf9a3 100644
--- 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"
@@ -74,8 +75,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 */
@@ -661,4 +669,13 @@ 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 */