ffmpeg | branch: master | Vittorio Gambaletta (VittGam) <ffmpeg-...@vittgam.net> | Tue Jan 19 00:57:38 2016 +0100| [acd37069aec2058821c73b85ccac2d879949f0ff] | committer: Marton Balint
ffplay: toggle full screen when double-clicking the video window with the left mouse button Now that the seek only happens with the right mouse button, it makes sense to toggle full screen when double-clicking with the left mouse button, like other video players do. Signed-off-by: Vittorio Gambaletta <ffmpeg-...@vittgam.net> Signed-off-by: Marton Balint <c...@passwd.hu> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=acd37069aec2058821c73b85ccac2d879949f0ff --- Changelog | 1 + ffplay.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/Changelog b/Changelog index d458991..59bfbb1 100644 --- a/Changelog +++ b/Changelog @@ -55,6 +55,7 @@ version <next>: - spectrumsynth filter - ahistogram filter - only seek with the right mouse button in ffplay +- toggle full screen when double-clicking with the left mouse button in ffplay version 2.8: diff --git a/ffplay.c b/ffplay.c index 2fa7165..5b473e9 100644 --- a/ffplay.c +++ b/ffplay.c @@ -3473,6 +3473,16 @@ static void event_loop(VideoState *cur_stream) do_exit(cur_stream); break; } + if (event.button.button == SDL_BUTTON_LEFT) { + static int64_t last_mouse_left_click = 0; + if (av_gettime_relative() - last_mouse_left_click <= 500000) { + toggle_full_screen(cur_stream); + cur_stream->force_refresh = 1; + last_mouse_left_click = 0; + } else { + last_mouse_left_click = av_gettime_relative(); + } + } case SDL_MOUSEMOTION: if (cursor_hidden) { SDL_ShowCursor(1); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog