Commit Graph

23 Commits

Author SHA1 Message Date
Marton Balint a1c7014847 ffplay: properly detect all window size changes
SDL_WINDOWEVENT_SIZE_CHANGED should be used instead of SDL_WINDOWEVENT_RESIZED
because SDL_WINDOWEVENT_RESIZED is only emitted if the resize happened due to
an external event.

Fixes ticket #8072.

Additional references:
https://bugzilla.libsdl.org/show_bug.cgi?id=4760
https://wiki.libsdl.org/SDL_WindowEventID

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-08-14 21:57:46 +02:00
Daniel Kucera 8d9910a23a ffplay: added option always on top for video window
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Daniel Kucera <github@danman.eu>
2019-05-20 17:51:43 -03:00
Marton Balint 7cab5471b2 ffplay: add support for setting the number of filter threads
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-07 23:38:53 +01:00
Marton Balint fe99a51c40 ffplay: add missing avfilter_graph_alloc result check
Also do not allocate a graph at start, we will reallocate it anyway.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-07 23:38:53 +01:00
Marton Balint 28dd73a443 ffplay: use different decoder names for each media type
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-02-07 23:38:53 +01:00
Marton Balint 418c90faac ffplay: fix -x and -y options when only one of them is used
Previously if only -y was used then nothing happened, if only -x then zero
window height was set which is undefined in SDL and caused a black window.

From now on if only one dimension is set we calculate the other based on
size/aspect of the shown content.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-12-02 00:57:10 +01:00
Marton Balint 9a39c5449f ffplay: convert float math to int math in calculate_display_rect
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-12-02 00:57:09 +01:00
Dave Rice 1431ff2d37 ffplay: add options to specify window position
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-10-07 20:44:22 +02:00
Gyan Doshi 1a4a8df249 ffplay: add option to allow custom seek interval
At present, left and right keys are hardcoded to seek by 10 seconds.
2018-09-05 23:52:56 +05:30
Marton Balint 9fee22dbdd ffplay: do not drain existing filters when seeking
After a seek we drop all frames from the filter anyway. Audio filters already
had a similar approach.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-09-01 21:53:58 +02:00
Marton Balint 85bfcc46d1 ffplay: add support for various YUV conversion modes
SDL from version 2.0.8 has support for full range YUV and specifying
BT601/BT709 color space for YUV->RGB conversion.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-07-13 22:24:33 +02:00
Marton Balint e8050aa791 ffplay: ignore keypress events before a window is created
Current ffplay code assumes that the read thread is in its main loop before any
key events are captured, but apparently on IOS even keypresses without a window
are forwared.

Fixes ticket #7252.

Signed-off-by: Marton Balint <cus@passwd.hu>
2018-06-20 22:26:41 +02:00
Carl Eugen Hoyos 53d6d4f266 ffplay: Print codec_name if decoder for codec_id could not be found.
Reviewed-by: Marton Balint
2018-05-30 01:09:49 +02:00
Matt Oliver 6be690685a ffplay: Fix realloc_texture when input texture is NULL.
SDL_QueryTexture and SDL_DestroyTexture require that the input texture
pointer be non-null. Debug builds of SDL will correctly check for this
and break program execution. This patch fixes this by checking the
status of the texture pointer.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2018-04-18 18:57:07 +10:00
Josh de Kock 89029bd2c7 lav*,tests: remove several register_all calls
avdevice_register_all() is still required to register devices into
lavf (this is required due to lavd being somewhat of a hack).

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-04-02 03:26:22 +01:00
Marton Balint 25a2d269bd fftools, tools, examples: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
wm4 e24f192a9f ffplay: drop lock manager use
Deprecated and useless.
2017-12-26 02:50:00 +01:00
James Almer e61825d5b4 ffplay: remove usage of AVCodecContext accessors
Signed-off-by: James Almer <jamrial@gmail.com>
2017-11-15 01:14:22 -03:00
Marton Balint d68a557df4 ffplay: use SDL2 audio API
It allows us to specify what kind of audio parameter changes are allowed.

Should fix ticket #6721.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-06 00:00:38 +01:00
Marton Balint 415038f2bd ffplay: only use hardware accelerated SDL texture formats
Typically only a small subset of the SDL texture formats are supported directly
by the SDL renderer drivers, the rest is software emulated. It's better if
libswscale does the format conversion to a hardware-accelerated texture format
instead of SDL.

This should fix video render slowdowns with some texture formats after
3bd2228d05.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-04 19:27:37 +01:00
Marton Balint 84d31e2475 ffplay: create the window and the renderer before starting playback
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-11-04 19:27:37 +01:00
James Almer 7b550c5f84 Merge commit 'b3739599bda740ac12d3dde31a331b744df99123'
* commit 'b3739599bda740ac12d3dde31a331b744df99123':
  lavc: Drop deprecated emu edge functionality

Merged-by: James Almer <jamrial@gmail.com>
2017-10-23 16:04:31 -03:00
James Almer fd5f4ac081 Merge commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524'
* commit 'c95169f0ec68bdeeabc5fde8aa4076f406242524':
  build: Move cli tool sources to a separate subdirectory

Merged-by: James Almer <jamrial@gmail.com>
2017-10-01 18:26:36 -03:00