From patchwork Sat Jun 11 18:16:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 36165 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:6914:b0:82:6b11:2509 with SMTP id q20csp438338pzj; Sat, 11 Jun 2022 11:17:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuwYsD451Ljavy+40Il6AtSXGHzZ8+3Bx0gMN9hOtXWRr2aon900SmVgJkFJVzRZuBfwE+ X-Received: by 2002:a17:907:3e21:b0:711:ea36:914e with SMTP id hp33-20020a1709073e2100b00711ea36914emr20005651ejc.101.1654971424376; Sat, 11 Jun 2022 11:17:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654971424; cv=none; d=google.com; s=arc-20160816; b=GL8gP64AgHVnqzok/oUKzipCw0l0gqbJU8XOnaWJVpQLjsqhYilNsHSijjxQSgNqFF +wKOJZ5AuCgP7HmN1f3goLvPyK1oojzBkeMHTzqtIY5Y5zeGzq5HCbuESZY+aWWR4tzO ELJt3RQg/SPb9OtrO6mup46woKoOPiJRIpcfI8EPAPNOvYEVmS3wqMzB1QXNz2FXWHeI Xfft3u134AT0N/7h4Sjyr1pu7X3OaJrXqHqOj5R1CTucMkLu+k91uQ2ulESWfB/5WP61 6n77VwbWt/I29b4GLFzS7pGQXp6RHuAzxhtrQ6/eTy3uQmOSM0u7OJkdOHtvh4421QWk 5mLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc: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=D98it07LyNZ4oUH7U8u0y98aQdnhpTBPdOaD6iYLiUw=; b=Q6q1M13xvB6Hk2MkGIVJrf+RI25mIU7jXn+CRYsz4NnDiroPze2qda0ny1slEdeDAP AiNRuyhw2EhpArfegghGfdlG/UnlqT/zPHjLO+tFird3nO6rCPfOSpZa6g+8uqKQy8vM kJ/LOvLPaK+QAcBHb2w6l/XUL2hJ7qS/yGXJTHGsiE+4rIZYLFwJZ/8hvA6n7E1uY/Md 0A9ys4a8fAevh9hdoQu8wAJasmLGD+91JDRLJxM+Vb4GrbyIUV2U+PMtKBVJPkKFEDVi ieYxk09dtb8hc74jAnw+XeTSiBugVxmPSFo9kMDwtJohfxRpUtxO7PFhZwctREzU0N6r BtSg== 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 t8-20020aa7db08000000b0042dbf3f21e7si2444128eds.139.2022.06.11.11.17.04; Sat, 11 Jun 2022 11:17:04 -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 E4E5968B548; Sat, 11 Jun 2022 21:16:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AB4A268B4E6 for ; Sat, 11 Jun 2022 21:16:40 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 2A70BE7092; Sat, 11 Jun 2022 20:16:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DRicP8Lo9b-c; Sat, 11 Jun 2022 20:16:39 +0200 (CEST) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id DD922E7170; Sat, 11 Jun 2022 20:16:39 +0200 (CEST) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Sat, 11 Jun 2022 20:16:04 +0200 Message-Id: <20220611181604.5297-3-cus@passwd.hu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220611181604.5297-1-cus@passwd.hu> References: <20220611181604.5297-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avdevice/pulse_audio_dec: deprecate frame_size option 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 Cc: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: fcDpQoikn5id It does not do anything. Frame sizes can be controlled by using fragment_size. Signed-off-by: Marton Balint --- doc/indevs.texi | 2 +- libavdevice/pulse_audio_dec.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index 1141da26d1..8a198c4b44 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -1289,7 +1289,7 @@ Specify the samplerate in Hz, by default 48kHz is used. Specify the channels in use, by default 2 (stereo) is set. @item frame_size -Specify the number of bytes per frame, by default it is set to 1024. +This option does nothing and is deprecated. @item fragment_size Specify the size in bytes of the minimal buffering fragment in PulseAudio, it diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c index c780d607a0..8d440c5621 100644 --- a/libavdevice/pulse_audio_dec.c +++ b/libavdevice/pulse_audio_dec.c @@ -371,6 +371,7 @@ static int pulse_get_device_list(AVFormatContext *h, AVDeviceInfoList *device_li #define OFFSET(a) offsetof(PulseData, a) #define D AV_OPT_FLAG_DECODING_PARAM +#define DEPR AV_OPT_FLAG_DEPRECATED static const AVOption options[] = { { "server", "set PulseAudio server", OFFSET(server), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D }, @@ -378,7 +379,7 @@ static const AVOption options[] = { { "stream_name", "set stream description", OFFSET(stream_name), AV_OPT_TYPE_STRING, {.str = "record"}, 0, 0, D }, { "sample_rate", "set sample rate in Hz", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 48000}, 1, INT_MAX, D }, { "channels", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = 2}, 1, INT_MAX, D }, - { "frame_size", "set number of bytes per frame", OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX, D }, + { "frame_size", "set number of bytes per frame", OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX, D | DEPR }, { "fragment_size", "set buffering size, affects latency and cpu usage", OFFSET(fragment_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D }, { "wallclock", "set the initial pts using the current time", OFFSET(wallclock), AV_OPT_TYPE_INT, {.i64 = 1}, -1, 1, D }, { NULL },