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 E116B4024E for ; Thu, 18 May 2023 11:36:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 79E9768C14B; Thu, 18 May 2023 14:36:37 +0300 (EEST) Received: from mail-oa1-f54.google.com (mail-oa1-f54.google.com [209.85.160.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C41268C090 for ; Thu, 18 May 2023 14:36:31 +0300 (EEST) Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-1928253dd95so837527fac.3 for ; Thu, 18 May 2023 04:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684409789; x=1687001789; 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=+4529fc5k4eU58ta3t2OWp7389w6BHiHRBcAsqEDtOk=; b=iy7Nii3kaBhONscvxs28nKMGLaIVOFPr98lbEBg/rwcksrURHLLdHsMYkB5mwm/LxM N97A/lTVLSZ0zL8oM2QL+PGX7LdIM5Up+He+snT+2CPII7I0uZCXZZeNlmaQTmXCWFUo iwetlQsaa7ksTUQ72B3s4FAOoq8pCL7xeF4HfQGMWsDflSQwMRDyjtRsIISLcsqjRhDv W7mqbeWaXdK0Gy3xZVopZIdpeTVO9RUqAqEHXc6W8KjBi6ZyGhja13juoKL98by5Ke7T VRXEs00M3IeXp/qa3HR2YIxziGHleY12Oi4HnF7L0mOCwyqFFz02Z0WZL1WpwyoqxL/w 729g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684409789; x=1687001789; 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=+4529fc5k4eU58ta3t2OWp7389w6BHiHRBcAsqEDtOk=; b=lE2NxGPIyC16W0uA4Cnus6s+1u8IgrciE3h49O0s11yHETz/AQpdDN4nupMTPcFx+2 oZk95g5dz0mNtFxaFxPigZ3wjtPQboxPhisDfqMK0p9Hb3NCICa+++gLPQPCrnYpiRvA 24VBKa22adra3Mgjtv9m92C8CP2aiJVGc8EE7Ew3Ci3aJN6em9u1zQhJ+aPTf3Fk/k+h oxr6Ci11Fxw8jlWjxLuf+dKq5HwF+hF7brNfwOliUZRNiRVwbRdFYrwfisC8XaZ+cmBe cjv37xjY+ak+c/pzr2WYIBKgJWemezLU5SP2qrTC6LRt0tvkpDJk3tue7geAy2J79+0n Rd5A== X-Gm-Message-State: AC+VfDylrNy9sIcT/Zru97dKBzHopdJxzftj43HcOaDT5QXrtNgekEQe 2D7rNnP5lozqyFRH0K6fjT5Lm7bYUM4= X-Google-Smtp-Source: ACHHUZ4MCCf0ox36TFJGDmr/zRz0q3b8fIJY00Uvx85dkOXOhb5CWg43s4iN/ODk8wGsjDiwH4V/QQ== X-Received: by 2002:a05:6870:3504:b0:17e:dc2b:f4b4 with SMTP id k4-20020a056870350400b0017edc2bf4b4mr629825oah.15.1684409789150; Thu, 18 May 2023 04:36:29 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id o1-20020a056870524100b00199a7323beasm641457oai.43.2023.05.18.04.36.28 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 May 2023 04:36:28 -0700 (PDT) Message-ID: Date: Thu, 18 May 2023 08:36:41 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] avcodec/videotoolboxenc: add low-latency encoding 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 5/18/2023 7:15 AM, xufuji456 wrote: > Signed-off-by: xufuji456 <839789740@qq.com> > --- > libavcodec/videotoolboxenc.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c > index c6f22723d6..88334f1851 100644 > --- a/libavcodec/videotoolboxenc.c > +++ b/libavcodec/videotoolboxenc.c > @@ -251,6 +251,8 @@ typedef struct VTEncContext { > > /* can't be bool type since AVOption will access it as int */ > int a53_cc; > + > + int low_latency; > } VTEncContext; > > static int vtenc_populate_extradata(AVCodecContext *avctx, > @@ -1441,6 +1443,16 @@ static int vtenc_create_encoder(AVCodecContext *avctx, > } > } > > + if (vtctx->low_latency) { Nothing seems to set this? Also, you should check the existing AV_CODEC_FLAG_LOW_DELAY flag instead. > + status = VTSessionSetProperty(vtctx->session, > + kVTVideoEncoderSpecification_EnableLowLatencyRateControl, > + kCFBooleanTrue); > + > + if (status) { > + av_log(avctx, AV_LOG_ERROR, "Error setting low latency property: %d\n", status); > + } > + } > + > status = VTCompressionSessionPrepareToEncodeFrames(vtctx->session); > if (status) { > av_log(avctx, AV_LOG_ERROR, "Error: cannot prepare encoder: %d\n", status); _______________________________________________ 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".