diff options
author | wm4 <nfxjfg@googlemail.com> | 2017-03-21 08:02:58 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2017-03-27 13:20:27 +0200 |
commit | ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b (patch) | |
tree | 4ad8e58c64b32414728816a322aae878bd6f9c3a /doc/APIchanges | |
parent | b12693facf991f343cdf310690f59f69143b256f (diff) | |
download | ffmpeg-ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b.tar.gz |
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>
Diffstat (limited to 'doc/APIchanges')
-rw-r--r-- | doc/APIchanges | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 6aaa9adceb..2274543024 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,14 @@ libavutil: 2015-08-28 API changes, most recent first: +2017-03-xx - xxxxxxx - lavf 57.68.100 - avformat.h + Deprecate that demuxers export the stream rotation angle in AVStream.metadata + (via an entry named "rotate"). Use av_stream_get_side_data() with + AV_PKT_DATA_DISPLAYMATRIX instead, and read the rotation angle with + av_display_rotation_get(). The same is done for muxing. Instead of adding a + "rotate" entry to AVStream.metadata, AV_PKT_DATA_DISPLAYMATRIX side data has + to be added to the AVStream. + 2017-03-xx - xxxxxxx - lavc 57.85.101 - avcodec.h vdpau hardware accelerated decoding now supports the new hwaccel API, which can create the decoder context and allocate hardware frame automatically. |