Commit Graph

817 Commits

Author SHA1 Message Date
Michael Niedermayer
e1de9eab3a Bump minor versions for branching 3.4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-10-11 01:23:47 +02:00
Carl Eugen Hoyos
2386cfc1ae lavf/rtpenc: Add support for little-endian G.726. 2017-10-07 20:47:10 +02:00
Carl Eugen Hoyos
50462e3e5e lavf/sdp: Fix MIME-type for big-endian G.726.
RFC 3551 defines "G726" for little-endian ("right-justified") G.726
and announces "AAL2-G726" for big-endian ("left-justified") G.726.
2017-10-07 20:41:38 +02:00
Rodger Combs
1b8ef01f04 Merge commit '7295b7373862ee54903b33d6ef3335531dfa93ad'
* commit '7295b7373862ee54903b33d6ef3335531dfa93ad':
  dashenc: add webm support

Merged-by: Rodger Combs <rodger.combs@gmail.com>
2017-09-26 14:13:09 -03:00
Carl Eugen Hoyos
b4093e60c5 lavf/caf: Support demuxing Opus.
Introduced in macOS High Sierra and iOS 11.
2017-09-20 03:31:48 +02:00
Petri Hintukainen
7a6bd54152 Add SUP/PGS subtitle muxer
Fixes ticket #2208
2017-09-09 12:07:14 +02:00
wm4
5d76674756 lavf: make avio_read_partial() public
Main use-case is proxying avio through a foreign I/O layer and a custom
AVIO context, without losing latency and performance characteristics.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

Merged from Libav commit 173b56218f.
2017-09-01 17:56:33 +02:00
Anton Khirnov
b12e4d3bb8 avio: add a destructor for AVIOContext
Before this commit, AVIOContext is to be freed with a plain av_free(),
which prevents us from adding any deeper structure to it.

(cherry picked from commit 99684f3ae7)
Signed-off-by: James Almer <jamrial@gmail.com>
2017-09-01 01:51:15 -03:00
Paras Chadha
207f0cff2a Add FITS Demuxer
Signed-off-by: Paras Chadha <paraschadha18@gmail.com>
2017-08-30 12:13:01 +02:00
Carl Eugen Hoyos
9d494c5e55 lavf/rawenc: Add little- and big-endian G.726 muxers. 2017-08-26 11:43:09 +02:00
Carl Eugen Hoyos
f61e2dcfc3 lavf/g726: Demuxer for raw G.726 streams, both left- and right-justified.
Compatible with the binary encoder attached to ticket #6596 (right-aligned)
and a sample from a SEG Mp3-Player (left-aligned).
2017-08-24 12:55:46 +02:00
foo86
f04ef26816 avformat: add SMPTE 337M demuxer 2017-07-19 12:27:33 +02:00
Marton Balint
09891c5391 avformat/aviobuf: add support for specifying minimum packet size and marking flush points
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-06-24 18:51:29 +02:00
Marton Balint
c14fa7a330 avformat/aviobuf: fix flushing write buffers after seeking backward or forward
This patch makes aviobuf work more like traditinal file IO, which is how people
think about it.

For example, in the past, aviobuf only flushed buffers until the current buffer
position, even if more data was written to it previously, and a backward seek
was used to reposition the IO context.

From now, aviobuf will keep track of the written data, so no explicit seek will
be required till the end of the buffer, or till the end of file before flushing.

This fixes at least one regression, fate-vsynth3-flv was broken if
flush_packets option was set to false, an explicit seek was removed in
4e3cc4bdd8.

Also from now on, if a forward seek in the write buffer were to cause a gap
between the already written data and the new file position, a flush will
happen.

The must_flush varable is also removed, which might have caused needless
flushes with multiple seeks whithin the write buffer. Since we know the amount
of data written to it, we will know when to flush.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-06-24 18:51:29 +02:00
Paul B Mahol
c948414876 avformat: add Gremlin Digital Video demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-06-11 10:00:39 +02:00
James Almer
34d7f337c1 Merge commit '3f75e5116b900f1428aa13041fc7d6301bf1988a'
* commit '3f75e5116b900f1428aa13041fc7d6301bf1988a':
  avio: Keep track of the amount of data written

Merged-by: James Almer <jamrial@gmail.com>
2017-04-13 19:49:20 -03:00
Michael Niedermayer
22b0daa1b3 Bump versions for master after 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:54:12 +02:00
Michael Niedermayer
e1cc7f83df Bump minor for 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-02 19:49:45 +02:00
Michael Niedermayer
58b867a7cf Bump minor versions for master after release/3.3 branchpoint
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-31 13:21:06 +02:00
Michael Niedermayer
fc332f3e29 Bump minor versions for staring release/3.3 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-31 13:21:06 +02:00
wm4
ddef3d902f avformat, ffmpeg: deprecate old rotation API
The old "API" that signaled rotation as a metadata value has been
replaced by DISPLAYMATRIX side data quite a while ago.

There is no reason to make muxers/demuxers/API users support both. In
addition, the metadata API is dangerous, as user tags could "leak" into
it, creating unintended features or bugs.

