From patchwork Wed Apr 19 19:52:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 41275 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4645:b0:e3:3194:9d20 with SMTP id eb5csp744974pzb; Wed, 19 Apr 2023 12:56:19 -0700 (PDT) X-Google-Smtp-Source: AKy350b/OElbmdHAPPJlpJB+06qDS6M/f/vf7p0urlueqjgJuOwBBUxhUWcHmLSe95W/KlnlQwFc X-Received: by 2002:a17:906:6d51:b0:94a:a419:f382 with SMTP id a17-20020a1709066d5100b0094aa419f382mr16206383ejt.12.1681934179129; Wed, 19 Apr 2023 12:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681934179; cv=none; d=google.com; s=arc-20160816; b=vs+45zQ1BbHKIri2Yytb8If3t+RyzB8eRLbmV8c5in8likf/KmhXtTQm0eyhCSlKgn lpk1laHa7bSKMTygBS1H6pt5HVOpp5ynR6bPL58io6rODTYZ+JJhJynNnLOssfdMBHsV nnTRuW69RBl2HcZP/Y7UrubuNsa3V3JNVWagW0lSSWroklW0ilct2h67sS+tzTAqLcx/ LCZjfTM4O6FW8a2Xzw66iOt2V6XwA7VxYoO5YQE5dzwjkqrEXUS9bvk5Uvd8Uqyi5ZFH TSKOdYx5NUyqKN59RtDSxGCv3vdNZW5JYTzWrkxMWDf2MPBWdG1nS0N3e0Xoiwqr/493 Ag6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=z/WbXzL6euevizvu88p14QBlIBBX6bhhjNEPjBPhh/g=; b=D5WkN6cbU7gQ3lcuWJm5Vz7OrX1JlWgsvgEJKk2X7QM4b76VVSrXj6luI1jiXvKOJz JX5eGXVnQrgUt2sRCQdxXVOpO0NzjuYqHq54AFM/ndUeekgubbjdr271OTx1GqTWU3Lt eLdA07Gh/oRrg4xHkSyp+KrrmN3igqavJL2Lr6sN4BBi4+UsH4ER+jIAgQLxDTGLv8E/ skY8AHvvNT152qPNRxNGbPN3+u5e4BqnJStWdvSerVRPGOa0Nx9A8jW10VKvWlFwcACq aBIAucDOTEFbQHCng8Z1emdWLoWTDTSe5uVTlomqjw2ZOTLT382OHmukMudF+m75gmAX F79g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id e22-20020a056402089600b005067c1fdb13si14492241edy.641.2023.04.19.12.56.14; Wed, 19 Apr 2023 12:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 73D8468BF95; Wed, 19 Apr 2023 22:53:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 742EE68BEF8 for ; Wed, 19 Apr 2023 22:53:08 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 140FD2404EE for ; Wed, 19 Apr 2023 21:53:08 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 3-dhj8LzCSil for ; Wed, 19 Apr 2023 21:53:07 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 8C8A1240D1E for ; Wed, 19 Apr 2023 21:52:56 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 697E43A0D68 for ; Wed, 19 Apr 2023 21:52:56 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 19 Apr 2023 21:52:42 +0200 Message-Id: <20230419195243.2974-24-anton@khirnov.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230419195243.2974-1-anton@khirnov.net> References: <20230419195243.2974-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 24/25] fftools/ffmpeg: deprecate -adrift_threshold 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: TeIFs64jeOZo This option has had no effect since -async was removed in 3d86a13b47b726e49c2d780c5f723c290e8a36b4 --- doc/ffmpeg.texi | 6 ------ fftools/ffmpeg.h | 2 +- fftools/ffmpeg_opt.c | 14 ++++++++++++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index cb8aa13df2..23bc03e11a 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1748,12 +1748,6 @@ The default is -1.1. One possible usecase is to avoid framedrops in case of noisy timestamps or to increase frame drop precision in case of exact timestamps. -@item -adrift_threshold @var{time} -Set the minimum difference between timestamps and audio data (in seconds) to trigger -adding/dropping samples to make it match the timestamps. This option effectively is -a threshold to select between hard (add/drop) and soft (squeeze/stretch) compensation. -@code{-async} must be set to a positive value. - @item -apad @var{parameters} (@emph{output,per-stream}) Pad the output audio stream(s). This is the same as applying @code{-af apad}. Argument is a string of filter parameters composed the same as with the @code{apad} filter. diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 71f348da01..e3530d1699 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -55,6 +55,7 @@ #define FFMPEG_OPT_MAP_SYNC 1 #define FFMPEG_ROTATION_METADATA 1 #define FFMPEG_OPT_QPHIST 1 +#define FFMPEG_OPT_ADRIFT_THRESHOLD 1 enum VideoSyncMethod { VSYNC_AUTO = -1, @@ -727,7 +728,6 @@ extern int nb_filtergraphs; extern char *vstats_filename; extern char *sdp_filename; -extern float audio_drift_threshold; extern float dts_delta_threshold; extern float dts_error_threshold; diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 408ef121b7..24208fa068 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1347,6 +1347,14 @@ static int opt_qphist(void *optctx, const char *opt, const char *arg) } #endif +#if FFMPEG_OPT_ADRIFT_THRESHOLD +static int opt_adrift_threshold(void *optctx, const char *opt, const char *arg) +{ + av_log(NULL, AV_LOG_WARNING, "Option -%s is deprecated and has no effect\n", opt); + return 0; +} +#endif + #define OFFSET(x) offsetof(OptionsContext, x) const OptionDef options[] = { /* main options */ @@ -1453,8 +1461,10 @@ const OptionDef options[] = { "set video sync method globally; deprecated, use -fps_mode", "" }, { "frame_drop_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, { &frame_drop_threshold }, "frame drop threshold", "" }, - { "adrift_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, { &audio_drift_threshold }, - "audio drift threshold", "threshold" }, +#if FFMPEG_OPT_ADRIFT_THRESHOLD + { "adrift_threshold", HAS_ARG | OPT_EXPERT, { .func_arg = opt_adrift_threshold }, + "deprecated, does nothing", "threshold" }, +#endif { "copyts", OPT_BOOL | OPT_EXPERT, { ©_ts }, "copy timestamps" }, { "start_at_zero", OPT_BOOL | OPT_EXPERT, { &start_at_zero },