Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On 5/20/2019 5:43 PM, Daniel Kučera wrote: > po 20. 5. 2019 o 21:12 James Almer napísal(a): >> >> On 5/20/2019 4:01 PM, Marton Balint wrote: >>> >>> On Mon, 20 May 2019, Carl Eugen Hoyos wrote: >>> Marton, Am Mo., 13. Mai 2019 um 13:42 Uhr schrieb Daniel Kucera : > > From: Daniel Kucera > > Signed-off-by: Daniel Kucera > --- > doc/ffplay.texi | 2 ++ > fftools/ffplay.c | 8 > 2 files changed, 10 insertions(+) > > diff --git a/doc/ffplay.texi b/doc/ffplay.texi > index c305465078..a487c0de8d 100644 > --- a/doc/ffplay.texi > +++ b/doc/ffplay.texi > @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using > left/right keys. Default is 1 > Disable graphical display. > @item -noborder > Borderless window. > +@item -alwaysontop > +Window always on top. Available on: X11 with SDL >= 2.0.5, Windows > SDL >= 2.0.6. > @item -volume > Set the startup volume. 0 means silence, 100 means no volume > reduction or > amplification. Negative values are treated as 0, values above 100 > are treated > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index 8f050e16e6..8fb8faeb06 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; > static float seek_interval = 10; > static int display_disable; > static int borderless; > +static int alwaysontop; > static int startup_volume = 100; > static int show_status = 1; > static int av_sync_type = AV_SYNC_AUDIO_MASTER; > @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { > { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set > seek interval for left/right keys, in seconds", "seconds" }, > { "nodisp", OPT_BOOL, { _disable }, "disable graphical > display" }, > { "noborder", OPT_BOOL, { }, "borderless window" }, > +{ "alwaysontop", OPT_BOOL, { }, "window always on > top" }, > { "volume", OPT_INT | HAS_ARG, { _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 +3724,12 @@ int main(int argc, char **argv) > > if (!display_disable) { > int flags = SDL_WINDOW_HIDDEN; > +if (alwaysontop) > +#if SDL_VERSION_ATLEAST(2,0,5) > +flags |= SDL_WINDOW_ALWAYS_ON_TOP; > +#else > +av_log(NULL, AV_LOG_WARNING, "Your SDL version doesn't > support SDL_WINDOW_ALWAYS_ON_TOP. Feature will be inactive.\n"); > +#endif Is there any reason you are against this patch? >>> >>> I am not against it, it looks good to me. >> >> Is the flag available in 2.0.5 for Windows, or only since 2.0.6 as the >> doxy addition mentions? > > The flag is available generally in the library since 2.0.5, but the > windows implementation is there since 2.0.6 only. > > https://github.com/SDL-mirror/SDL/commit/a60edd403816eb8d7f77f18320b76d27c1db2973 > > https://github.com/SDL-mirror/SDL/commit/76adc80cafd9f83dcfb36ada4b2b028487f7e1d8 Alright, pushed then. Thanks! ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
po 20. 5. 2019 o 21:12 James Almer napísal(a): > > On 5/20/2019 4:01 PM, Marton Balint wrote: > > > > On Mon, 20 May 2019, Carl Eugen Hoyos wrote: > > > >> Marton, > >> > >> Am Mo., 13. Mai 2019 um 13:42 Uhr schrieb Daniel Kucera > >> : > >>> > >>> From: Daniel Kucera > >>> > >>> Signed-off-by: Daniel Kucera > >>> --- > >>> doc/ffplay.texi | 2 ++ > >>> fftools/ffplay.c | 8 > >>> 2 files changed, 10 insertions(+) > >>> > >>> diff --git a/doc/ffplay.texi b/doc/ffplay.texi > >>> index c305465078..a487c0de8d 100644 > >>> --- a/doc/ffplay.texi > >>> +++ b/doc/ffplay.texi > >>> @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using > >>> left/right keys. Default is 1 > >>> Disable graphical display. > >>> @item -noborder > >>> Borderless window. > >>> +@item -alwaysontop > >>> +Window always on top. Available on: X11 with SDL >= 2.0.5, Windows > >>> SDL >= 2.0.6. > >>> @item -volume > >>> Set the startup volume. 0 means silence, 100 means no volume > >>> reduction or > >>> amplification. Negative values are treated as 0, values above 100 > >>> are treated > >>> diff --git a/fftools/ffplay.c b/fftools/ffplay.c > >>> index 8f050e16e6..8fb8faeb06 100644 > >>> --- a/fftools/ffplay.c > >>> +++ b/fftools/ffplay.c > >>> @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; > >>> static float seek_interval = 10; > >>> static int display_disable; > >>> static int borderless; > >>> +static int alwaysontop; > >>> static int startup_volume = 100; > >>> static int show_status = 1; > >>> static int av_sync_type = AV_SYNC_AUDIO_MASTER; > >>> @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { > >>> { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set > >>> seek interval for left/right keys, in seconds", "seconds" }, > >>> { "nodisp", OPT_BOOL, { _disable }, "disable graphical > >>> display" }, > >>> { "noborder", OPT_BOOL, { }, "borderless window" }, > >>> +{ "alwaysontop", OPT_BOOL, { }, "window always on > >>> top" }, > >>> { "volume", OPT_INT | HAS_ARG, { _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 +3724,12 @@ int main(int argc, char **argv) > >>> > >>> if (!display_disable) { > >>> int flags = SDL_WINDOW_HIDDEN; > >>> +if (alwaysontop) > >>> +#if SDL_VERSION_ATLEAST(2,0,5) > >>> +flags |= SDL_WINDOW_ALWAYS_ON_TOP; > >>> +#else > >>> +av_log(NULL, AV_LOG_WARNING, "Your SDL version doesn't > >>> support SDL_WINDOW_ALWAYS_ON_TOP. Feature will be inactive.\n"); > >>> +#endif > >> > >> Is there any reason you are against this patch? > > > > I am not against it, it looks good to me. > > Is the flag available in 2.0.5 for Windows, or only since 2.0.6 as the > doxy addition mentions? The flag is available generally in the library since 2.0.5, but the windows implementation is there since 2.0.6 only. https://github.com/SDL-mirror/SDL/commit/a60edd403816eb8d7f77f18320b76d27c1db2973 https://github.com/SDL-mirror/SDL/commit/76adc80cafd9f83dcfb36ada4b2b028487f7e1d8 -- S pozdravom / Best regards Daniel Kucera. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On 5/20/2019 4:01 PM, Marton Balint wrote: > > On Mon, 20 May 2019, Carl Eugen Hoyos wrote: > >> Marton, >> >> Am Mo., 13. Mai 2019 um 13:42 Uhr schrieb Daniel Kucera >> : >>> >>> From: Daniel Kucera >>> >>> Signed-off-by: Daniel Kucera >>> --- >>> doc/ffplay.texi | 2 ++ >>> fftools/ffplay.c | 8 >>> 2 files changed, 10 insertions(+) >>> >>> diff --git a/doc/ffplay.texi b/doc/ffplay.texi >>> index c305465078..a487c0de8d 100644 >>> --- a/doc/ffplay.texi >>> +++ b/doc/ffplay.texi >>> @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using >>> left/right keys. Default is 1 >>> Disable graphical display. >>> @item -noborder >>> Borderless window. >>> +@item -alwaysontop >>> +Window always on top. Available on: X11 with SDL >= 2.0.5, Windows >>> SDL >= 2.0.6. >>> @item -volume >>> Set the startup volume. 0 means silence, 100 means no volume >>> reduction or >>> amplification. Negative values are treated as 0, values above 100 >>> are treated >>> diff --git a/fftools/ffplay.c b/fftools/ffplay.c >>> index 8f050e16e6..8fb8faeb06 100644 >>> --- a/fftools/ffplay.c >>> +++ b/fftools/ffplay.c >>> @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; >>> static float seek_interval = 10; >>> static int display_disable; >>> static int borderless; >>> +static int alwaysontop; >>> static int startup_volume = 100; >>> static int show_status = 1; >>> static int av_sync_type = AV_SYNC_AUDIO_MASTER; >>> @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { >>> { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set >>> seek interval for left/right keys, in seconds", "seconds" }, >>> { "nodisp", OPT_BOOL, { _disable }, "disable graphical >>> display" }, >>> { "noborder", OPT_BOOL, { }, "borderless window" }, >>> + { "alwaysontop", OPT_BOOL, { }, "window always on >>> top" }, >>> { "volume", OPT_INT | HAS_ARG, { _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 +3724,12 @@ int main(int argc, char **argv) >>> >>> if (!display_disable) { >>> int flags = SDL_WINDOW_HIDDEN; >>> + if (alwaysontop) >>> +#if SDL_VERSION_ATLEAST(2,0,5) >>> + flags |= SDL_WINDOW_ALWAYS_ON_TOP; >>> +#else >>> + av_log(NULL, AV_LOG_WARNING, "Your SDL version doesn't >>> support SDL_WINDOW_ALWAYS_ON_TOP. Feature will be inactive.\n"); >>> +#endif >> >> Is there any reason you are against this patch? > > I am not against it, it looks good to me. Is the flag available in 2.0.5 for Windows, or only since 2.0.6 as the doxy addition mentions? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On Mon, 20 May 2019, Carl Eugen Hoyos wrote: Marton, Am Mo., 13. Mai 2019 um 13:42 Uhr schrieb Daniel Kucera : From: Daniel Kucera Signed-off-by: Daniel Kucera --- doc/ffplay.texi | 2 ++ fftools/ffplay.c | 8 2 files changed, 10 insertions(+) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index c305465078..a487c0de8d 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using left/right keys. Default is 1 Disable graphical display. @item -noborder Borderless window. +@item -alwaysontop +Window always on top. Available on: X11 with SDL >= 2.0.5, Windows SDL >= 2.0.6. @item -volume Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values are treated as 0, values above 100 are treated diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 8f050e16e6..8fb8faeb06 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; static float seek_interval = 10; static int display_disable; static int borderless; +static int alwaysontop; static int startup_volume = 100; static int show_status = 1; static int av_sync_type = AV_SYNC_AUDIO_MASTER; @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set seek interval for left/right keys, in seconds", "seconds" }, { "nodisp", OPT_BOOL, { _disable }, "disable graphical display" }, { "noborder", OPT_BOOL, { }, "borderless window" }, +{ "alwaysontop", OPT_BOOL, { }, "window always on top" }, { "volume", OPT_INT | HAS_ARG, { _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 +3724,12 @@ int main(int argc, char **argv) if (!display_disable) { int flags = SDL_WINDOW_HIDDEN; +if (alwaysontop) +#if SDL_VERSION_ATLEAST(2,0,5) +flags |= SDL_WINDOW_ALWAYS_ON_TOP; +#else +av_log(NULL, AV_LOG_WARNING, "Your SDL version doesn't support SDL_WINDOW_ALWAYS_ON_TOP. Feature will be inactive.\n"); +#endif Is there any reason you are against this patch? I am not against it, it looks good to me. Regards, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Marton, Am Mo., 13. Mai 2019 um 13:42 Uhr schrieb Daniel Kucera : > > From: Daniel Kucera > > Signed-off-by: Daniel Kucera > --- > doc/ffplay.texi | 2 ++ > fftools/ffplay.c | 8 > 2 files changed, 10 insertions(+) > > diff --git a/doc/ffplay.texi b/doc/ffplay.texi > index c305465078..a487c0de8d 100644 > --- a/doc/ffplay.texi > +++ b/doc/ffplay.texi > @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using > left/right keys. Default is 1 > Disable graphical display. > @item -noborder > Borderless window. > +@item -alwaysontop > +Window always on top. Available on: X11 with SDL >= 2.0.5, Windows SDL >= > 2.0.6. > @item -volume > Set the startup volume. 0 means silence, 100 means no volume reduction or > amplification. Negative values are treated as 0, values above 100 are treated > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index 8f050e16e6..8fb8faeb06 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; > static float seek_interval = 10; > static int display_disable; > static int borderless; > +static int alwaysontop; > static int startup_volume = 100; > static int show_status = 1; > static int av_sync_type = AV_SYNC_AUDIO_MASTER; > @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { > { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set seek > interval for left/right keys, in seconds", "seconds" }, > { "nodisp", OPT_BOOL, { _disable }, "disable graphical display" > }, > { "noborder", OPT_BOOL, { }, "borderless window" }, > +{ "alwaysontop", OPT_BOOL, { }, "window always on top" }, > { "volume", OPT_INT | HAS_ARG, { _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 +3724,12 @@ int main(int argc, char **argv) > > if (!display_disable) { > int flags = SDL_WINDOW_HIDDEN; > +if (alwaysontop) > +#if SDL_VERSION_ATLEAST(2,0,5) > +flags |= SDL_WINDOW_ALWAYS_ON_TOP; > +#else > +av_log(NULL, AV_LOG_WARNING, "Your SDL version doesn't support > SDL_WINDOW_ALWAYS_ON_TOP. Feature will be inactive.\n"); > +#endif Is there any reason you are against this patch? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Dňa ne 19. 5. 2019, 16:14 James Almer napísal(a): > On 5/19/2019 6:43 AM, Daniel Kučera wrote: > > Dňa pi 17. 5. 2019, 21:12 Daniel Kučera > > napísal(a): > > > >> > >> > >> Dňa št 16. 5. 2019, 12:04 Daniel Kučera > >> napísal(a): > >> > >>> > >>> > >>> Dňa st 15. 5. 2019, 11:14 Daniel Kučera > >>> napísal(a): > >>> > > > > Ping. > > > > -- > > > > S pozdravom / Best regards > > Daniel Kucera. > > Ping. > > -- > > S pozdravom / Best regards > Daniel Kucera. > > >>> > >>> Ping. > >>> > >> > >> Ping. > >> > > > > Ping. I can to this every day. > > Daily pings will not make it more likely for someone familiar with > ffplay to see and review your patch. Especially during a weekend. > > Try to be a bit more patient, please. Wait five days before pinging a > patch. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". It's been 7 days already. And the patch is under 10 simple lines... ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On 5/19/2019 6:43 AM, Daniel Kučera wrote: > Dňa pi 17. 5. 2019, 21:12 Daniel Kučera > napísal(a): > >> >> >> Dňa št 16. 5. 2019, 12:04 Daniel Kučera >> napísal(a): >> >>> >>> >>> Dňa st 15. 5. 2019, 11:14 Daniel Kučera >>> napísal(a): >>> > > Ping. > > -- > > S pozdravom / Best regards > Daniel Kucera. Ping. -- S pozdravom / Best regards Daniel Kucera. >>> >>> Ping. >>> >> >> Ping. >> > > Ping. I can to this every day. Daily pings will not make it more likely for someone familiar with ffplay to see and review your patch. Especially during a weekend. Try to be a bit more patient, please. Wait five days before pinging a patch. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Dňa pi 17. 5. 2019, 21:12 Daniel Kučera napísal(a): > > > Dňa št 16. 5. 2019, 12:04 Daniel Kučera > napísal(a): > >> >> >> Dňa st 15. 5. 2019, 11:14 Daniel Kučera >> napísal(a): >> >>> > >>> > Ping. >>> > >>> > -- >>> > >>> > S pozdravom / Best regards >>> > Daniel Kucera. >>> >>> Ping. >>> >>> -- >>> >>> S pozdravom / Best regards >>> Daniel Kucera. >>> >> >> Ping. >> > > Ping. > Ping. I can to this every day. > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Dňa št 16. 5. 2019, 12:04 Daniel Kučera napísal(a): > > > Dňa st 15. 5. 2019, 11:14 Daniel Kučera > napísal(a): > >> > >> > Ping. >> > >> > -- >> > >> > S pozdravom / Best regards >> > Daniel Kucera. >> >> Ping. >> >> -- >> >> S pozdravom / Best regards >> Daniel Kucera. >> > > Ping. > Ping. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Dňa st 15. 5. 2019, 11:14 Daniel Kučera napísal(a): > > > > Ping. > > > > -- > > > > S pozdravom / Best regards > > Daniel Kucera. > > Ping. > > -- > > S pozdravom / Best regards > Daniel Kucera. > Ping. > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
> > Ping. > > -- > > S pozdravom / Best regards > Daniel Kucera. Ping. -- S pozdravom / Best regards Daniel Kucera. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
po 13. 5. 2019 o 13:42 Daniel Kucera napísal(a): > > From: Daniel Kucera > > Signed-off-by: Daniel Kucera > --- > doc/ffplay.texi | 2 ++ > fftools/ffplay.c | 8 > 2 files changed, 10 insertions(+) > > diff --git a/doc/ffplay.texi b/doc/ffplay.texi > index c305465078..a487c0de8d 100644 > --- a/doc/ffplay.texi > +++ b/doc/ffplay.texi > @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using > left/right keys. Default is 1 > Disable graphical display. > @item -noborder > Borderless window. > +@item -alwaysontop > +Window always on top. Available on: X11 with SDL >= 2.0.5, Windows SDL >= > 2.0.6. > @item -volume > Set the startup volume. 0 means silence, 100 means no volume reduction or > amplification. Negative values are treated as 0, values above 100 are treated > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index 8f050e16e6..8fb8faeb06 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; > static float seek_interval = 10; > static int display_disable; > static int borderless; > +static int alwaysontop; > static int startup_volume = 100; > static int show_status = 1; > static int av_sync_type = AV_SYNC_AUDIO_MASTER; > @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { > { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set seek > interval for left/right keys, in seconds", "seconds" }, > { "nodisp", OPT_BOOL, { _disable }, "disable graphical display" > }, > { "noborder", OPT_BOOL, { }, "borderless window" }, > +{ "alwaysontop", OPT_BOOL, { }, "window always on top" }, > { "volume", OPT_INT | HAS_ARG, { _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 +3724,12 @@ int main(int argc, char **argv) > > if (!display_disable) { > int flags = SDL_WINDOW_HIDDEN; > +if (alwaysontop) > +#if SDL_VERSION_ATLEAST(2,0,5) > +flags |= SDL_WINDOW_ALWAYS_ON_TOP; > +#else > +av_log(NULL, AV_LOG_WARNING, "Your SDL version doesn't support > SDL_WINDOW_ALWAYS_ON_TOP. Feature will be inactive.\n"); > +#endif > if (borderless) > flags |= SDL_WINDOW_BORDERLESS; > else > -- > 2.17.1 > Ping. -- S pozdravom / Best regards Daniel Kucera. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Am Mo., 13. Mai 2019 um 11:00 Uhr schrieb Daniel Kucera : > +#ifdef SDL_WINDOW_ALWAYS_ON_TOP > +{ "alwaysontop", OPT_BOOL, { }, "window always on top" }, > +#endif You could remove the condition here... > { "volume", OPT_INT | HAS_ARG, { _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 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
> > I can at least confirm that 2.0.4, which I have installed on one > machine, doesn't define this in the provided headers, and that ffmpeg > doesn't build against 2.0.4 with this patch. So there should be an > #ifdef SDL_WINDOW_ALWAYS_ON_TOP guard around this, and possibly around > the options definition. (And the docs should mention it?) > > https://hg.libsdl.org/SDL/annotate/3beca914a2ad/include/SDL_video.h > > Not sure how Windows behaves if compiled against 2.0.5 with > availability of the flag, but not the feature. ;-) [*] > > BTW, would this also be an option which could go into the "sdl2" output > device? (I'm not happy with separate code bases for these, personally.) > > Moritz > Thanks Moritz, I submited a new patch according to your recommendations. This patch compiles with 2.0.5 on Windows but doesn't have any effect (tested). I updated the docs to make this clear. Regarding libavdevice/sdl2 - this doesn't share the implementation of windows creation (which is shame) so this is a separate task to implement. -- S pozdravom / Best regards Daniel Kucera. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On Mon, May 13, 2019 at 12:54:58 +0530, Gyan wrote: > >> Since 2.0.6 it works on Windows too. > > Ping. > > Michael needs to confirm whether the build failure he had was due to his > SDL version < 2.0.5 I can at least confirm that 2.0.4, which I have installed on one machine, doesn't define this in the provided headers, and that ffmpeg doesn't build against 2.0.4 with this patch. So there should be an #ifdef SDL_WINDOW_ALWAYS_ON_TOP guard around this, and possibly around the options definition. (And the docs should mention it?) https://hg.libsdl.org/SDL/annotate/3beca914a2ad/include/SDL_video.h Not sure how Windows behaves if compiled against 2.0.5 with availability of the flag, but not the feature. ;-) [*] BTW, would this also be an option which could go into the "sdl2" output device? (I'm not happy with separate code bases for these, personally.) Moritz [*] My guess is that Windows just ignored this flag before its implementation: https://hg.libsdl.org/SDL/rev/2653833db94e ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On 13-05-2019 12:49 PM, Daniel Kučera wrote: Is qualified as 'X11 only, >= SDL 2.0.5' at https://wiki.libsdl.org/SDL_WindowFlags Gyan Since 2.0.6 it works on Windows too. Ping. Michael needs to confirm whether the build failure he had was due to his SDL version < 2.0.5 Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
>> >> Is qualified as 'X11 only, >= SDL 2.0.5' at >> https://wiki.libsdl.org/SDL_WindowFlags >> >> Gyan > > > Since 2.0.6 it works on Windows too. Ping. -- S pozdravom / Best regards Daniel Kucera. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
Dňa so 11. 5. 2019, 18:00 Gyan napísal(a): > > > On 11-05-2019 09:03 PM, Michael Niedermayer wrote: > > On Fri, May 10, 2019 at 12:12:17PM +0200, Daniel Kucera wrote: > >> From: Daniel Kucera > >> > >> Signed-off-by: Daniel Kucera > >> --- > >> doc/ffplay.texi | 2 ++ > >> fftools/ffplay.c | 4 > >> 2 files changed, 6 insertions(+) > >> > >> diff --git a/doc/ffplay.texi b/doc/ffplay.texi > >> index c305465078..a37c02dc0d 100644 > >> --- a/doc/ffplay.texi > >> +++ b/doc/ffplay.texi > >> @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using > left/right keys. Default is 1 > >> Disable graphical display. > >> @item -noborder > >> Borderless window. > >> +@item -alwaysontop > >> +Window always on top. > >> @item -volume > >> Set the startup volume. 0 means silence, 100 means no volume > reduction or > >> amplification. Negative values are treated as 0, values above 100 are > treated > >> diff --git a/fftools/ffplay.c b/fftools/ffplay.c > >> index 8f050e16e6..931dc08e2d 100644 > >> --- a/fftools/ffplay.c > >> +++ b/fftools/ffplay.c > >> @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; > >> static float seek_interval = 10; > >> static int display_disable; > >> static int borderless; > >> +static int alwaysontop; > >> static int startup_volume = 100; > >> static int show_status = 1; > >> static int av_sync_type = AV_SYNC_AUDIO_MASTER; > >> @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { > >> { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set > seek interval for left/right keys, in seconds", "seconds" }, > >> { "nodisp", OPT_BOOL, { _disable }, "disable graphical > display" }, > >> { "noborder", OPT_BOOL, { }, "borderless window" }, > >> +{ "alwaysontop", OPT_BOOL, { }, "window always on > top" }, > >> { "volume", OPT_INT | HAS_ARG, { _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 +3724,8 @@ int main(int argc, char **argv) > >> > >> if (!display_disable) { > >> int flags = SDL_WINDOW_HIDDEN; > >> +if (alwaysontop) > >> +flags |= SDL_WINDOW_ALWAYS_ON_TOP; > > fails to build > > > > fftools/ffplay.c: In function ‘main’: > > fftools/ffplay.c:3728:22: error: ‘SDL_WINDOW_ALWAYS_ON_TOP’ undeclared > (first use in this function) > > flags |= SDL_WINDOW_ALWAYS_ON_TOP; > > Is qualified as 'X11 only, >= SDL 2.0.5' at > https://wiki.libsdl.org/SDL_WindowFlags > > Gyan > Since 2.0.6 it works on Windows too. > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On 11-05-2019 09:03 PM, Michael Niedermayer wrote: On Fri, May 10, 2019 at 12:12:17PM +0200, Daniel Kucera wrote: From: Daniel Kucera Signed-off-by: Daniel Kucera --- doc/ffplay.texi | 2 ++ fftools/ffplay.c | 4 2 files changed, 6 insertions(+) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index c305465078..a37c02dc0d 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using left/right keys. Default is 1 Disable graphical display. @item -noborder Borderless window. +@item -alwaysontop +Window always on top. @item -volume Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values are treated as 0, values above 100 are treated diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 8f050e16e6..931dc08e2d 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; static float seek_interval = 10; static int display_disable; static int borderless; +static int alwaysontop; static int startup_volume = 100; static int show_status = 1; static int av_sync_type = AV_SYNC_AUDIO_MASTER; @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set seek interval for left/right keys, in seconds", "seconds" }, { "nodisp", OPT_BOOL, { _disable }, "disable graphical display" }, { "noborder", OPT_BOOL, { }, "borderless window" }, +{ "alwaysontop", OPT_BOOL, { }, "window always on top" }, { "volume", OPT_INT | HAS_ARG, { _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 +3724,8 @@ int main(int argc, char **argv) if (!display_disable) { int flags = SDL_WINDOW_HIDDEN; +if (alwaysontop) +flags |= SDL_WINDOW_ALWAYS_ON_TOP; fails to build fftools/ffplay.c: In function ‘main’: fftools/ffplay.c:3728:22: error: ‘SDL_WINDOW_ALWAYS_ON_TOP’ undeclared (first use in this function) flags |= SDL_WINDOW_ALWAYS_ON_TOP; Is qualified as 'X11 only, >= SDL 2.0.5' at https://wiki.libsdl.org/SDL_WindowFlags Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On Fri, May 10, 2019 at 12:12:17PM +0200, Daniel Kucera wrote: > From: Daniel Kucera > > Signed-off-by: Daniel Kucera > --- > doc/ffplay.texi | 2 ++ > fftools/ffplay.c | 4 > 2 files changed, 6 insertions(+) > > diff --git a/doc/ffplay.texi b/doc/ffplay.texi > index c305465078..a37c02dc0d 100644 > --- a/doc/ffplay.texi > +++ b/doc/ffplay.texi > @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using > left/right keys. Default is 1 > Disable graphical display. > @item -noborder > Borderless window. > +@item -alwaysontop > +Window always on top. > @item -volume > Set the startup volume. 0 means silence, 100 means no volume reduction or > amplification. Negative values are treated as 0, values above 100 are treated > diff --git a/fftools/ffplay.c b/fftools/ffplay.c > index 8f050e16e6..931dc08e2d 100644 > --- a/fftools/ffplay.c > +++ b/fftools/ffplay.c > @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; > static float seek_interval = 10; > static int display_disable; > static int borderless; > +static int alwaysontop; > static int startup_volume = 100; > static int show_status = 1; > static int av_sync_type = AV_SYNC_AUDIO_MASTER; > @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { > { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set seek > interval for left/right keys, in seconds", "seconds" }, > { "nodisp", OPT_BOOL, { _disable }, "disable graphical display" > }, > { "noborder", OPT_BOOL, { }, "borderless window" }, > +{ "alwaysontop", OPT_BOOL, { }, "window always on top" }, > { "volume", OPT_INT | HAS_ARG, { _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 +3724,8 @@ int main(int argc, char **argv) > > if (!display_disable) { > int flags = SDL_WINDOW_HIDDEN; > +if (alwaysontop) > +flags |= SDL_WINDOW_ALWAYS_ON_TOP; fails to build fftools/ffplay.c: In function ‘main’: fftools/ffplay.c:3728:22: error: ‘SDL_WINDOW_ALWAYS_ON_TOP’ undeclared (first use in this function) flags |= SDL_WINDOW_ALWAYS_ON_TOP; [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
> Can you also add a keypress event to make it switchable during play? > > Thanks, > Gyan I haven't found a function which would allow to modify window flags after creation: https://wiki.libsdl.org/SDL_GetWindowFlags -- S pozdravom / Best regards Daniel Kucera. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] ffplay: added option always on top for video window
On 10-05-2019 03:42 PM, Daniel Kucera wrote: From: Daniel Kucera Signed-off-by: Daniel Kucera --- doc/ffplay.texi | 2 ++ fftools/ffplay.c | 4 2 files changed, 6 insertions(+) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index c305465078..a37c02dc0d 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -66,6 +66,8 @@ Set custom interval, in seconds, for seeking using left/right keys. Default is 1 Disable graphical display. @item -noborder Borderless window. +@item -alwaysontop +Window always on top. @item -volume Set the startup volume. 0 means silence, 100 means no volume reduction or amplification. Negative values are treated as 0, values above 100 are treated diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 8f050e16e6..931dc08e2d 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -324,6 +324,7 @@ static int seek_by_bytes = -1; static float seek_interval = 10; static int display_disable; static int borderless; +static int alwaysontop; static int startup_volume = 100; static int show_status = 1; static int av_sync_type = AV_SYNC_AUDIO_MASTER; @@ -3581,6 +3582,7 @@ static const OptionDef options[] = { { "seek_interval", OPT_FLOAT | HAS_ARG, { _interval }, "set seek interval for left/right keys, in seconds", "seconds" }, { "nodisp", OPT_BOOL, { _disable }, "disable graphical display" }, { "noborder", OPT_BOOL, { }, "borderless window" }, +{ "alwaysontop", OPT_BOOL, { }, "window always on top" }, { "volume", OPT_INT | HAS_ARG, { _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 +3724,8 @@ int main(int argc, char **argv) if (!display_disable) { int flags = SDL_WINDOW_HIDDEN; +if (alwaysontop) +flags |= SDL_WINDOW_ALWAYS_ON_TOP; if (borderless) flags |= SDL_WINDOW_BORDERLESS; else Can you also add a keypress event to make it switchable during play? Thanks, Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".