From patchwork Tue Dec 19 20:12:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Fiala?= X-Patchwork-Id: 45243 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1e68:b0:181:818d:5e7f with SMTP id cy40csp95613pzb; Tue, 19 Dec 2023 12:13:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEK20dlOqGdG87cTw65t92ZPaYmShNk+adiEkpvijAr/NwHCZdpkDG9HEzoZiTarPZHA4tS X-Received: by 2002:a17:906:2a97:b0:a23:9a1d:334d with SMTP id l23-20020a1709062a9700b00a239a1d334dmr2144479eje.7.1703016779801; Tue, 19 Dec 2023 12:12:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703016779; cv=none; d=google.com; s=arc-20160816; b=ngos2Mlyor93MxuuMztOciTx+NpbS3pQ631hnZUcLowInxlsxYN2n+oAu49oA9Vqai 7Q8vtk4Yq8VHxOblnTvvUyI7UsX0efksekU8AtCgRJS2BVvmgmoh3uq8ECZ5DtzNHfyb d+jfP6mwSD4BHQCf7gcVyaVKqOuek0cLA8u0ahRL+JgXY6ekImJM4w//FIDVWD5GwQ0a sZYk/VCCTFgcJAv3Z9+khNjgnyq/siCrz3c72THSLkKeWZzexQKR53NQZnu928duf4Wc 8gNtlkrAFYQxw9RDauVXoQ5xqFPu65HGkH9vHwHtQbaJvtfkNf5jBnUcw41YKvJN3Lji r6BQ== 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:message-id:date:to :dkim-signature:from:delivered-to; bh=eWskXRcumqC4hQ0i4efF5Vt/eGHdIzqFAM/6RA+1/NE=; fh=//hSQKIOrCUL5ZzCv6oZp/9x8vEh1JMLuiESFakqXYM=; b=mkIgm2CVJPezuK26LQ7UgcQw6//8bWtVXj6a3hNqnZRwTom+7IJ752dy+tOe0yUomG ZCVe6/R6/b/f4+fIBptOPpl/Q2QXtvLOx/mr6c82Y/W7zBHFW8TT5LjhHCJ07ve5+C+k u9mS2gOk79/A1o5kLAd1zI/gq/q+TlEzxrQ7Xr4Ht++ES4K2cf67B41f3sAvZ8Qk8Ooe nmmLgnyFjJg4gWIbOIkCLsnIZ1Smm3twZtsmgzcBcsNDBlHfnLdEULzp6O/v07GY9DUC WfQhdRIczk0/qSINdYM/BqqiYIYnvFEhWP3B6BwTTfQ9LNlh5XKpt001tUOM/dvDQ19I mvlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@airmail.cc header.s=mail header.b=PZzmjrYi; 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 g6-20020a170906348600b00a1c7b1115d8si10833190ejb.263.2023.12.19.12.12.58; Tue, 19 Dec 2023 12:12:59 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@airmail.cc header.s=mail header.b=PZzmjrYi; 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 E87DF68D14C; Tue, 19 Dec 2023 22:12:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.cock.li (mail.cock.li [37.120.193.123]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 40D6E68D02E for ; Tue, 19 Dec 2023 22:12:47 +0200 (EET) From: =?utf-8?q?Ond=C5=99ej_Fiala?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail; t=1703016765; bh=CcEgBtCgcF+QfFG3S5BtqhinEmT7CigVjTSdCLRnhFU=; h=From:To:Cc:Subject:Date:From; b=PZzmjrYizUVwX6SvQo+PrZpAeHD4tKywD/UkzDrJdpQcF1/HNHSU44tSD4zHN0rfT Lf3qLhjsCsGtsRpXMkxDY0C1yozOIPaLOZ6VOBNLtyLROYTQPFc088zS08x8LYCodO G19yB0qjC8h86Dpva5EXSn5dJurPEuSMSRleeuXqfG1gXQCBNpXyfKryIT8ylcJIz/ xH47Pm7HE2yYhJRqilhtnTrYuKqmSCMqT2lTWs5h6EFkcD7luC3GrX2U9Puzwht/TR 3lIU5C6NdfchYfA4saSQ5EJ9cEsVgWBVBqHWYh4/1b4KW8fp0NqzN8zhcSeycAxYGu ysPnWi05WCM9Q== To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Dec 2023 21:12:39 +0100 Message-ID: <20231219201239.20996-1-ofiala@airmail.cc> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2] fftools/ffplay: split filters & show modes cycling into separate keys 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: =?utf-8?q?Ond=C5=99ej_Fiala?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: RdGrTWvRKUcA Signed-off-by: Ondřej Fiala --- Simplified per Zhao Zhili's suggestion. doc/ffplay.texi | 5 ++++- fftools/ffplay.c | 11 ++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index 93f77eeece..91d138a974 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -241,8 +241,11 @@ Cycle subtitle channel in the current program. @item c Cycle program. +@item d +Cycle show modes. + @item w -Cycle video filters or show modes. +Cycle video filters. @item s Step to the next frame. diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 873ee8cc74..05182d9f49 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -3370,14 +3370,11 @@ static void event_loop(VideoState *cur_stream) case SDLK_t: stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE); break; + case SDLK_d: + toggle_audio_display(cur_stream); + break; case SDLK_w: - if (cur_stream->show_mode == SHOW_MODE_VIDEO && cur_stream->vfilter_idx < nb_vfilters - 1) { - if (++cur_stream->vfilter_idx >= nb_vfilters) - cur_stream->vfilter_idx = 0; - } else { - cur_stream->vfilter_idx = 0; - toggle_audio_display(cur_stream); - } + cur_stream->vfilter_idx = (cur_stream->vfilter_idx + 1) % nb_vfilters; break; case SDLK_PAGEUP: if (cur_stream->ic->nb_chapters <= 1) {