summaryrefslogtreecommitdiff
path: root/fftools/ffplay.c
Commit message (Collapse)AuthorAge
* fftools/ffplay: fix YUV conversion modeNiklas Haas2022-06-27
| | | | | | | | | | | | | | GL and Metal cache the state at time of texture creation. GLES2 and Direct3D 11 use the state at time of the render copy call. So the only way we can get the correct behavior consistently is by making sure the state is set for both the upload *and* the draw call. This probably isn't our bug to fix (upstream should make itself behave consistently and also document its functions), but as it stands, `ffplay` is misrendering BT.709 as BT.601 on my stock Linux system, and that leaves a bad taste in my mouth. Signed-off-by: Niklas Haas <git@haasn.dev>
* fftools: drop the fake "default" option from ffplay/ffprobeAnton Khirnov2022-03-22
| | | | | | It tries to process any unhandled options as AVOptions. Handle this directly in cmdutils.c, without resorting to a confusing fake option definition (which is currently visible to the users in -help output).
* fftools/ffplay: drop options deprecated since 2011Anton Khirnov2022-03-22
|
* fftools/cmdutils: split common option handlers into their own fileAnton Khirnov2022-03-22
|
* ffplay: don't shadow global variableZhao Zhili2022-03-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: check AVFMT_NO_BYTE_SEEK flag for seek_by_bytesZhao Zhili2022-03-21
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* ffplay: convert to new channel layout-APIJames Almer2022-03-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffplay: switch to new FIFO APIAnton Khirnov2022-02-07
|
* fftools: Constify values from av_dict_get()Chad Fraleigh2021-11-18
| | | | | | | | Treat values returned from av_dict_get() as const, since they are internal to AVDictionary. Signed-off-by: Chad Fraleigh <chadf@triularity.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffplay: don't disable x11 compositingZane van Iperen2021-10-29
| | | | | | | | Prevents desktop stutters caused by the change (specifically on KDE). We're not a game, we don't actually need it disabled. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
* ffmpeg: use display matrix frame side data for autorotationJames Almer2021-09-16
| | | | | | | And give it priority over stream side data when present. Fixes part of ticket #6945. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplayLinjie Fu2021-08-05
| | | | Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
* Remove unnecessary avassert.h inclusionsAndreas Rheinhardt2021-07-22
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/avcodec: Stop including channel_layout.h in avcodec.hAndreas Rheinhardt2021-07-22
| | | | | | Also include channel_layout.h directly wherever used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffplay: 240M matrix is not the same as BT.601Valerii Zapodovnikov2021-06-08
| | | | | Signed-off-by: Valerii Zapodovnikov <val.zapod.vz@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat: Constify the API wrt AV(In|Out)putFormatAndreas Rheinhardt2021-04-27
| | | | | | | Also constify AVProbeData. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffplay: do not write out of rdft visualization textureMarton Balint2021-03-10
| | | | | | | | | | | | If the window is resized it was possible that xpos pointed outside the visualization texture. By rearranging the overflow check we make sure this (and a crash) does not happen. We also don't have to use xleft for start position, as that is 0 anyways, and if we ever want to take into account xleft then the texture should be positioned accordingly when rendering. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools: Switch to const AVCodec * where possibleAndreas Rheinhardt2021-03-02
| | | | | | | | | | | The obstacle to do so was in filter_codec_opts: It uses searches the AVCodec for options via the AV_OPT_SEARCH_FAKE_OBJ method, which requires using a void * that points to a pointer to a const AVClass. When using const AVCodec *, one can not simply use a pointer that points to the AVCodec's pointer to its AVClass, as said pointer is const, too. This is fixed by using a temporary pointer to the AVClass. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffmpeg, ffplay: Don't set refcounted_framesAndreas Rheinhardt2021-02-28
| | | | | | | It only affects the old and deprecated avcodec_decode_(video2|audio4) API which is no longer used here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffplay: reindent and some minor cosmeticsMarton Balint2021-02-19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: use av_packet_alloc() to allocate packetsMarton Balint2021-02-19
| | | | | | Heavily based on a patch by James Almer. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: use context AVPacket in decoder_decode_frame()Marton Balint2021-02-19
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: get rid of flush_pktMarton Balint2021-02-19
| | | | | | The packet serial can be used instead to detect when a flush is needed. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: fix autoexit doesn't work in the case of pb->errorZhao Zhili2020-09-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: do not set redundant channel count on abuffersink.Nicolas George2020-08-20
|
* ffplay: set stream_index to -1 earlier to prevent segfaultPeter Ross2020-04-25
| | | | | Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: Marton Balint <cus@passwd.hu>
* ffplay: flush correct stream after stats updateGyan Doshi2020-04-04
| | | | Stats and logs are written to stderr, not stdout.
* ffplay: always show stats at all log levels if requested by userGyan Doshi2020-04-04
| | | | | | | Since 3b491c5a500, stats would be hidden if loglevel was lower than info, even if -stats was set. Fixes #6962
* ffplay, avcodec, avformat: Don't initialize before av_packet_ref()Andreas Rheinhardt2020-03-28
| | | | | | | It already initializes the packet. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffplay: fix possible memory leak in decoderMarton Balint2020-03-08
| | | | | | Fixes ticket #8549. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: properly detect all window size changesMarton Balint2019-08-14
| | | | | | | | | | | | | | 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>
* ffplay: added option always on top for video windowDaniel Kucera2019-05-20
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Daniel Kucera <github@danman.eu>
* ffplay: add support for setting the number of filter threadsMarton Balint2019-02-07
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: add missing avfilter_graph_alloc result checkMarton Balint2019-02-07
| | | | | | Also do not allocate a graph at start, we will reallocate it anyway. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: use different decoder names for each media typeMarton Balint2019-02-07
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: fix -x and -y options when only one of them is usedMarton Balint2018-12-02
| | | | | | | | | | 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>
* ffplay: convert float math to int math in calculate_display_rectMarton Balint2018-12-02
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: add options to specify window positionDave Rice2018-10-07
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: add option to allow custom seek intervalGyan Doshi2018-09-05
| | | | At present, left and right keys are hardcoded to seek by 10 seconds.
* ffplay: do not drain existing filters when seekingMarton Balint2018-09-01
| | | | | | | 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>
* ffplay: add support for various YUV conversion modesMarton Balint2018-07-13
| | | | | | | 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>
* ffplay: ignore keypress events before a window is createdMarton Balint2018-06-20
| | | | | | | | | | 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>
* ffplay: Print codec_name if decoder for codec_id could not be found.Carl Eugen Hoyos2018-05-30
| | | | Reviewed-by: Marton Balint
* ffplay: Fix realloc_texture when input texture is NULL.Matt Oliver2018-04-18
| | | | | | | | | 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>
* lav*,tests: remove several register_all callsJosh de Kock2018-04-02
| | | | | | | 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>
* fftools, tools, examples: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: drop lock manager usewm42017-12-26
| | | | Deprecated and useless.
* ffplay: remove usage of AVCodecContext accessorsJames Almer2017-11-15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* ffplay: use SDL2 audio APIMarton Balint2017-11-06
| | | | | | | | 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>