summaryrefslogtreecommitdiff
path: root/ffplay.c
Commit message (Collapse)AuthorAge
* ffplay: add SDL2 supportMarton Balint2016-09-24
| | | | | | | This commit also drops SDL1 support for ffplay. Tested-by: James Almer <jamrial@gmail.com> (Windows, mingw-w64) Signed-off-by: Josh de Kock <josh@itanimul.li>
* cmdutils: remove the current working directory from the DLL search path on win32Hendrik Leppkes2016-08-08
| | | | | Reviewed-by: Matt Oliver <protogonoi@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffplay: Fix invalid array indexMichael Niedermayer2016-08-03
| | | | | | Found-by: Thomas Guilbert <tguilbert@google.com> Fixes: clusterfuzz_usan-2016-08-02 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffplay: Fix usage of private lavfi APITimo Rothenpieler2016-06-29
| | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
* | ffplay: ensure that we buffer at least 1 second of contentMarton Balint2016-06-19
| | | | | | | | | | | | | | In order to do that, we keep track of the total duration of packets in a packet queue. Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: factorize checking if a stream needs additional packetsMarton Balint2016-06-19
| | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: simplify display codeMarton Balint2016-05-31
| | | | | | | | | | | | And get rid of frame_queue_prev. Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: force setting alsa buffer sizeMarton Balint2016-05-07
| | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: convert to codecparMarton Balint2016-04-12
| | | | | | | | | | Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: fix silence insertion on error or pauseMarton Balint2016-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Insertion of silence was a bit broken since df34b700981de606ca4847e1ed0bfdf9ac3e9104 because the info whether or not the source buffer supposed to be silence must be kept between callbacks. Failing to do so causes rogue samples from the last buffer to be presented, I guess even a crash can occur under some circumstances. This patch uses a NULL audio_buf to keep the silence state across audio callbacks. Reviewed-by: Lukasz Marek <lukasz.m.luki2 at gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: remove redundant silence bufferLukasz Marek2016-03-22
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | ffplay: Remove "&& 0" from already disabled debug codeMichael Niedermayer2016-03-20
| | | | | | | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffplay: update docs after previous changes in ffplay mouse behaviourVittorio Gambaletta (VittGam)2016-01-20
| | | | | | | | | | Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: toggle full screen when double-clicking the video window with the ↵Vittorio Gambaletta (VittGam)2016-01-19
| | | | | | | | | | | | | | | | | | | | | | left mouse button Now that the seek only happens with the right mouse button, it makes sense to toggle full screen when double-clicking with the left mouse button, like other video players do. Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: seek only when pressing the right mouse button on the video windowVittorio Gambaletta (VittGam)2016-01-19
| | | | | | | | | | | | | | | | | | | | | | | | Seeking by clicking on the video window can be annoying, because the user might click on it accidentally while eg. trying to get focus on it, and ffplay seeks instead. This commit changes that behaviour to seek only when the right mouse button is used to click and drag on the window. Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net> Signed-off-by: Marton Balint <cus@passwd.hu>
* | Revert "ffplay: Fix auto insertion point of rotation filter"Michael Niedermayer2015-12-28
| | | | | | | | | | | | | | | | Revert requested by Balint Marton <cus@passwd.hu> See: [FFmpeg-devel] ffplay: insertion point of the auto rotation filter - Github ticket #141 This reverts commit 9cc1e644f39ed6a32e3a9bf5d0d6d663ca5791ab.
* | ffplay: replace rint by lrintGanesh Ajjanagadde2015-12-25
| | | | | | | | | | | | | | | | avoids the float to integer cast, and is slightly superior in terms of rounding ("Dutch/Gauss rounding"). Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | ffplay: Fix auto insertion point of rotation filterwanzhang2015-12-25
| | | | | | | | | | | | Fixes watermark rotation for videos using auto rotation Closes #141
* | ffplay: remove existing AVPicture usageMarton Balint2015-12-19
| | | | | | | | | | | | | | It is deprecated. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: use hypot()Ganesh Ajjanagadde2015-12-06
| | | | | | | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | Replace remaining occurances of av_free_packet with av_packet_unrefHendrik Leppkes2015-10-27
| |
* | Merge commit 'a5d42043093a39636a1f4021a37dd9c612479f6f'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit 'a5d42043093a39636a1f4021a37dd9c612479f6f': avformat: Always return ref-counted AVPacket Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* | ffplay: use a separate struct for the rescaled YUVA AVSubtitle rectanglesMarton Balint2015-10-24
| | | | | | | | | | | | | | | | | | | | | | Current code segfaults since the deprecation of AVSubtitleRect.pict because it freed/realloced AVSubtitleRect.pict.data by itself. The new code stores the generated YUVA AVSubtitle rectangles in their own struct and keeps the original AVSubtitle structure untouched, because overwriting it is considered invalid API usage. Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: eliminate stream_component_close forward declarationMarton Balint2015-10-12
| | | | | | | | | | | | No change in fuctionality. Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: close streams and AVFormatContext in the main threadMarton Balint2015-10-12
| | | | | | | | | | | | To avoid race conditions. Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: use correct context for av_logGanesh Ajjanagadde2015-10-05
| | | | | | | | | | | | | | | | | | Recent commits c3e8de1c248f8c742dd9e61a0c71ee56bba22c28 and 8dc6e92c3dc67a85026f3010045c7a28b1c0adc8 used av_log incorrectly. This fixes such usage. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: more robust condition variable creationGanesh Ajjanagadde2015-10-05
| | | | | | | | | | | | | | | | | | SDL_CreateCond can fail: https://wiki.libsdl.org/SDL_CreateCond. This patch makes creation more robust in one instance. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: log SDL error messagesGanesh Ajjanagadde2015-10-05
| | | | | | | | | | | | | | | | This logs the SDL error messages on failure of creation of SDL_CreateMutex, SDL_CreateCond, and SDL_CreateThread. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: more robust mutex creationGanesh Ajjanagadde2015-10-05
| | | | | | | | | | | | | | | | | | SDL_CreateMutex can fail: https://wiki.libsdl.org/SDL_CreateMutex. This patch makes creation more robust in one instance. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: more robust thread creationGanesh Ajjanagadde2015-10-04
| | | | | | | | | | | | | | | | | | SDL_CreateThread can fail: https://wiki.libsdl.org/SDL_CreateThread. This patch makes thread creation more robust in one instance. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: more robust mutex, condition variable handlingGanesh Ajjanagadde2015-10-03
| | | | | | | | | | | | | | | | | | SDL_CreateMutex and SDL_CreateCond can fail: https://wiki.libsdl.org/SDL_CreateMutex. This patch makes handling more robust in one instance. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | doc/ffplay, ffplay: add information regarding volume controlGanesh Ajjanagadde2015-09-27
| | | | | | | | | | | | | | | | | | ffplay now supports dynamic volume control. This documents the supported behavior. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: add support for interactive volume controlGanesh Ajjanagadde2015-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a feature heavily inspired by the mpv player. At the moment, methods for adjusting volume in ffplay are rather clumsy: either one needs to set it system-wide, or one needs to set it via the volume filter. This patch adds key bindings identical to the mpv defaults for muting/unmuting and increasing/decreasing the volume interactively without any introduction of external dependencies. TODO: doc update, possible mouse button bindings (mpv has this). Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: dynamically allocate filename bufferGanesh Ajjanagadde2015-09-27
| | | | | | | | | | | | | | | | | | | | | | filename was set to an arbitrary 1024 characters. ffplay would thus be unable to play files whose name exceeds that arbitrary threshold. This patch dynamically allocates and frees the filename buffer to remove such limitations. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: introduce key repeatsGanesh Ajjanagadde2015-09-27
| | | | | | | | | | | | | | | | | | | | Key repeats have been introduced simply because they improve usability in my experience for volume, brightness, and other such controls by speeding up the time taken to go from 0 to max intensity. As a side benefit, this enables rapid seeking through a file via left/right keys. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* | Remove left-over FF_API_AVFILTERBUFFER cruftHendrik Leppkes2015-09-05
| |
* | Put remaining pieces of CODEC_FLAG_EMU_EDGE under FF_API_EMU_EDGE.Ronald S. Bultje2015-08-28
| | | | | | | | | | | | The amv one probably looks suspicious, but since it's an intra-only codec, I couldn't possibly imagine what it would use the edge for, and the vsynth fate result doesn't change, so it's probably OK.
* | ffplay: remove unused include libavutil/colorspace.hZhang Rui2015-08-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffplay: increase MIN_FRAMES to 25Marton Balint2015-08-09
| | | | | | | | | | | | | | | | | | | | | | FFplay was using a 5 frame packet buffer, this is not much (e.g. 200 ms for 25fps video), when HLS is requesting a new segment via HTTP, it may take longer for the request to complete. Should fix ticket #4720. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: add specific constants for buffer fullness settings when using ↵Marton Balint2015-08-09
| | | | | | | | | | | | external clock Signed-off-by: Marton Balint <cus@passwd.hu>
* | cmdutils: remove sws_opts usage, simplify codeMichael Niedermayer2015-08-08
| | | | | | | | | | | | It has become unused as all code was switched to AVDictionary Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffplay: pass all sws options to the filter graphMichael Niedermayer2015-08-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffplay: do not block audio thread on WIN32Marton Balint2015-08-05
| | | | | | | | | | | | | | | | | | | | | | The windows SDL audio driver plays the old data in the buffer in a loop if it is not updated in time. So instead of waiting for data and blocking the the audio thread, return silence if no data is available. Should fix ticket #2289. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | ffplay: Use sws_scale to scale subtitlesMichael Niedermayer2015-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes some files from Ticket679 This also changes subtitles to 4:2:0 matching the output format and thus simplifying the blend code. This restricts placement to the chroma sample resolution though, speak up if you consider this a problem, say so, the code could be changed to use YUV444 for subtitles and scaling them down while blending, this would be slower though. The current code only uses a single swscale context and reinitializes it as needed, this could be changed as well if needed Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* | ffplay: use av_clip() instead of nested min & maxClément Bœsch2015-06-06
| | | | | | | | Note: {wanted,min,max}_samples are int variables.
* | ffplay&cmdutils:Factor get_rotation() code outMichael Niedermayer2015-05-03
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | ffplay: unify displaymatrix based rotation codeMichael Niedermayer2015-05-03
| | | | | | | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>