ffmpeg CLI has to be updated to use the new API. In particular, we must
not allow to leak the "rotate" tag into the muxer. Some muxers will
catch this properly (like mov), but others (like mkv) can add it as
generic tag. Note applications, which use libavformat and assume the
old rotate API, will interpret such "rotate" user tags as rotate
metadata (which it is not), and incorrectly rotate the video.

The ffmpeg/ffplay tools drop the use of the old API for muxing and
demuxing, as all muxers/demuxers support the new API. This will mean
that the tools will not mistakenly interpret per-track "rotate" user
tags as rotate metadata. It will _not_ be treated as regression.

Unfortunately, hacks have been added, that allow the user to override
rotation by setting metadata explicitly, e.g. via

  -metadata:s:v:0 rotate=0

See references to trac #4560. fate-filter-meta-4560-rotate0 tests this.
It's easier to adjust the hack for supporting it than arguing for its
removal, so ffmpeg CLI now explicitly catches this case, and essentially
replaces the "rotate" value with a display matrix side data. (It would
be easier for both user and implementation to create an explicit option
for rotation.)

When the code under FF_API_OLD_ROTATE_API is disabled, one FATE
reference file has to be updated (because "rotate" is not exported
anymore).

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-27 13:20:27 +02:00
James Almer
fc9f14c7de Merge commit '8ea35af7620e4f73f9e8c072e1c0fac9a04ec161'
* commit '8ea35af7620e4f73f9e8c072e1c0fac9a04ec161':
  avio: add a new flag for marking streams seekable by timestamp

Merged-by: James Almer <jamrial@gmail.com>
2017-03-21 17:07:44 -03:00
wm4
d682ae70b4 avcodec, avformat: deprecate anything related to side data merging
This patch deprecates anything that has to do with merging/splitting
side data. Automatic side data merging (and splitting), as well as all
API symbols involved in it, are removed completely.

Two FF_API_ defines are dedicated to deprecating API symbols related to
this: FF_API_MERGE_SD_API removes av_packet_split/merge_side_data in
libavcodec, and FF_API_LAVF_KEEPSIDE_FLAG deprecates
AVFMT_FLAG_KEEP_SIDE_DATA in libavformat.

Since it was claimed that changing the default from merging side data to
not doing it is an ABI change, there are two additional FF_API_ defines,
which stop using the side data merging/splitting by default (and remove
any code in avformat/avcodec doing this): FF_API_MERGE_SD in libavcodec,
and FF_API_LAVF_MERGE_SD in libavformat.

It is very much intended that FF_API_MERGE_SD and FF_API_LAVF_MERGE_SD
are quickly defined to 0 in the next ABI bump, while the API symbols are
retained for a longer time for the sake of compatibility.
AVFMT_FLAG_KEEP_SIDE_DATA will (very much intentionally) do nothing for
most of the time it will still be defined. Keep in mind that no code
exists that actually tries to unset this flag for any reason, nor does
such code need to exist. Code setting this flag explicitly will work as
before. Thus it's ok for AVFMT_FLAG_KEEP_SIDE_DATA to do nothing once
side data merging has been removed from libavformat.

In order to avoid that anyone in the future does this incorrectly, here
is a small guide how to update the internal code on bumps:

- next ABI bump (probably soon):
  - define FF_API_LAVF_MERGE_SD to 0, and remove all code covered by it
  - define FF_API_MERGE_SD to 0, and remove all code covered by it
- next API bump (typically two years in the future or so):
  - define FF_API_LAVF_KEEPSIDE_FLAG to 0, and remove all code covered
    by it
  - define FF_API_MERGE_SD_API to 0, and remove all code covered by it

This forces anyone who actually wants packet side data to temporarily
use deprecated API to get it all. If you ask me, this is batshit fucked
up crazy, but it's how we roll. Making AVFMT_FLAG_KEEP_SIDE_DATA to be
set by default was rejected as an ABI change, so I'm going all the way
to get rid of this once and for all.

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
2017-03-21 06:13:45 +01:00
James Almer
58eb0f57f6 avformat/matroskaenc: add support for Spherical Video elements
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2017-03-09 13:57:03 -03:00
wm4
554bc4eea8 avcodec, avutil, avformat: remove AVOption requirement for some fields
Allow all struct fields to be accessed directly, as long as they're
public.

Before this change, many fields were "public", but could be accessed via
AVOption only. This meant they were effectively not public, but were
present for documentation purposes, which was incredibly confusing at
best.
2017-03-02 10:32:12 +01:00
Steven Liu
d96ebc5ef8 avformat/hlsenc: deprecate hls_wrap option
When user use the hls_wrap, there have many problem:
1. some platform refersh the old but usefull segment
2. CDN(Content Delivery Network) Deliver HLS not friendly

The hls_wrap is used to wrap segments for use little space,
now user can use hls_list_size and hls_flags delete_segments
instead it.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-02-11 12:32:31 +08:00
James Almer
7b3f0b3de4 avformat/apetag: bump micro version
In case parsers care about the version that started writing
correct flags.

