Commit Graph

1020 Commits

Author SHA1 Message Date
Michael Niedermayer 676a93f2d8 avformat: Add av_program_add_stream_index()
This will be used by the subsequent commit(s)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-12-11 22:27:25 +01:00
Derek Buitenhuis ad317c94c5 Merge commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e'
* commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e':
  avformat: expose av_stream_new_side_data helper

  Conflicts:
      libavformat/internal.h

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-22 17:19:10 +00:00
Derek Buitenhuis 2bf93dfd96 Merge commit '21ab6fd01b9107d7171fc1a77c2bfacff845a97a'
* commit '21ab6fd01b9107d7171fc1a77c2bfacff845a97a':
  lavf: document that passing valid timestamps to muxers is now mandatory

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-22 17:16:13 +00:00
John Stebbins 7f4ec4364b avformat: expose av_stream_new_side_data helper
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-18 11:36:27 +01:00
Anton Khirnov 21ab6fd01b lavf: document that passing valid timestamps to muxers is now mandatory
Also, extend the documentation about setting timestamps.
2015-11-18 11:31:40 +01:00
Hendrik Leppkes 611c22140a Merge commit '8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8'
* commit '8de1ee9f725aa3c550f425bd3120bcd95d5b2ea8':
  lavf: deprecate compute_pkt_fields2

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-11 14:37:48 +01:00
Anton Khirnov 8de1ee9f72 lavf: deprecate compute_pkt_fields2
All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.

The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.
2015-11-09 07:50:55 +01:00
Hendrik Leppkes 7f5af80ba4 Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'
* commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457':
  avpacket: Replace av_free_packet with av_packet_unref

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-27 14:28:56 +01:00
Luca Barbato ce70f28a17 avpacket: Replace av_free_packet with av_packet_unref
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.

Deprecate `av_free_packet`.
2015-10-26 18:00:55 +01:00
Hendrik Leppkes 1899b25799 Merge commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e'
* commit '34ed5c2e4d9b7fe5c9b3aae2da5599fabb95c02e':
  avformat: Do not use AVFMT_RAWPICTURE

Removal from ffmpeg.c not merged because some parts of avdevice
still use it

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-14 14:43:20 +02:00
Luca Barbato 34ed5c2e4d avformat: Do not use AVFMT_RAWPICTURE
There are no formats supporting it anymore and it is deprecated.
Update the documentation accordingly.
2015-10-13 13:43:29 +02:00
James Almer 655b6dcb34 lavc/lavf: remove incompatible abi checks for the new 64bit fields
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-17 11:36:16 -03:00
Carl Eugen Hoyos b290972b8f lavf: Switch probesize and max_analyze_duration to 64bit.
Both are only accessible through AVOptions.
2015-09-15 18:02:51 +02:00
Carl Eugen Hoyos c311713ca9 lavf: Switch bitrate to 64bit unless compatibility with avconv was requested.
Based on a patch by Steve Swanson, swanysteve at gmail.

