summaryrefslogtreecommitdiffstats
path: root/filters/f_hwtransfer.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-02 21:14:58 +0200
committerwm4 <wm4@nowhere>2019-10-02 21:14:58 +0200
commit49f9146fe4dfa6fb2e76e59b7e75a99707782dd9 (patch)
tree90f51a718bf4a180d7e1316d224bf988ae7e2c8c /filters/f_hwtransfer.h
parent61961d03f6aed7eb77eca34840e90342b86e92c9 (diff)
downloadmpv-49f9146fe4dfa6fb2e76e59b7e75a99707782dd9.tar.bz2
mpv-49f9146fe4dfa6fb2e76e59b7e75a99707782dd9.tar.xz
f_hwtransfer: add a mp_hwdownload filter
This just wraps the mp_image_hw_download() function as a filter and adds some minor caching/error logging. (Shame that it needs to much boilerplate, I guess.) Will be used by the following commit. Wrapping it as filter seemed more convenient than other choices.
Diffstat (limited to 'filters/f_hwtransfer.h')
-rw-r--r--filters/f_hwtransfer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/filters/f_hwtransfer.h b/filters/f_hwtransfer.h
index 4595cb393d..567bf92213 100644
--- a/filters/f_hwtransfer.h
+++ b/filters/f_hwtransfer.h
@@ -30,3 +30,12 @@ struct mp_hwupload *mp_hwupload_create(struct mp_filter *parent, int hw_imgfmt);
// and otherwise a format that likely results in the least loss.
// Returns 0 if completely unsupported.
int mp_hwupload_find_upload_format(struct mp_hwupload *u, int imgfmt);
+
+// A filter which downloads sw frames from hw. Ignores sw frames.
+struct mp_hwdownload {
+ struct mp_filter *f;
+
+ struct mp_image_pool *pool;
+};
+
+struct mp_hwdownload *mp_hwdownload_create(struct mp_filter *parent);