[FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Carl Eugen Hoyos
ceffmpeg at gmail.com
Mon May 13 13:35:41 EEST 2019
Am Mo., 13. Mai 2019 um 11:00 Uhr schrieb Daniel Kucera
<daniel.kucera at gmail.com>:
> +#ifdef SDL_WINDOW_ALWAYS_ON_TOP
> + { "alwaysontop", OPT_BOOL, { &alwaysontop }, "window always on top" },
> +#endif
You could remove the condition here...
> { "volume", OPT_INT | HAS_ARG, { &startup_volume}, "set startup volume 0=min 100=max", "volume" },
> { "f", HAS_ARG, { .func_arg = opt_format }, "force format", "fmt" },
> { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, { .func_arg = opt_frame_pix_fmt }, "set pixel format", "format" },
> @@ -3722,6 +3726,10 @@ int main(int argc, char **argv)
>
> if (!display_disable) {
> int flags = SDL_WINDOW_HIDDEN;
> +#ifdef SDL_WINDOW_ALWAYS_ON_TOP
> + if (alwaysontop)
> + flags |= SDL_WINDOW_ALWAYS_ON_TOP;
... and add an #else here with a warning message to reduce confusion.
(and switch lines "#ifdef" and "if (alwaysontop)")
> +#endif
Carl Eugen
More information about the ffmpeg-devel
mailing list