summaryrefslogtreecommitdiff
path: root/avplay.c
Commit message (Collapse)AuthorAgeFilesLines
* lavfi: use avfilter_unref_bufferp() where appropriate.Anton Khirnov2012-07-221-9/+3
|
* lavr: Use AV_SAMPLE_FMT_NONE to auto-select the internal sample formatJustin Ruggles2012-07-081-2/+0
| | | | Also make this the default value.
* avplay: update input filter pointer when the filtergraph is reset.Anton Khirnov2012-07-051-0/+1
| | | | Fixes an invalid read on size change.
* avplay: Add an option for not limiting the input buffer sizeMartin Storsjö2012-07-041-2/+5
| | | | | | | | | | | | | | | | | | | | | | For reading from normal files on disk, the queue limits for demuxed data work fine, but for reading data from realtime streams, they mean we're not reading from the input stream at all once the queue limit has been reached. For TCP streams, this means that writing to the socket from the peer side blocks (potentially leading to the peer dropping data), and for UDP streams it means that our kernel might drop data. For some protocols/servers, the server initially sends a large burst with data to fill client side buffers, but once filled, we should keep reading to avoid dropping data. For all realtime streams, it IMO makes sense to just buffer as much as we get (rather in buffers in avplay.c than in OS level buffers). With this option set, the input thread should always be blocking waiting for more input data, never sleeping waiting for the decoder to consume data. Signed-off-by: Martin Storsjö <martin@martin.st>
* avplay: fix write on freed memory for rawvideoLuca Barbato2012-07-031-2/+4
| | | | | | | Do not assume avpacket and the decoded frames are independent. To be absolutely sure and not sprinkle av_free_packet around the code the call had been placed before getting the frame and on the error path.
* cmdutils: Pass the actual chosen encoder to filter_codec_optsMartin Storsjö2012-06-301-1/+1
| | | | | | | This allows passing the right options to encoders when there's more than one encoder for a certain codec id. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace usleep() calls with av_usleep()Mans Rullgard2012-06-221-2/+2
| | | | | | | This reduces the dependency on unistd.h which is not available on all systems. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Avoid C99 variable declarations within for statements.Diego Biurrun2012-06-141-3/+3
| | | | | We generally do not declare variables within for statements and there are compilers that choke on such constructs.
* avplay: use buffersrc instead of custom input filter.Anton Khirnov2012-06-051-221/+76
| | | | | | | We do not allow user filters, so avtools shouldn't use them either. It also allows to reuse buffer management code from avconv, thus reducing duplication.
* lavfi: add video buffer sink, and use it in avtoolsAnton Khirnov2012-05-091-8/+21
| | | | | | Also add the public interface libavfilter/buffersink.h. Based on a commit by Stefano Sabatini.
* avplay: properly close/reopen AVAudioResampleContext on channel layout changeJustin Ruggles2012-05-071-1/+3
| | | | fixes Bug#280
* avplay: use libavresample for sample format conversion and channel mixingJustin Ruggles2012-05-011-38/+86
| | | | | | | SDL only supports s16 sample format and a limited number of channel layouts. Some versions of SDL on some systems support 4-channel and 6-channel output, but it's safer overall to downmix any layout with more than 2 channels to stereo.
* Remove lowres video decodingMans Rullgard2012-04-211-5/+1
| | | | | | | This feature is complex, of questionable utility, and slows down normal decoding. Signed-off-by: Mans Rullgard <mans@mansr.com>
* avplay: update get_buffer to be inline with avconvLuca Barbato2012-04-161-0/+4
| | | | | The buffer must have its dimension, pixel format and aspect ratio set.
* avconv: get output pixel format from lavfi.Anton Khirnov2012-04-151-1/+2
| | | | | | | This way we don't require a clearly defined corresponding input stream. The result for the xwd test changes because rgb24 is now chosen instead of bgra.
* avfiltergraph: make the AVFilterInOut alloc/free API publicStefano Sabatini2012-04-141-2/+2
| | | | | | | This is required for letting applications to create and destroy AVFilterInOut structs in a convenient way. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avplay: Don't free video filters string until the end of decoding.Alex Converse2012-04-111-1/+1
| | | | | | av_freep()ing inside configure_video_filters() leaves a dangling reference in the calling code, and the filter string is needed again when reconfiguring video filters for a size change.
* avplay: Don't try to scale timestamps if the tb isn't setMartin Storsjö2012-04-061-1/+1
| | | | | | | | | | If get_filtered_video_frame failed above, tb might not be initialized at all, so don't scale using it. This fixes cases where avplay could crash if aborting avformat_find_stream_info with ctrl+c. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace memset(0) by zero initializations.Diego Biurrun2012-03-281-2/+1
| | | | Also remove one pointless zero initialization in rangecoder.c.
* avplay: remove an unused variable.Anton Khirnov2012-02-291-1/+0
|
* avplay: fix -threads optionJanne Grunau2012-02-211-12/+0
| | | | | | | | The AVOptions based default to threads auto in 2473a45c8 works only if avplay does not use custom option handling for -threads. CC: <libav-stable@libav.org>
* avplay: reset decoder flush state when seekingJustin Ruggles2012-02-061-1/+3
| | | | | Fixes seeking after decoder has already been flushed for codecs using CODEC_CAP_DELAY.
* avplay: use the correct array size for stride.Anton Khirnov2012-01-281-1/+1
| | | | AV_NUM_DATA_POINTERS instead of 4.
* Drop unnecessary prefix from *sink* variable and struct names.Diego Biurrun2012-01-251-3/+3
|
* avplay: remove the -er option.Anton Khirnov2012-01-241-3/+0
| | | | Error recognition flags can and should be set directly with AVOptions.
* threads: change the default for threads back to 1Janne Grunau2012-01-211-0/+2
| | | | | | Using threaded decoding by default breaks backward compatibility if AVHWAccel is used or if an appliction sets threadunsafe callbacks. Avconv and avplay still use -threads auto if not specified.
* cosmetics: Rename ffsink to avsink.Diego Biurrun2012-01-191-3/+3
|
* Fix a bunch of platform name and other typos.Diego Biurrun2012-01-111-1/+1
|
* avplay: Don't call avio_set_interrupt_cb(NULL)Martin Storsjö2012-01-041-1/+0
| | | | | | | | | Since we don't use avio_set_interrupt_cb for interrupt callbacks, we don't need to call it to reset the interrupt cb either. This avoids a warning about use of deprecated functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* avplay: K&R cleanupAneesh Dogra2012-01-011-271/+275
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* cosmetics: Drop unnecessary parentheses around return values.Diego Biurrun2011-12-301-1/+1
|
* lavfi: add avfilter_copy_frame_props()Stefano Sabatini2011-12-251-2/+2
| | | | | avfilter_copy_frame_props() avoids code duplication and increases robustness.
* lavc: add a sample_aspect_ratio field to AVFrameStefano Sabatini2011-12-251-1/+1
| | | | | | | The sample aspect ratio is a per-frame property, so it makes sense to define it in AVFrame rather than in the codec/stream context. Simplify application-level sample aspect ratio information extraction, and allow further simplifications.
* avplay: clear pkt_temp when pkt is freed.Michael Niedermayer2011-12-191-0/+1
| | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Marton Balint <cus@passwd.hu> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* avcodec: deprecate AVFrame.ageMans Rullgard2011-12-181-1/+0
| | | | | | | | This was intended as an optimisation for skipped blocks in MPEG2 P-frames and never used elsewhere. Removing this "optimisation" speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9). Signed-off-by: Mans Rullgard <mans@mansr.com>
* Replace all uses of av_close_input_file() with avformat_close_input().Anton Khirnov2011-12-121-2/+1
|
* avplay: don't request a stereo downmixJustin Ruggles2011-12-111-9/+0
| | | | Multi-channel output works just fine for me with SDL 1.2.14.
* avplay: use avcodec_decode_audio4()Justin Ruggles2011-12-041-16/+27
|
* avplay: use a separate buffer for playing silenceJustin Ruggles2011-12-041-3/+3
|
* avplay: Set the new interrupt callbackMartin Storsjö2011-11-181-2/+3
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avplay: reset rdft when closing stream.Justin Ruggles2011-11-081-0/+2
| | | | | this fixes a crash when cycling audio streams if the spectrograph is displayed.
* Call avformat_network_init/deinit in the programsMartin Storsjö2011-11-061-0/+2
| | | | | | | | | Calling the init function will become mandatory at some later point. By calling it, more heavy network init (such as SSL/TLS library init) can be done once at startup, instead of implicitly when used (which could lead to it being done a number of times). Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace outdated references to ffmpeg tool with avconv.Diego Biurrun2011-11-021-1/+1
|
* avplay: fix fullscreen behaviour with SDL 1.2.14 on Mac OS XMarton Balint2011-10-221-2/+10
| | | | The blue channel went missing when toggling fullscreen on Mac OS X.
* macosx: use the default surface on newer sdlLuca Barbato2011-10-171-4/+4
| | | | | SDL 1.2.14 works fine with default colorspace on macosx and seems to have some issues with 24bit surfaces and resize in addition.
* avplay: free the active audio packet at exit.Justin Ruggles2011-10-121-0/+1
| | | | fixes a memleak
* avplay: free rdft data used for spectrogram analysis.Justin Ruggles2011-10-121-0/+5
| | | | fixes a memleak
* cmdutils/avtools: simplify show_help() by using av_opt_child_class_next()Anton Khirnov2011-10-121-12/+3
|
* avtools: parse loglevel before all the other options.Anton Khirnov2011-09-261-0/+1
| | | | | This way it can be applied to cmdutils too -- e.g. showing the banner and printing startup messages.
* avplay: flush audio decoder with empty packets at EOF if the decoder hasJustin Ruggles2011-09-221-6/+23
| | | | CODEC_CAP_DELAY set.