Marton Balint
36d671438a
fftools/ffplay: use av_packet_alloc() to allocate packets
...
Heavily based on a patch by James Almer.
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Marton Balint
44fb1f845d
fftools/ffplay: use context AVPacket in decoder_decode_frame()
...
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Marton Balint
a29928e646
fftools/ffplay: get rid of flush_pkt
...
The packet serial can be used instead to detect when a flush is needed.
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Zhao Zhili
99e12b5736
ffplay: fix autoexit doesn't work in the case of pb->error
...
Signed-off-by: Marton Balint <cus@passwd.hu>
4 years ago
Nicolas George
973540118a
ffplay: do not set redundant channel count on abuffersink.
5 years ago
Peter Ross
6cfb33f976
ffplay: set stream_index to -1 earlier to prevent segfault
...
Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Marton Balint <cus@passwd.hu>
5 years ago
Gyan Doshi
b195b5f2ba
ffplay: flush correct stream after stats update
...
Stats and logs are written to stderr, not stdout.
5 years ago
Gyan Doshi
2d6a89872e
ffplay: always show stats at all log levels if requested by user
...
Since 3b491c5a50
, stats would be hidden if loglevel was lower than
info, even if -stats was set.
Fixes #6962
5 years ago
Andreas Rheinhardt
3362330741
ffplay, avcodec, avformat: Don't initialize before av_packet_ref()
...
It already initializes the packet.
Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
5 years ago
Marton Balint
af7ec793d4
fftools/ffplay: fix possible memory leak in decoder
...
Fixes ticket #8549 .
Signed-off-by: Marton Balint <cus@passwd.hu>
5 years ago
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>
6 years ago
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>
6 years ago
Marton Balint
7cab5471b2
ffplay: add support for setting the number of filter threads
...
Signed-off-by: Marton Balint <cus@passwd.hu>
6 years ago
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>
6 years ago
Marton Balint
28dd73a443
ffplay: use different decoder names for each media type
...
Signed-off-by: Marton Balint <cus@passwd.hu>
6 years ago
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>
6 years ago
Marton Balint
9a39c5449f
ffplay: convert float math to int math in calculate_display_rect
...
Signed-off-by: Marton Balint <cus@passwd.hu>
6 years ago
Dave Rice
1431ff2d37
ffplay: add options to specify window position
...
Signed-off-by: Marton Balint <cus@passwd.hu>
6 years ago
Gyan Doshi
1a4a8df249
ffplay: add option to allow custom seek interval
...
At present, left and right keys are hardcoded to seek by 10 seconds.
7 years ago
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>
7 years ago
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>
7 years ago
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>
7 years ago
Carl Eugen Hoyos
53d6d4f266
ffplay: Print codec_name if decoder for codec_id could not be found.
...
Reviewed-by: Marton Balint
7 years ago
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>
7 years ago
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>
7 years ago
Marton Balint
25a2d269bd
fftools, tools, examples: migrate to AVFormatContext->url
...
Signed-off-by: Marton Balint <cus@passwd.hu>
7 years ago
wm4
e24f192a9f
ffplay: drop lock manager use
...
Deprecated and useless.
7 years ago
James Almer
e61825d5b4
ffplay: remove usage of AVCodecContext accessors
...
Signed-off-by: James Almer <jamrial@gmail.com>
7 years ago
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>
7 years ago
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>
7 years ago
Marton Balint
84d31e2475
ffplay: create the window and the renderer before starting playback
...
Signed-off-by: Marton Balint <cus@passwd.hu>
7 years ago