Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/2] Improve HWDeviceContext logging
@ 2025-03-12  5:37 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 ` [FFmpeg-devel] [PATCH 2/2] avutil/hwcontext: Add item_name function for AVHWDeviceContext softworkz
  0 siblings, 2 replies; 3+ messages in thread
From: ffmpegagent @ 2025-03-12  5:37 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: softworkz

This changeset

 * adds an av class category for hw device contexts
 * assigns a color to it
 * adds an item_name function to the av class for hw device context


Before
======

[AVHWDeviceContext @ 00000260A9C63E00] Selecting d3d11va adapter 2
[AVHWDeviceContext @ 00000260A9C63E00] Using device 8086:4c8a (Intel(R) UH..
[AVHWDeviceContext @ 00000260A9BFFC40] Use Intel(R) Media SDK to create MF..
[AVHWDeviceContext @ 00000260A9BFFC40] Initialize MFX session: implementat..
[h264 @ 00000260AC0DC640] Reinit context to 1920x800, pix_fmt: yuv420p


After
=====

[D3D11VA @ 00000184942C25C0] Selecting d3d11va adapter 2 [D3D11VA @
00000184942C25C0] Using device 8086:4c8a (Intel(R) UHD Graphics.. [QSV @
00000184942601C0] Use Intel(R) Media SDK to create MFX session, API.. [QSV @
00000184942601C0] Initialize MFX session: implementation version is.. [h264
@ 00000184964BA9C0] Reinit context to 1920x800, pix_fmt: yuv420p

(..unable to show the terminal color change in plain text e-mail)

softworkz (2):
  avutil/log,hwcontext: Add AV_CLASS_CATEGORY_HWDEVICE
  avutil/hwcontext: Add item_name function for AVHWDeviceContext

 doc/APIchanges        | 3 +++
 libavutil/hwcontext.c | 9 ++++++++-
 libavutil/log.c       | 1 +
 libavutil/log.h       | 1 +
 libavutil/version.h   | 2 +-
 5 files changed, 14 insertions(+), 2 deletions(-)


base-commit: 0b097ed9f141f57e2b91f0704c721a9eff0204c0
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-61%2Fsoftworkz%2Fsubmit_hwdevice_logging-v1
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-61/softworkz/submit_hwdevice_logging-v1
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/61
-- 
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 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

end of thread, other threads:[~2025-03-12  5:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [FFmpeg-devel] [PATCH 2/2] avutil/hwcontext: Add item_name function for AVHWDeviceContext softworkz

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git