Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: softworkz <ffmpegagent@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: softworkz <softworkz@hotmail.com>
Subject: [FFmpeg-devel] [PATCH 2/2] avutil/hwcontext: Add item_name function for AVHWDeviceContext
Date: Wed, 12 Mar 2025 05:37:18 +0000
Message-ID: <92fe05ca35a8e575660a34f5c18bd16f43eb8d22.1741757839.git.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.61.ffstaging.FFmpeg.1741757838.ffmpegagent@gmail.com>

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".

      parent reply	other threads:[~2025-03-12  5:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92fe05ca35a8e575660a34f5c18bd16f43eb8d22.1741757839.git.ffmpegagent@gmail.com \
    --to=ffmpegagent@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=softworkz@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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