From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4193448320 for ; Thu, 22 Feb 2024 19:27:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0E64C68BF8B; Thu, 22 Feb 2024 21:27:40 +0200 (EET) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A115768BA20 for ; Thu, 22 Feb 2024 21:27:33 +0200 (EET) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-41241f64c6bso811015e9.0 for ; Thu, 22 Feb 2024 11:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jkqxz-net.20230601.gappssmtp.com; s=20230601; t=1708630053; x=1709234853; darn=ffmpeg.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+0cZ02JjK+TfFEXE6NkaZMgG4199bnPz6B18A23JFmw=; b=Je9E7zmFalRNNhfEVvyCZ5FF41gdWKtqRME8HkM0gZ2TgM2J4eW9DYQrO5BM7MPHhi AgmEbWA0jkgCIM2VKgSu3gPbR4FeV42LZ/qdQy7pyDCRrW/fO4ERmu1a5ZBkY1CWEM0n bPAQkpaT3Gd29+IWVRWaSENYwiyNFOR6lJwTFilIBoBAzBblwlve9zE16xRJ3n/esOBY 8XA8wB+Md7uM6Fq1KmarMAg6VH4M5K2bV9p9lGWQYN3ovl/nLdsjEI8wHSQOvDxtQ1yw H0fzJiLSnKEkCCeiw8A4EgAk6e9Qy2nnQuw9QFoAzwzKy7uGE/BE9JuCigkexyFfxu76 1ZFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708630053; x=1709234853; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+0cZ02JjK+TfFEXE6NkaZMgG4199bnPz6B18A23JFmw=; b=EpE6ANJWDmhVEly+1Gbh6wqf8oosNDLDJ86Dn6Q9XpOTL9fjX3i2GL6nEGiqT6wXwG otV9A6MKJXocm5ex6JeRzMpr7Pkq/qBMt3OY4wuXXWuwFi5GpOqulfM4K4ZmeptXkWjG 1T3l+mBfJvYtI8JM+3PfhekgWNR0gqpcFeRdzb62LmQCTkrICTyiwOQCASirYvf/Zgdc xCPrQ/U5EYg6dsWEyo1iTbMwYLWFu2U1fI/LMR9VsZjUfBLKbUjt0s8lBamIY+NCxs57 9mJD3uXooaq75JCVF7bQL9Z8VefktabbHDn0xF2s4JsRnx8XG7zOv0ZjFYur7d0bk6g2 L39Q== X-Gm-Message-State: AOJu0YzRdyrdUUdhtqEr/8XTEFOjNISwCeWWJxZWg6AW+rPOvgyuCEfg w0TEtR/5h2/XS7CHsVlAuI2aWnVCIvZF7WbD5EDU+MqvHjtkUme7RmyX1M2MU+f2knu8vJ/viET K X-Google-Smtp-Source: AGHT+IFpTbDtSo2BVMAVA5nYh58garLo5k0Cfs4biIW7b+U27ZvMoXVwqzRdcOzUepB4FwdLhpAAmg== X-Received: by 2002:a05:600c:3d8c:b0:412:8d98:782 with SMTP id bi12-20020a05600c3d8c00b004128d980782mr1098890wmb.10.1708630052964; Thu, 22 Feb 2024 11:27:32 -0800 (PST) Received: from [192.168.0.15] (cpc92302-cmbg19-2-0-cust1183.5-4.cable.virginm.net. [82.1.212.160]) by smtp.gmail.com with ESMTPSA id h13-20020a5d4fcd000000b0033d8b1ace25sm9247wrw.2.2024.02.22.11.27.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Feb 2024 11:27:32 -0800 (PST) Message-ID: <175469a3-87ad-4dd7-905a-f5e0d169b2c2@jkqxz.net> Date: Thu, 22 Feb 2024 19:28:00 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20240222184603.13074-1-gnattuoc@me.com> From: Mark Thompson In-Reply-To: <20240222184603.13074-1-gnattuoc@me.com> Subject: Re: [FFmpeg-devel] [PATCH] hwcontext_videotoolbox: add vt_device_derive X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 22/02/2024 18:46, gnattu via ffmpeg-devel wrote: > There is no device context to be setup, nor devices to be > selected with VideoToolbox. Just a simple return would allow > us to use derived device in filters like > `hwupload=derive_device=videotoolbox` > > Signed-off-by: Gnattu OC > --- > libavutil/hwcontext_videotoolbox.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c > index fe469dc161..d13199eca7 100644 > --- a/libavutil/hwcontext_videotoolbox.c > +++ b/libavutil/hwcontext_videotoolbox.c > @@ -759,6 +759,14 @@ static int vt_device_create(AVHWDeviceContext *ctx, const char *device, > return 0; > } > > +static int vt_device_derive(AVHWDeviceContext *device_ctx, > + AVHWDeviceContext *src_ctx, AVDictionary *opts, > + int flags) > +{ > + // There is no context to be setup with VT, just return. > + return 0; > +} > + > const HWContextType ff_hwcontext_type_videotoolbox = { > .type = AV_HWDEVICE_TYPE_VIDEOTOOLBOX, > .name = "videotoolbox", > @@ -766,6 +774,7 @@ const HWContextType ff_hwcontext_type_videotoolbox = { > .frames_priv_size = sizeof(VTFramesContext), > > .device_create = vt_device_create, > + .device_derive = vt_device_derive, > .frames_hwctx_size = sizeof(AVVTFramesContext), > .frames_init = vt_frames_init, > .frames_get_buffer = vt_get_buffer, This derivation behaviour doesn't make any sense inside libavutil. Features which are only for the ffmpeg utility should be implemented inside the ffmpeg utility. (Also, try -init_hw_device.) Thanks, - 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-request@ffmpeg.org with subject "unsubscribe".