On 15/10/2020 01:16, OvchinnikovDmitrii wrote:
From: Alexander Kravchenko <akravchenko...@gmail.com>
---
libavutil/Makefile | 2 +
libavutil/hwcontext.c | 4 +
libavutil/hwcontext.h | 1 +
libavutil/hwcontext_amf.c | 284 +++++++++++++++++++++++++++++++++
libavutil/hwcontext_amf.h | 54 +++++++
libavutil/hwcontext_internal.h | 1 +
6 files changed, 346 insertions(+)
create mode 100644 libavutil/hwcontext_amf.c
create mode 100644 libavutil/hwcontext_amf.h
...
diff --git a/libavutil/hwcontext_amf.c b/libavutil/hwcontext_amf.c
new file mode 100644
index 0000000000..b70ee90d40
--- /dev/null
+++ b/libavutil/hwcontext_amf.c
...
+
+const HWContextType ff_hwcontext_type_amf = {
+ .type = AV_HWDEVICE_TYPE_AMF,
+ .name = "AMF",
+
+ .device_hwctx_size = sizeof(AVAMFDeviceContext),
+ .device_priv_size = sizeof(AMFDeviceContextPrivate),
+
+ .device_create = &amf_device_create,
+ .device_derive = &amf_device_derive,
+};
This does make a weird kind of sense as a way to unify some bits of code, but
it's very unclear to me whether it is a good idea to be exposing this
device-only hwcontext implementation to the user in a way which they can't
actually do anything with. (Nothing has an external use for the AMF device.)
The code looks ok, but does anyone else have an opinion on the approach?
- Mark
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".