Signed-off-by: James Almer <jamrial@gmail.com>
2017-02-10 21:03:24 -03:00
Tobias Rapp
e65db4ce59 avformat/avienc: add reserve_index_space option
Allows the user to reserve space for the ODML master index. A sufficient
sized master index in the AVI header avoids storing follow-up master
indexes within the 'movi' data later. If the option is omitted or zero
the index size is estimated from output duration and bitrate.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
2017-01-31 09:00:23 +01:00
Peter Große
7295b73738 dashenc: add webm support
Use webm muxer for VP8, VP9 and Opus codec, mp4 muxer otherwise.

Signed-off-by: Peter Große <pegro@friiks.de>
Signed-off-by: Martin Storsjö <martin@martin.st>
2017-01-31 00:45:27 +02:00
Paul B Mahol
036e12b225 avformat: add SCC muxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-30 11:00:58 +01:00
Paul B Mahol
45ff6ef50e avformat: add Scenarist Closed Captions demuxer
Fixes #4767.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-25 12:00:02 +01:00
Paul B Mahol
b953aec3c4 avformat: add Sample Dump eXchange demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-25 12:00:02 +01:00
Paul B Mahol
7f9978b0bd avformat: add MIDI Sample Dump Standard demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-22 13:00:25 +01:00
softworkz
9488032e10 libavformat/avio: Add avio_get_dyn_buf function
This commit adds the avio_get_dyn_buf function which allows accessing
the
content of a DynBuffer without destroying it.

This is required in matroskaenc for preliminary writing (correct) mkv
headers.

Context for this change is fixing regression bug #5977.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-07 13:04:05 +01:00
Ståle Kristoffersen
d8b9bef1a0 avformat: Auto-detect mjpeg 2000 in mpeg-ts
This makes it possible to decode motion jpeg 2000
encoded in a transport stream without a correct PMT/PAT.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-17 23:52:25 +01:00
Michael Niedermayer
457e933919 Bump for psd demuxer and decoder
Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-14 11:43:33 +01:00
Luca Barbato
3f75e5116b avio: Keep track of the amount of data written
Make avio_size() work with any write AVIOContext.
2016-12-08 15:58:28 -05:00
Michael Niedermayer
1296f84495 avformat: Add max_streams option
This allows user apps to stop OOM due to excessive number of streams

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-08 18:25:30 +01:00
Vittorio Giovara
4dcdecf471 mov: Export spherical information
This implements Spherical Video V1 and V2, as described in the
spatial-media collection by Google.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-07 14:40:59 -05:00
Vittorio Giovara
e90137c045 mov: Export spherical information
This implements Spherical Video V1 and V2, as described in the
spatial-media collection by Google.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-12-07 14:35:06 -05:00
Carl Eugen Hoyos
e0791c5aaf lavf/flvdec: Set avg_frame_rate for video streams.
Requested-by: qw, applemax82 at 163 dot com
Reviewed-by: Steven Liu
2016-11-25 11:06:14 +01:00
James Almer
79ff9935ae utils: Add av_stream_add_side_data()
Functionally similar to av_packet_add_side_data(). Allows the use of an
already allocated buffer as stream side data.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-23 10:36:13 -05:00
James Almer
2ab50647ff avformat/utils: add av_stream_add_side_data()
Functionally similar to av_packet_add_side_data(). Allows the use of an
already allocated buffer as stream side data.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-11-18 22:17:13 -03:00
Michael Niedermayer
1609935b6c Bump minor versions after 3.2 branchpoint to seperate release
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Michael Niedermayer
3f3025205f Bump minor versions for 3.2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-26 20:52:42 +02:00
Rodger Combs
73ead477dd
lavf: add AV_DISPOSITION_TIMED_THUMBNAILS
Reviewed-By: Michael Niedermayer <michael@niedermayer.cc>
2016-10-24 05:47:05 -05:00
Rodger Combs
a246fef163
lavf/mux: add avformat_init_output
This allows a consumer to run the muxer's init function without actually
writing the header, which is useful in chained muxers that support
automatic bitstream filtering.
2016-10-24 03:53:21 -05:00
Carl Eugen Hoyos
6969bed12c lavf/rtpdec_g726: Map mime type G726 to g726le.
Add new mime types AAL2-G726 for g726 as suggested in rfc 3551.

This patch will break interaction with applications that incorrectly
use big-endian G.726 with mime type G726 but we know of at least one
device (DVTel camera) that correctly implements the rfc, so do the same.

Fixes ticket #5890.
2016-10-22 03:53:38 +02:00
James Almer
6c31ba2269 avformat/matroska: fix MatroskaVideoFieldOrder enum values
The spec says

9: Interlaced with bottom field displayed first and top field stored first
14: Interlaced with top field displayed first and bottom field stored first

And avcodec.h states

AV_FIELD_TB,          //< Top coded first, bottom displayed first
AV_FIELD_BT,          //< Bottom coded first, top displayed first

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-10-16 19:02:53 +02:00
James Almer
7cf0ed32fa avformat: bump minor version after the Matroska field order enum fix
Signed-off-by: James Almer <jamrial@gmail.com>
2016-10-12 19:40:42 -03:00