Currently, AVStream contains an embedded AVCodecContext instance, which
is used by demuxers to export stream parameters to the caller and by
muxers to receive stream parameters from the caller. It is also used
internally as the codec context that is passed to parsers.
In addition, it is also widely used by the callers as the decoding (when
demuxer) or encoding (when muxing) context, though this has been
officially discouraged since Libav 11.
There are multiple important problems with this approach:
- the fields in AVCodecContext are in general one of
* stream parameters
* codec options
* codec state
However, it's not clear which ones are which. It is consequently
unclear which fields are a demuxer allowed to set or a muxer allowed to
read. This leads to erratic behaviour depending on whether decoding or
encoding is being performed or not (and whether it uses the AVStream
embedded codec context).
- various synchronization issues arising from the fact that the same
context is used by several different APIs (muxers/demuxers,
parsers, bitstream filters and encoders/decoders) simultaneously, with
there being no clear rules for who can modify what and the different
processes being typically delayed with respect to each other.
- avformat_find_stream_info() making it necessary to support opening
and closing a single codec context multiple times, thus
complicating the semantics of freeing various allocated objects in the
codec context.
Those problems are resolved by replacing the AVStream embedded codec
context with a newly added AVCodecParameters instance, which stores only
the stream parameters exported by the demuxers or read by the muxers.
30000/1001 fps isnt implemented as i dont know which are the correct interleaving parameters,
pointers to the appropriate spec and page are welcome
Fixes Ticket2597
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f6ee61fb05482c617f5deee29a190d8ff483b3d1':
lavc: export DV profile API used by muxer/demuxer as public
Conflicts:
configure
doc/APIchanges
libavcodec/Makefile
libavcodec/dv_profile.c
libavcodec/dv_profile.h
libavcodec/version.h
libavformat/dvenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '3cbe1126530449336e2ce59b194bdb8c4eb4abb4':
dv: Split DV data table declarations into their own header
Conflicts:
libavcodec/dvdata.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This is necessary to avoid target config settings bleeding into the host
compilation process with hardcoded tables and the DV VLC tables no longer
present as static tables in a header file.
Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).
Signed-off-by: Martin Storsjö <martin@martin.st>
* qatar/master:
mpegvideo_enc: don't use deprecated avcodec_encode_video().
cmdutils: refactor -codecs option.
avconv: make -shortest a per-output file option.
lavc: add avcodec_descriptor_get_by_name().
lavc: add const to AVCodec* function parameters.
swf(dec): replace CODEC_ID with AV_CODEC_ID
dvenc: don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE
rtmpdh: Do not generate the same private key every time when using libnettle
rtp: remove ff_rtp_get_rtcp_file_handle().
rtsp.c: use ffurl_get_multi_file_handle() instead of ff_rtp_get_rtcp_file_handle()
avio: add (ff)url_get_multi_file_handle() for getting more than one fd
h264: vdpau: fix crash with unsupported colorspace
amrwbdec: Decode the fr_quality bit properly
Conflicts:
Changelog
cmdutils.c
cmdutils_common_opts.h
doc/ffmpeg.texi
ffmpeg.c
ffmpeg.h
ffmpeg_opt.c
libavcodec/h264.c
libavcodec/options.c
libavcodec/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
mpc8: return more meaningful error codes.
mpc: return more meaningful error codes.
wv,mpc8: don't return apetag data in packets.
rtmp: do not warn about receiving metadata packets
x86: h264dsp: Adjust YASM #ifdefs
x86: yadif: Mark mmxext optimizations as such
h264: convert loop filter strength dsp function to yasm.
Improve descriptiveness of a number of codec and container long names
Conflicts:
libavcodec/flvdec.c
libavcodec/libopenjpegdec.c
libavformat/apetag.c
libavformat/mp3dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
avformat: Drop pointless "format" from container long names
swscale: bury one more piece of inline asm under HAVE_INLINE_ASM.
wv: K&R formatting cosmetics
configure: Add missing descriptions to help output
h264_ps: declare array of colorspace strings on its own line.
fate: amix: specify f32 sample format for comparison
tiny_psnr: support 32-bit float samples
eamad/eatgq/eatqi: call special EA IDCT directly
eamad: remove use of MpegEncContext
mpegvideo: remove unnecessary inclusions of faandct.h
af_asyncts: avoid overflow in out_size with large delta values
af_asyncts: add first_pts option
Conflicts:
configure
libavcodec/eamad.c
libavcodec/h264_ps.c
libavformat/crcenc.c
libavformat/ffmdec.c
libavformat/ffmenc.c
libavformat/framecrcenc.c
libavformat/md5enc.c
libavformat/nutdec.c
libavformat/rawenc.c
libavformat/yuv4mpeg.c
tests/tiny_psnr.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Some demuxers set a timecode in the format or streams metadata. The
muxers now make use of this metadata instead of a duplicated private
option.
This makes possible transparent copy of the timecode when transmuxing
and transcoding.
-timecode option for MPEG1/2 codec is also renamed to -gop_timecode. The
global ffmpeg -timecode option will set it anyway so no option change
visible for the user.
* qatar/master:
rtmp: Support 'rtmp_live', an option which specifies if the media is a live stream.
av_samples_fill_array: Mark unmodified function argument as const.
lagarith: add YUY2 decoding support
Support decoding unaligned rgb24 lagarith.
dv: Split profile handling code into a separate file.
flvenc: use AVFormatContext, not AVCodecContext for logging.
mov: Remove write-only variable in mov_read_chan().
fate: Change the probe-format refs to match the final text format committed.
fate: Add avprobe as a make dependency
Add probe fate tests to test for regressions in detecting media types.
fate: Add oneline comparison method
qdm2: clip array indices returned by qdm2_get_vlc().
avplay: properly close/reopen AVAudioResampleContext on channel layout change
avcodec: do not needlessly set packet size to 0 in avcodec_encode_audio2()
avcodec: for audio encoding, reset output packet when it is not valid
avcodec: refactor avcodec_encode_audio2() to merge common branches
avcodec: remove fallbacks for AVCodec.encode() in avcodec_encode_audio2()
Conflicts:
ffplay.c
libavcodec/Makefile
libavcodec/dvdata.c
libavcodec/dvdata.h
libavcodec/qdm2.c
libavcodec/utils.c
libavformat/flvenc.c
libavformat/mov.c
tests/Makefile
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Prefix the functions/tables brktimegm, pcm_read_seek,
dv_offset_reset, voc_get_packet, codec_movaudio_tags,
codec_movvideo_tags.
After this, lavf has no global symbols without the proper prefix.
Signed-off-by: Martin Storsjö <martin@martin.st>
* qatar/master: (47 commits)
lavc: hide private symbols.
lavc: deprecate img_get_alpha_info().
lavc: use avpriv_ prefix for ff_toupper4.
lavc: use avpriv_ prefix for ff_copy_bits and align_put_bits.
lavc: use avpriv_ prefix for ff_ac3_parse_header.
lavc: use avpriv_ prefix for ff_frame_rate_tab.
lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
lavc: use avpriv_ prefix for ff_split_xiph_headers.
lavc: use avpriv_ prefix for ff_dirac_parse_sequence_header.
lavc: use avpriv_ prefix for some dv symbols used in lavf.
lavc: use avpriv_ prefix for some flac symbols used in lavf.
lavc: use avpriv_ prefix for some mpeg4audio symbols used in lavf.
lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
lavc: use avpriv_ prefix for ff_aac_parse_header().
lavf: hide private symbols.
lavf: use avpriv_ prefix for some dv functions.
lavf: use avpriv_ prefix for ff_new_chapter().
avcodec: add CODEC_CAP_DELAY note to avcodec_decode_audio3() documentation
avcodec: clarify the CODEC_CAP_DELAY note in avcodec_decode_video2()
avcodec: clarify documentation of CODEC_CAP_DELAY
...
Conflicts:
configure
doc/general.texi
libavcodec/Makefile
libavcodec/aacdec.c
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/dv.c
libavcodec/dvdata.c
libavcodec/dvdata.h
libavcodec/libspeexenc.c
libavcodec/mpegvideo.c
libavcodec/version.h
libavformat/avidec.c
libavformat/dv.c
libavformat/dv.h
libavformat/flvenc.c
libavformat/mov.c
libavformat/mp3enc.c
libavformat/oggparsespeex.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The new function provides a more generic interface than av_fifo_peek()
for peeking at a FIFO buffer data.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
* qatar/master:
ffmpeg: fix some indentation
ffmpeg: fix operation with --disable-avfilter
simple_idct: remove disabled code
motion_est: remove disabled code
vc1: remove disabled code
fate: separate lavf-mxf_d10 test from lavf-mxf
cabac: Move code only used in the cabac test program to cabac.c.
ffplay: warn that -pix_fmt is no longer working, suggest alternative
ffplay: warn that -s is no longer working, suggest alternative
lavf: rename enc variable in utils.c:has_codec_parameters()
lavf: use designated initialisers for all (de)muxers.
wav: remove a use of deprecated AV_METADATA_ macro
rmdec: remove useless ap parameter from rm_read_header_old()
dct-test: remove write-only variable
des: fix #if conditional around P_shuffle
Use LOCAL_ALIGNED in ff_check_alignment()
Conflicts:
ffmpeg.c
libavformat/avidec.c
libavformat/matroskaenc.c
libavformat/mp3enc.c
libavformat/oggenc.c
libavformat/utils.c
tests/ref/lavf/mxf
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b5849f77095439e994b11c25e6063d443b36c228': (21 commits)
ac3enc: merge AC3MDCTContext with AC3EncodeContext.
ac3enc: prefer passing AC3EncodeContext rather than AVCodecContext
ac3enc: fix memleak
mpeg1video: add CODEC_CAP_SLICE_THREADS.
lavf: fix segfault in av_open_input_stream()
mpegtsenc: set Random Access indicator on keyframe start packets
lavf: Cleanup try_decode_frame() logic.
Replace some gotos that lead to single return statements by direct return.
build: move tests/seek_test.c to libavformat and reuse generic build rules
mxfenc: include needed header for ff_iso8601_to_unix_time() prototype
Add a check for strptime().
lavf: factor out conversion of ISO8601 string to unix time
wav: parse 'bext' metadata
wav: keep parsing until EOF if the input is seekable and we know the size of the data tag
wav: Refactor the tag checking into a switch statement
wav: make sure neither data_size nor sample_count is negative.
wav: refactor the 'fmt ' tag search and parsing.
wav: add an option for writing BEXT chunk
ffmpeg: get rid of a pointless limit on number of streams.
ffmpeg: remove an unused define.
...
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
doc: Improve references to external URLs.
h264: move decode_mb_skip() from h264.h to h.264_mvpred.h
ffplay: skip return value of avcodec_decode_video2 / avcodec_decode_subtitle2
dnxhdenc: Replace a forward declaration by the proper #include.
h264: move h264_mvpred.h include.
pix_fmt: Fix number of bits per component in yuv444p9be
lavf: deprecate AVFormatContext.timestamp
ffmpeg: merge input_files_ts_scale into InputStream.
ffmpeg: don't abuse a global for passing sample format from input to output
ffmpeg: don't abuse a global for passing channel layout from input to output
ffmpeg: factor common code from new_a/v/s/d_stream to new_output_stream()
matroskaenc: make SSA default subtitle codec.
oggdec: prevent heap corruption.
Conflicts:
doc/developer.texi
doc/faq.texi
doc/general.texi
ffmpeg.c
ffplay.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>