summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-03-15 18:57:36 +0100
committerAnton Khirnov <anton@khirnov.net>2023-03-24 10:16:51 +0100
commit632c34993195f716e9fa575af3de80d07fd50991 (patch)
treea03264f4f07c343b52be4d03a6becc89fa4d9b97 /libavfilter/avfilter.h
parent30cea1d39b94716f2e24f6d5b07e5bc686fdbaf6 (diff)
downloadffmpeg-632c34993195f716e9fa575af3de80d07fd50991.tar.gz
lavfi: add a flag for filters able to work with hw_device_ctx
This way the caller can set it just on the filters that can make use of it.
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index d0d4584468..d69381aed4 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -131,6 +131,11 @@ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
* received by the filter on one of its inputs.
*/
#define AVFILTER_FLAG_METADATA_ONLY (1 << 3)
+
+/**
+ * The filter can create hardware frames using AVFilterContext.hw_device_ctx.
+ */
+#define AVFILTER_FLAG_HWDEVICE (1 << 4)
/**
* Some filters support a generic "enable" expression option that can be used
* to enable or disable a filter in the timeline. Filters supporting this
@@ -444,6 +449,10 @@ struct AVFilterContext {
* in particular, a filter which consumes or processes hardware frames will
* instead use the hw_frames_ctx field in AVFilterLink to carry the
* hardware context information.
+ *
+ * May be set by the caller on filters flagged with AVFILTER_FLAG_HWDEVICE
+ * before initializing the filter with avfilter_init_str() or
+ * avfilter_init_dict().
*/
AVBufferRef *hw_device_ctx;