Fixes ticket #2089.
2015-09-15 18:02:47 +02:00
James Almer 67d81b76b6 avformat/avformat: remove dead code
Signed-off-by: James Almer <jamrial@gmail.com>
2015-09-09 20:12:16 -03:00
Carl Eugen Hoyos 670d8ecfae lavf: Remove probesize32 and max_analyze_duration32 on version bump.
Add FF_API_PROBESIZE_32 to allow removing 32bit probesize and 32bit
max_analyze_duration after the next libavformat version bump.
2015-09-01 09:19:49 +02:00
Michael Niedermayer b4d68e7cdb avformat: Remove use of AVFrac and AVStream->pts
Move field to internal part of AVStream and struct to internal.h

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-23 04:16:02 +02:00
Michael Niedermayer 45c558563a avformat: Move MAX_PROBE_PACKETS to internal.h
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-12 17:33:47 +02:00
Andreas Cadhalpun 28efeb6502 doc: avoid incorrect phrase 'allows to'
Also fix typo found by Lou Logan:
Sacrifying -> Sacrificing

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-16 21:48:51 +02:00
Michael Niedermayer a228f7d5e5 avformat/avformat: slightly more verbose documentation for open_cb()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-11 22:33:48 +02:00
Michael Niedermayer 541d75f9a0 avformat: add callback for opening further files
Previous version reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-11 21:55:18 +02:00
wm4 748d4816d9 avformat: add AVFMT_FLAG_FASTSEEK, use it for mp3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-22 22:27:05 +02:00
wm4 7dd8bf53bd avformat: add common mechanism for skipping samples at the start of file
This makes using the generic indexing code with mp3 easier at a later
point.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-22 14:05:46 +02:00
Mariusz Szczepańczyk e623e8cbb0 lavf: add documentation on directory listing API
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-18 17:54:04 +02:00
Reimar Döffinger 7c2e35d1d0 avformat/avformat: improve the text about headerless formats in avformat_flush()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 00:09:26 +01:00
wm4 cca44764b9 avformat: add avformat_flush()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 00:09:26 +01:00
Michael Niedermayer 563ed912ea Merge commit 'bb7701684c7170dfd5f33a3c7d827265844619f2'
* commit 'bb7701684c7170dfd5f33a3c7d827265844619f2':
  lavf: Document the codec context initialization

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-17 21:26:04 +01:00
Vittorio Giovara bb7701684c lavf: Document the codec context initialization
During remuxing avcodec_copy_context() is discouraged as certain fields
(such as codec_tag) could reflect invalid values between input and
output contextes.
2015-02-17 11:27:42 -05:00
Michael Niedermayer 2924514721 Merge commit '9deaec782810d098bca11c9332fab2d2f4c5fb78'
* commit '9deaec782810d098bca11c9332fab2d2f4c5fb78':
  lavf: move internal fields from public to internal context

Conflicts:
	libavformat/avformat.h
	libavformat/internal.h
	libavformat/mux.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-11 02:47:54 +01:00
wm4 9deaec7828 lavf: move internal fields from public to internal context
This is not an API change; the fields were explicitly declared private
before.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-02-10 21:45:04 +01:00
Anshul Maheshwari a47c9331ef avformat: Improve data streams/codec support
This adds data codec/stream handling where previously there was only
audio/video/subtitles

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-16 02:24:08 +01:00
Michael Niedermayer dd4de4a987 Merge commit 'c4aa0f865fb2c3b28a309d1bb27fd1c24b75ba28'
* commit 'c4aa0f865fb2c3b28a309d1bb27fd1c24b75ba28':
  libavformat: Remove a misleading/incorrect comment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-05 02:27:00 +01:00
