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 A6F0C487B1 for ; Tue, 19 Dec 2023 02:02:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 69EFE68CE49; Tue, 19 Dec 2023 04:02:54 +0200 (EET) Received: from mail.cock.li (mail.cock.li [37.120.193.123]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 20E7A68CE49 for ; Tue, 19 Dec 2023 04:02:48 +0200 (EET) From: =?UTF-8?q?Ond=C5=99ej=20Fiala?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=airmail.cc; s=mail; t=1702951367; bh=qXep+G0OrTBv1vKxK1x15lIhm4qDJatRBeCwLD+UIkQ=; h=From:To:Cc:Subject:Date:From; b=1Krd8v1peYHSd6F8y84ofYaBIWtIpgLiAMcCGCTrkT5KHnrPsxSeDVMgM1LeH0Kqy vpcDnXIPb0bV8tBHFB8jbBPo7JDFFHuGkHUxs7176IBg6ySqF5zL4ICXO1jMtwQAhP rigFuCl45sP4Tp7DSwa0ffyElKUm970BlKjxRQt4wXN96wPvtSgF0umZxHaN8mf5Dj dQnR7Gne6plh4P4rr/WwBxh/dtxYEfn8+XB4d5A+LtpZPKQH7lP14nTCPgOPQvt5NV SAPjai55R1YNfQzues6voBmoQftmDbMNClwYzIKurnCaaX44FKN1IfdhUOmzEJI7lx 9u6GU+TOIfhWQ== To: ffmpeg-devel@ffmpeg.org Date: Tue, 19 Dec 2023 03:02:20 +0100 Message-ID: <20231219020220.6838-1-ofiala@airmail.cc> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] 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=20Fiala?= 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: --- It's annoying to have to go through the audio visualization modes when you just want to switch back-and-forth between two video filters. It also makes the code simpler. doc/ffplay.texi | 5 ++++- fftools/ffplay.c | 10 ++++------ 2 files changed, 8 insertions(+), 7 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..2eb616a88a 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -3370,14 +3370,12 @@ 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 { + if (++cur_stream->vfilter_idx >= nb_vfilters) cur_stream->vfilter_idx = 0; - toggle_audio_display(cur_stream); - } break; case SDLK_PAGEUP: if (cur_stream->ic->nb_chapters <= 1) { -- 2.43.0 _______________________________________________ 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".