* [FFmpeg-devel] [PATCH 1/2] avutil/log, hwcontext: Add AV_CLASS_CATEGORY_HWDEVICE
2025-03-12 5:37 [FFmpeg-devel] [PATCH 0/2] Improve HWDeviceContext logging ffmpegagent
@ 2025-03-12 5:37 ` softworkz
2025-03-12 5:37 ` [FFmpeg-devel] [PATCH 2/2] avutil/hwcontext: Add item_name function for AVHWDeviceContext softworkz
1 sibling, 0 replies; 3+ messages in thread
From: softworkz @ 2025-03-12 5:37 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: softworkz
From: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
---
doc/APIchanges | 3 +++
libavutil/hwcontext.c | 1 +
libavutil/log.c | 1 +
libavutil/log.h | 1 +
libavutil/version.h | 2 +-
5 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index 7da9297b01..a7f3c642a3 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
API changes, most recent first:
+2025-03-12 - xxxxxxxxxx - lavu 59.60.100 - log.h
+ Add AV_CLASS_CATEGORY_HWDEVICE.
+
2025-03-10 - xxxxxxxxxx - lavu 59.59.100 - pixfmt.h
Add AV_PIX_FMT_YAF16BE, AV_PIX_FMT_YAF16LE, AV_PIX_FMT_YAF32BE,
and AV_PIX_FMT_YAF32LE.
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index f06d49c45c..276dc9cee6 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -140,6 +140,7 @@ enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)
static const AVClass hwdevice_ctx_class = {
.class_name = "AVHWDeviceContext",
.item_name = av_default_item_name,
+ .category = AV_CLASS_CATEGORY_HWDEVICE,
.version = LIBAVUTIL_VERSION_INT,
};
diff --git a/libavutil/log.c b/libavutil/log.c
index c5ee876a88..2b721aea5a 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -81,6 +81,7 @@ static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = {
[16+AV_CLASS_CATEGORY_BITSTREAM_FILTER] = 9,
[16+AV_CLASS_CATEGORY_SWSCALER ] = 7,
[16+AV_CLASS_CATEGORY_SWRESAMPLER ] = 7,
+ [16+AV_CLASS_CATEGORY_HWDEVICE ] = 6,
[16+AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT ] = 13,
[16+AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT ] = 5,
[16+AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT ] = 13,
diff --git a/libavutil/log.h b/libavutil/log.h
index dd094307ce..ac5b08b632 100644
--- a/libavutil/log.h
+++ b/libavutil/log.h
@@ -37,6 +37,7 @@ typedef enum {
AV_CLASS_CATEGORY_BITSTREAM_FILTER,
AV_CLASS_CATEGORY_SWSCALER,
AV_CLASS_CATEGORY_SWRESAMPLER,
+ AV_CLASS_CATEGORY_HWDEVICE,
AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40,
AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
diff --git a/libavutil/version.h b/libavutil/version.h
index b6467e2a6d..b937936032 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 59
-#define LIBAVUTIL_VERSION_MINOR 59
+#define LIBAVUTIL_VERSION_MINOR 60
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
--
ffmpeg-codebot
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] avutil/hwcontext: Add item_name function for AVHWDeviceContext
2025-03-12 5:37 [FFmpeg-devel] [PATCH 0/2] Improve HWDeviceContext logging ffmpegagent
2025-03-12 5:37 ` [FFmpeg-devel] [PATCH 1/2] avutil/log, hwcontext: Add AV_CLASS_CATEGORY_HWDEVICE softworkz
@ 2025-03-12 5:37 ` softworkz
1 sibling, 0 replies; 3+ messages in thread
From: softworkz @ 2025-03-12 5:37 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: softworkz
From: softworkz <softworkz@hotmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
---
libavutil/hwcontext.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index 276dc9cee6..3111a44651 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -137,9 +137,15 @@ enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)
return set ? next : AV_HWDEVICE_TYPE_NONE;
}
+static const char *hwdevice_ctx_get_name(void *ptr)
+{
+ FFHWDeviceContext *ctx = ptr;
+ return ctx->hw_type->name;
+}
+
static const AVClass hwdevice_ctx_class = {
.class_name = "AVHWDeviceContext",
- .item_name = av_default_item_name,
+ .item_name = hwdevice_ctx_get_name,
.category = AV_CLASS_CATEGORY_HWDEVICE,
.version = LIBAVUTIL_VERSION_INT,
};
--
ffmpeg-codebot
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread