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 1/5] avfilter: tighten semantics on hw_device_ctx
@ 2024-02-09 14:53 Niklas Haas
  2024-02-09 14:53 ` [FFmpeg-devel] [PATCH 2/5] fftools/ffmpeg_filter: provide hwctx when probing graph Niklas Haas
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Niklas Haas @ 2024-02-09 14:53 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Niklas Haas

From: Niklas Haas <git@haasn.dev>

Currently, such filters defer hardware device initialization to
query_formats(), which is not really the correct place to have it. It
would be far more logical for these filters to create the hardware
context at init time, and error out otherwise.

By contrast, filters which merely receive or process hardware frames
typically do this at link config time, because they do not need access
to the hwframe specifics in order to query supported formats.

The intention here is to specifically stop creating hardware devices in
query_formats.
---
 libavfilter/avfilter.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 246d000251..b6adcf2473 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -464,7 +464,8 @@ struct AVFilterContext {
      *
      * 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().
+     * avfilter_init_dict(). *Must* be set for filters which do not have another
+     * way of obtaining a hardware device context (e.g. from an input link).
      */
     AVBufferRef *hw_device_ctx;
 
-- 
2.43.0

_______________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2024-02-09 17:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 14:53 [FFmpeg-devel] [PATCH 1/5] avfilter: tighten semantics on hw_device_ctx Niklas Haas
2024-02-09 14:53 ` [FFmpeg-devel] [PATCH 2/5] fftools/ffmpeg_filter: provide hwctx when probing graph Niklas Haas
2024-02-09 17:12   ` Anton Khirnov
2024-02-09 14:53 ` [FFmpeg-devel] [PATCH 3/5] avfilter/hwupload: move hwctx init to init() Niklas Haas
2024-02-09 17:17   ` Anton Khirnov
2024-02-09 14:53 ` [FFmpeg-devel] [PATCH 4/5] avfilter/libplacebo: " Niklas Haas
2024-02-09 14:53 ` [FFmpeg-devel] [PATCH 5/5] avfilter/vsrc_ddagrab: " Niklas Haas
2024-02-09 16:53 ` [FFmpeg-devel] [PATCH 1/5] avfilter: tighten semantics on hw_device_ctx Anton Khirnov

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