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 A45FA498F8 for ; Thu, 22 Feb 2024 18:46:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9970168BDBB; Thu, 22 Feb 2024 20:46:24 +0200 (EET) Received: from mr85p00im-ztdg06011201.me.com (mr85p00im-ztdg06011201.me.com [17.58.23.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 12D0B68BD37 for ; Thu, 22 Feb 2024 20:46:18 +0200 (EET) Received: from Yakumo-Yukari.lan (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-ztdg06011201.me.com (Postfix) with ESMTPSA id 83A0C96052E; Thu, 22 Feb 2024 18:46:14 +0000 (UTC) To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Feb 2024 02:46:03 +0800 Message-Id: <20240222184603.13074-1-gnattuoc@me.com> X-Mailer: git-send-email 2.39.3 (Apple Git-145) MIME-Version: 1.0 X-Proofpoint-GUID: 5cFGPrEUA04iAUfy5QJLh7ljgG5gFkfa X-Proofpoint-ORIG-GUID: 5cFGPrEUA04iAUfy5QJLh7ljgG5gFkfa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-22_14,2024-02-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=839 mlxscore=0 malwarescore=0 clxscore=1015 phishscore=0 spamscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2402220147 Subject: [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: , From: gnattu via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: gnattu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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, -- 2.39.3 (Apple Git-145) _______________________________________________ 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".