summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
Commit message (Collapse)AuthorAge
* make av_interleaved_write_frame() flush packets when pkt is NULLJindrich Makovicka2012-03-27
| | | | | | | | This patch allows the user to force flushing of all queued packets by calling av_interleaved_write_frame() with pkt set to NULL. Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv> Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: make av_interleave_packet_per_dts() private.Anton Khirnov2012-03-20
| | | | | There is no reason for it to be public, it's only meant to be used internally.
* lavf: deprecate av_read_packet().Anton Khirnov2012-03-20
| | | | | | The caller can achieve the same effect (i.e. getting raw unparsed/mangled packets) with av_read_frame() and AVFMT_FLAG_NOPARSE | AVFMT_FLAG_NOFILLIN
* lavf: use AVStream.discard to disable queueing attached pictures.Anton Khirnov2012-03-20
|
* lavf: requeue attached pictures after seeking.Anton Khirnov2012-03-20
| | | | | This allows the caller to get them without special code even after seeking before receiving any data.
* libavformat: Use AVFormatContext.probesize in init_inputMartin Storsjö2012-03-19
| | | | | | | | | | | | | This was forgotten in the transition from av_open_input_file to avformat_open_input, see 603b8bc2a1. This doesn't change anything for the default case where the option isn't set, since PROBE_BUF_MAX is 1048576 (which was used as max probe size earlier) while the default value for the probesize option is 5000000, which for the probe function is clipped to PROBE_BUF_MAX anyway. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: remove some disabled code.Anton Khirnov2012-03-17
|
* lavf: only set average frame rate for video.Anton Khirnov2012-03-17
|
* lavf: remove a pointless check.Anton Khirnov2012-03-17
| | | | Timebase is already checked in avpriv_set_pts_info().
* lavf: don't select an attached picture as default stream for seeking.Anton Khirnov2012-03-15
|
* cosmetics: reindentJustin Ruggles2012-03-05
|
* avformat: do not require a pixel/sample format if there is no decoderJustin Ruggles2012-03-05
| | | | | | | | Also, do not keep trying to find and open a decoder in try_decode_frame() if we already tried and failed once. Fixes always searching until max_analyze_duration in avformat_find_stream_info() when demuxing codecs without a decoder.
* avformat: do not fill-in audio packet duration in compute_pkt_fields()Justin Ruggles2012-03-05
| | | | Use the estimated duration only to calculate missing timestamps if needed.
* lavf: Use av_get_audio_frame_duration() in get_audio_frame_size()Justin Ruggles2012-03-05
| | | | | | | | | | Also, do not give AVCodecContext.frame_size priority for muxing. Updated 2 FATE references: dxa-feeble - adds 1 audio frame that is still within 2 seconds as specified by -t 2 in the FATE test wmv8-drm-nodec - durations are not needed. previously they were estimated using the packet size and average bit rate.
* avformat: do not require frame_size in avformat_find_stream_info() for CELTJustin Ruggles2012-03-05
| | | | | In Ogg/CELT, frame_size is found in the same place as the sample_rate and channels, so we do not need to force the frame_size to be parsed.
* avformat: do not require frame_size in avformat_find_stream_info() for MP1/2/3Justin Ruggles2012-03-05
| | | | | It was only needed to avoid a bad time base (and thus non-monotone timestamps) for stream copy to avi.
* avformat: do not require frame_size in avformat_find_stream_info() for AACJustin Ruggles2012-03-05
| | | | We already will get the needed info because of CODEC_CAP_CHANNEL_CONF
* lavf: deobfuscate read_frame_internal().Anton Khirnov2012-03-05
| | | | | | | | | | | | | | Split off packet parsing into a separate function. Parse full packets at once and store them in a queue, eliminating the need for tracking parsing state in AVStream. The horrible unreadable loop in read_frame_internal() now isn't weirdly ordered and doesn't contain evil gotos, so it should be much easier to understand. compute_pkt_fields() now invents slightly different timestamps for two raw vc1 tests, due to has_b_frames being set a bit later. They shouldn't be more wrong (or right) than previous ones.
* lavf: make read_from_packet_buffer() more flexible.Anton Khirnov2012-03-05
| | | | | | | | Make packet buffer a parameter, don't hardcode it to be AVFormatContext.packet_buffer. Also move the function higher in the file, since it will be called from read_frame_internal().
* lavf: factorize freeing a packet buffer.Anton Khirnov2012-03-05
|
* avcodec: add a Vorbis parser to get packet durationJustin Ruggles2012-03-03
| | | | This also allows for removing some of the Vorbis-related hacks.
* id3v2: remove unused ff_id3v2_read().Anton Khirnov2012-02-29
| | | | Rename ff_id3v2_read_all to ff_id3v2_read().
* lavf: export id3v2 attached pictures as streams.Anton Khirnov2012-02-29
|
* lavf: generic code for exporting attached pictures.Anton Khirnov2012-02-29
|
* lavf: don't guess r_frame_rate from either stream or codec timebase.Anton Khirnov2012-02-26
| | | | | | | Neither of those is guaranteed to be connected to framerate in any way (if it even exists). Fixes bug 56.
* lavf: don't set codec timebase in avformat_find_stream_info().Anton Khirnov2012-02-26
| | | | It's not supposed to be set outside of lavc.
* lavf: move the packet keyframe setting code.Anton Khirnov2012-02-24
| | | | | | | | | | compute_pkt_fields() is for unreliable estimates or guessing. The keyframe information from the parser is (at least in theory) reliable, so it should be used even when the other guessing is disabled with the AVFMT_FLAG_NOFILLIN flag. Therefore, move setting the packet keyframe flag based on parser information from compute_pkt_fields() to read_frame_internal().
* lavf: don't set AVCodecContext.has_b_frames in compute_pkt_fields().Anton Khirnov2012-02-22
| | | | | | | | | | | It is not supposed to be done outside lavc. This is basically a revert of 818062f2f346df30f4ec0c0c1f54e8025cc3a80a. It is unclear what issue this was supposed to fix, if it reappears again it will have to be fixed in a more proper place. The wtv-demux test change is because the sample starts with a B-frame.
* avcodec: add duration field to AVCodecParserContextJustin Ruggles2012-02-20
| | | | | This will allow parsers to export the duration of the current frame being output, if known, instead of using AVCodecContext.frame_size.
* lavf: fix aspect ratio mismatch message.Andrey Utkin2012-02-12
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: add functions for accessing the fourcc<->CodecID mapping tables.Anton Khirnov2012-01-31
| | | | Fixes bug 212.
* lavc: set AVCodecContext.codec in avcodec_get_context_defaults3().Anton Khirnov2012-01-31
| | | | | | | | | This way, if the AVCodecContext is allocated for a specific codec, the caller doesn't need to store this codec separately and then pass it again to avcodec_open2(). It also allows to set codec private options using av_opt_set_* before opening the codec.
* lavc: add avcodec_is_open().Anton Khirnov2012-01-31
| | | | | | | It allows to check whether an AVCodecContext is open in a documented way. Right now the undocumented way this check is done in lavf/lavc is by checking whether AVCodecContext.codec is NULL. However it's desirable to be able to set AVCodecContext.codec before avcodec_open2().
* avformat_write_header(): detail error messageRafaël Carré2012-01-30
| | | | | | | Give the exact aspect ratios when there is a mismatch between encoder and muxer. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: remove disabled FF_API_SET_PTS_INFO cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_SEEK_PUBLIC cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_NEW_STREAM cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_PKT_DUMP cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_FIND_INFO_TAG cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_PARSE_DATE cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_DUMP_FORMAT cruftAnton Khirnov2012-01-27
|
* lavf: remove disabled FF_API_FORMAT_PARAMETERS cruftAnton Khirnov2012-01-27
| | | | | Also remove now unused AVFormatParameters struct and AVOutputFormat.set_parameters().
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* lavf: prevent infinite loops while flushing in avformat_find_stream_infoJanne Grunau2012-01-26
| | | | | | | | | If no data was seen for a stream decoder are returning 0 when fed with empty packets for flushing. We can stop flushing when the decoder does not return delayed delayed frames anymore. Changes try_decode_frame() return value to got_picture or negative error. CC: libav-stable@libav.org
* libavformat: Add a flag for muxers that support write_packet(NULL) for flushingMartin Storsjö2012-01-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: force single-threaded decoding in avformat_find_stream_infoJanne Grunau2012-01-20
| | | | | | | The H.264 decoder needs SPS and PPS for initialization during multi-threaded decoding. When probed single-threaded SPS and PPS are copied to extradata and are available for proper initialization of the decoder before the first frame is decoded.
* lavf: free packets for muxers implementing interleave_packet().Anton Khirnov2012-01-18
| | | | Fixes a memleak.
* utils: Check for extradata size overflows.Alex Converse2012-01-12
|
* lavf: cosmetics, reformat av_read_frame().Anton Khirnov2012-01-05
|
* lavf: refactor av_read_frame() to make it easier to understand.Anton Khirnov2012-01-05
|