summaryrefslogtreecommitdiffstats
path: root/video/vt.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-17 13:32:27 +0100
committerwm4 <wm4@nowhere>2017-02-17 13:32:27 +0100
commit1e4fd996bb249a773bad5d57ac5b724be52a09af (patch)
treeb8d866473894b8087b941b4fee21bbfd317a8d92 /video/vt.h
parente8137ee88154b496b2370bbdd93cd3cb3564dc86 (diff)
downloadmpv-1e4fd996bb249a773bad5d57ac5b724be52a09af.tar.bz2
mpv-1e4fd996bb249a773bad5d57ac5b724be52a09af.tar.xz
videotoolbox: factor some duplicated code
The code for copying a videotoolbox surface to mp_image was duplicated (with some minor differences - I picked the hw_videotoolbox.c version, because it was "better"). mp_imgfmt_from_cvpixelformat() is somewhat duplicated with the vt_formats[] table, but this will be fixed in a later commit, and moving the function to shared code is preparation.
Diffstat (limited to 'video/vt.h')
-rw-r--r--video/vt.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/video/vt.h b/video/vt.h
new file mode 100644
index 0000000000..e4ad5f021b
--- /dev/null
+++ b/video/vt.h
@@ -0,0 +1,15 @@
+#ifndef MPV_VT_H
+#define MPV_VT_H
+
+#include <stdint.h>
+
+int mp_imgfmt_from_cvpixelformat(uint32_t cvpixfmt);
+
+struct mp_image;
+struct mp_image_pool;
+struct mp_hwdec_ctx;
+struct mp_image *mp_vt_download_image(struct mp_hwdec_ctx *ctx,
+ struct mp_image *hw_image,
+ struct mp_image_pool *swpool);
+
+#endif