Martin Storsjö c4aa0f865f libavformat: Remove a misleading/incorrect comment
This comment can be traced back to the initial commit from 2001,
and it seemed to be misleading/incorect already back then. (It
was used for normal, non-raw file formats already then.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-01-04 20:04:33 +02:00
Andreas Cadhalpun b28652599d doc: fix spelling errors
succesfully => successfully, reproducable => reproducible, specifiying => specifying, isnt => isn't, seperated => separated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-01 00:31:06 +01:00
Michael Niedermayer 367c9d33d6 avformat: replace some odd 30-60 rates by higher less odd ones in get_std_framerate()
Fixes Ticket4012

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-21 13:56:13 +01:00
Carl Eugen Hoyos 92c07acce7 Read (display) aspect ratio from mxf files.
Fixes ticket #4107.
2014-11-17 17:54:32 +01:00
Lukasz Marek 6690d4c3f5 lavf/ffm: store/restore private codec context
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-16 01:13:38 +01:00
Michael Niedermayer 66e49ff3b9 Merge commit '1384df641994bf3d6cb51084290aa94752737bae'
* commit '1384df641994bf3d6cb51084290aa94752737bae':
  lavf: Add an option for avoiding negative timestamps

Conflicts:
	libavformat/avformat.h
	libavformat/mux.c
	libavformat/options_table.h
	libavformat/version.h

See: 3ba0dab76a
See: a89c012531
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-07 23:09:30 +01:00
Michael Niedermayer 1384df6419 lavf: Add an option for avoiding negative timestamps
This is the same logic as is invoked on AVFMT_TS_NEGATIVE,
but which can be enabled manually, or can be enabled
in muxers which only need it in certain conditions.

Also allow using the same mechanism to force streams to start
at 0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-11-07 12:11:35 +02:00
Michael Niedermayer 057ea2a982 avformat: Add format_whitelist
This allows restricting demuxers to a list of needed ones for improved security
Note, some demuxers themselfs open other demuxers, these are only restricted if
AVOptions are forwarded to them. Please check that your code does that.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-19 04:37:30 +02:00
Michael Niedermayer cf7b90dea2 fix seperator typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-09 04:19:13 +02:00
Michael Niedermayer f0a6874de8 avformat: Allow choosing the dump format field separator.
The default is to maintain the previous ", " for now.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-09 00:56:58 +02:00
Michael Niedermayer 911ba8fb19 Merge commit 'b15b06ebf582ae81e47d236524c9ad6e10c8a0a7'
* commit 'b15b06ebf582ae81e47d236524c9ad6e10c8a0a7':
  avformat: use const char* instead of uint8_t* for AVProbeData.mime_type

Conflicts:
	libavformat/format.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-08 21:35:40 +02:00
Andreas Cadhalpun b15b06ebf5 avformat: use const char* instead of uint8_t* for AVProbeData.mime_type
This makes the field consistent with AVInputFormat.mime_type and the
argument type of av_match_name.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-10-08 15:13:15 +01:00
James Almer ddc3768161 avformat: remove obsolete FF_API_READ_PACKET cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:10:26 -03:00
James Almer ecf457f3ac avformat: remove obsolete FF_API_CLOSE_INPUT_FILE cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:10:23 -03:00
James Almer 3bd9f17b8a avformat: remove obsolete FF_API_SET_PTS_INFO cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:10:20 -03:00
James Almer a578b93c73 avformat: remove obsolete FF_API_NEW_STREAM cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:10:15 -03:00
James Almer cc787709ee avformat: remove obsolete FF_API_FORMAT_PARAMETERS cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:10:13 -03:00
James Almer 903a0acba4 avformat: remove obsolete FF_API_ALLOC_OUTPUT_CONTEXT cruft
Signed-off-by: James Almer <jamrial@gmail.com>
2014-10-05 17:10:07 -03:00
wm4 6c7f1155bb avformat/mp3dec: avoid early EOF with concatenated gapless mp3s
Consider a file created with something like:

    cat file1.mp3 file2.mp3 > result.mp3

Then if file2.mp3 has gapless information, result.mp3 would stop playing
something in the middle. This happens because the gapless info directs
the decoder to discard all samples after a certain position. To make
matters worse, the gapless info of file2.mp3 will be used when playing
the file1.mp3 part, because the gapless info is located at the end of
the file.

While handling concatenated gapless files correctly would be insane and
a lot of effort (especially without scanning the whole file on opening),
it's easy to prevent at least early EOF. Playback will happen to work,
even if it's slightly broken.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-21 14:57:12 +02:00
wm4 d87fe2687f avformat/mp3dec: fix gapless audio support
The code already had skipping of initial padding, but discarding
trailing frame padding was missing.

This is somewhat questionable, because it will make the decoder discard
any data after the declared file size in the LAME header. But note that
skipping full frames at the end of the stream is required. Encoders
actually create such files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-09-20 19:46:25 +02:00
Michael Niedermayer 215db2935b Merge commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d'
* commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d':
  lavf: add AVFormatContext.max_ts_probe

Conflicts:
	doc/APIchanges
	libavformat/avformat.h
	libavformat/utils.c
	libavformat/version.h

lavf-fate/mp3 changes as the estimated input bitrate changes and that is
copied to the output

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-25 13:25:09 +02:00
Anton Khirnov b263f8ffe7 lavf: add AVFormatContext.max_ts_probe
It allows to configure how long will avformat_find_stream_info() wait
to get the first timestamp.
2014-08-25 05:17:54 +00:00
Michael Niedermayer ed8e6d535c Merge commit 'afbd4b7e093adf6d7a830b32759ca3ba8500363d'
* commit 'afbd4b7e093adf6d7a830b32759ca3ba8500363d':
  lavf: add AVFormatContext/AVStream fields for signaling to the user when events happen.

Conflicts:
	libavformat/avformat.h
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-13 22:22:52 +02:00
Andrew Stone afbd4b7e09 lavf: add AVFormatContext/AVStream fields for signaling to the user when events happen.
The only flags, for now, indicate if metadata was updated and are set after each call to
av_read_frame(). This comes with the caveat that, on stream start, it might not be set properly
as packets might be buffered in AVFormatContext.packet_buffer before being given to the user
in av_read_frame().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-13 16:04:48 +00:00
Michael Niedermayer 329832d779 Merge commit '24c788f4878729a42150581d7ed7e9a11daf874d'
* commit '24c788f4878729a42150581d7ed7e9a11daf874d':
  Remove obsolete FF_API_REFERENCE_DTS cruft.

Conflicts:
	libavformat/avformat.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 02:01:34 +02:00
Michael Niedermayer c218d8218d Merge commit '24e87f7f425a52b1e69661dcb2fbe0555a76f30b'
* commit '24e87f7f425a52b1e69661dcb2fbe0555a76f30b':
  Remove obsolete FF_API_PROBE_MIME cruft.

Conflicts:
	libavformat/avformat.h
	libavformat/format.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-10 01:36:21 +02:00
Anton Khirnov 24c788f487 Remove obsolete FF_API_REFERENCE_DTS cruft. 2014-08-09 16:59:26 +00:00
Anton Khirnov 24e87f7f42 Remove obsolete FF_API_PROBE_MIME cruft. 2014-08-09 16:59:21 +00:00
Carl Eugen Hoyos ff9a154157 Add int64_t probesize2 instead of int probesize to AVFormatContext.
Allows to set a probesize >2G.
Tested-by: Oliver Fromme
2014-07-30 11:09:25 +02:00
Michael Niedermayer 9694695a21 avformat: fix probe mime version checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-29 21:02:48 +02:00
Michael Niedermayer 80a3a6611f Merge commit '3a19405d574a467c68b48e4b824c76617fd59de0'
* commit '3a19405d574a467c68b48e4b824c76617fd59de0':
  avformat: Use the mime type information in input probe

Conflicts:
	libavformat/format.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-29 20:57:42 +02:00
Luca Barbato 3a19405d57 avformat: Use the mime type information in input probe
It should provide a quicker guess for elementary streams provided
by http.
2014-07-29 17:47:26 +02:00
Michael Niedermayer 57e7d9d929 Merge commit '7215fcf84032118ecd9fb54fb14154d69fea638d'
* commit '7215fcf84032118ecd9fb54fb14154d69fea638d':
  avformat: Mark AVOutputFormat argument in avformat_query_codec as const

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 02:16:09 +02:00
Michael Niedermayer 6542e5575f Merge commit 'ec4f04da1a3462dac429b9d15dee5f027309da15'
* commit 'ec4f04da1a3462dac429b9d15dee5f027309da15':
  avformat: Mark argument in av_{i|o}format_next/ffurl_protocol_next as const

Conflicts:
	libavformat/format.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-27 02:09:41 +02:00
Diego Biurrun 7215fcf840 avformat: Mark AVOutputFormat argument in avformat_query_codec as const 2014-07-26 14:51:16 -07:00
Diego Biurrun ec4f04da1a avformat: Mark argument in av_{i|o}format_next/ffurl_protocol_next as const 2014-07-26 14:51:16 -07:00
Michael Niedermayer 62227a70f0 avformat: add av_stream_get_parser() to access avformat AVParser
The AVStream.parser field is considered private and its location cannot be
preserved while preserving also ABI compatibility to libav, as libav added fields
before it.
Some tools like ffmpeg.c access this field though

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-14 21:17:20 +02:00
Michael Niedermayer 4b13ec69c6 Merge commit 'c9c1265c52910578d3db1a6205c85b91ead0903f'
* commit 'c9c1265c52910578d3db1a6205c85b91ead0903f':
  avformat: update muxing doxy

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-09 21:38:27 +02:00
Anton Khirnov c9c1265c52 avformat: update muxing doxy
The callers should now set the stream timebase, not the codec one.
2014-07-09 13:30:22 +00:00
Roman Savchenko 3d90f27ad5 avformat_new_stream: make the AVCodec parameter const
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-07-08 08:24:27 +00:00
Michael Niedermayer a3c479fc49 avformat/avformat: minor grammar improvement
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 13:51:53 +02:00
Michael Niedermayer 44f079b27e Merge commit 'cdab9db2adeec46b3984309c8c651bdd737d2b6b'
* commit 'cdab9db2adeec46b3984309c8c651bdd737d2b6b':
  lavf: document av_dump_format()

Conflicts:
	libavformat/avformat.h

See: 61f96be08a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-03 13:39:23 +02:00
Vittorio Giovara cdab9db2ad lavf: document av_dump_format() 2014-07-02 23:37:21 -04:00
Michael Niedermayer ac293b6685 Merge commit '194be1f43ea391eb986732707435176e579265aa'
* commit '194be1f43ea391eb986732707435176e579265aa':
  lavf: switch to AVStream.time_base as the hint for the muxer timebase

Conflicts:
	doc/APIchanges
	libavformat/filmstripenc.c
	libavformat/movenc.c
	libavformat/mxfenc.c
	libavformat/oggenc.c
	libavformat/swf.h
	libavformat/version.h
	tests/ref/lavf/mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18 19:49:17 +02:00
Anton Khirnov 194be1f43e lavf: switch to AVStream.time_base as the hint for the muxer timebase
Previously, AVStream.codec.time_base was used for that purpose, which
was quite confusing for the callers. This change also opens the path for
removing AVStream.codec.

The change in the lavf-mkv test is due to the native timebase (1/1000)
being used instead of the default one (1/90000), so the packets are now
sent to the crc muxer in the same order in which they are demuxed
(previously some of them got reordered because of inexact timestamp
conversion).
2014-06-18 15:12:34 +02:00
Carl Eugen Hoyos 5482780a3b Allow values >31bit for -analyzeduration. 2014-06-10 14:28:34 +02:00
Carl Eugen Hoyos d58bcc1921 Allow >2G for skip_initial_bytes. 2014-06-06 09:16:53 +02:00
Michael Niedermayer d858ee717b Merge commit '6d212599aa684f30511fb08ca30fe2378405304e'
* commit '6d212599aa684f30511fb08ca30fe2378405304e':
  avformat: Provide a standard compliance flag

Conflicts:
	doc/APIchanges
	libavformat/avformat.h
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-29 00:20:48 +02:00
Luca Barbato 6d212599aa avformat: Provide a standard compliance flag
Provide f_strict for avconv usage.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-05-28 22:04:56 +02:00
Michael Niedermayer 52887aa409 avformat: move default for max_analyze_duration into utils.c
this way we can do better tha a single fixed constant value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-26 22:33:01 +02:00
Michael Niedermayer c37d179295 avformat: add format_probesize to allow tuning the maximum amount of bytes to identify the filetype
Currently probesize is cliped at 1mb before being used for format detection.
Alternatively this cliping could be removed but this would then tie various
things like stream analysis to the file detection.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-25 23:54:34 +02:00
Michael Niedermayer 7f7080dc73 avformat: add av_stream_get_end_pts()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-21 18:53:12 +02:00
Michael Niedermayer 7d25af1547 Merge commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37'
* commit 'c23c96b638cbf6c489fd301e6b3d5555632fba37':
  lavf: add av_stream_get_side_data

Conflicts:
	doc/APIchanges
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-20 03:39:04 +02:00
Janne Grunau c23c96b638 lavf: add av_stream_get_side_data 2014-05-20 00:43:52 +02:00
Michael Niedermayer 999a99c865 Merge commit 'a312f71090ee620ee252f2034aef6b13e2dafe9c'
* commit 'a312f71090ee620ee252f2034aef6b13e2dafe9c':
  lavf: deprecate now unused AVStream.pts

Conflicts:
	libavformat/mux.c
	libavformat/version.h

mostly not merged as the code is needed for a/vsync drop handling
and what the code does is what is needed, it could maybe be moved
elsewhere or factored somehow but simply removing it would be droping
these features.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-19 18:38:10 +02:00
Anton Khirnov a312f71090 lavf: deprecate now unused AVStream.pts 2014-05-19 07:14:24 +02:00
Michael Niedermayer 8636b11bdc Merge commit '7a5f4f6853047eea74a6443d73f4d74d52b2799f'
* commit '7a5f4f6853047eea74a6443d73f4d74d52b2799f':
  lavf: extend avg_frame_rate documentation.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-18 14:27:29 +02:00
Anton Khirnov 7a5f4f6853 lavf: extend avg_frame_rate documentation. 2014-05-18 10:24:24 +02:00
Michael Niedermayer eacf7d650d Merge commit '0c1959b056f6ccaa2eee2c824352ba93c8e36d52'
* commit '0c1959b056f6ccaa2eee2c824352ba93c8e36d52':
  lavf: add AVFMT_FLAG_BITEXACT.

Conflicts:
	doc/APIchanges
	libavformat/avformat.h
	libavformat/flacenc.c
	libavformat/movenc.c
	libavformat/oggenc.c
	libavformat/options_table.h
	libavformat/version.h
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-15 19:16:57 +02:00
Anton Khirnov 0c1959b056 lavf: add AVFMT_FLAG_BITEXACT.
Use it instead of checking CODEC_FLAG_BITEXACT in the first stream's
codec context.

Using codec options inside lavf is fragile and can easily break when the
muxing codec context is not the encoding context.
2014-05-15 07:42:07 +02:00
Michael Niedermayer 6a72260e6b Merge commit 'a738540366c9b114949b7914c0d08e2c28982cfb'
* commit 'a738540366c9b114949b7914c0d08e2c28982cfb':
  lavf: properly document the distinction between flags and ctx_flags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-14 13:54:21 +02:00
Anton Khirnov a738540366 lavf: properly document the distinction between flags and ctx_flags 2014-05-14 07:47:56 +02:00
Michael Niedermayer f3743901d7 avformat: Fix decoder search in find stream info
Fixes Ticket3548

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-21 05:27:08 +02:00
Michael Niedermayer ef818d8bf0 avformat: add av_format_inject_global_side_data(), and disable it by default
After this commit applications needs to call av_format_inject_global_side_data()
or handle AVStream side data by some other means if they want it not to be lost.

This fixes a API incompatibility with libav.
libav API does not allow the data to be passed through AVPackets

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-15 02:37:40 +02:00
Michael Niedermayer 289f02f923 avformat/utils: Inject global side data into first packet.
This fixes replaygain handling in ffplay and probably other applications.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-13 18:02:05 +02:00
Lukasz Marek 6db42a2b6b lavd: add device capabilities API
Provides API to query device capabilities.
Each device must implement callbacks to benefit from this API.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-04-11 15:37:43 +02:00
Roman Fietze 74aeb6b584 libavformat/utils.c: av_pkt_dump_log2: use const pointers
Use const pointers to AVPacket and AVStream.

Signed-off-by: Roman Fietze <roman.fietze@telemotive.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-03 13:31:13 +02:00
Michael Niedermayer 595ba3b962 Merge commit '25b32586566f285d797737863c97a1c5c9c84e2b'
* commit '25b32586566f285d797737863c97a1c5c9c84e2b':
  lavf: add an AVStream field for exporting stream-global side data

Conflicts:
	libavformat/utils.c
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-24 13:41:49 +01:00