gstreamer/gst/matroska
Mart Raudsepp 67958ccce8 matroska: Provide audio lead-in for some lossy formats
Various audio formats require an audio lead-in to decode it properly.
Most parsers would take care of it, but when a container like matroska is
involved, the demuxer handles the seeking and without its own lead-in
handling would never even pass the lead-in data to the parser.
This commit provides an initial implementation of that for audio/mpeg,
audio/x-ac3 and audio/x-eac3 by calculating the worst case lead-in time
needed from known samplerate, potential lead-in frames need and the
maximum blocksize possible for the format (as we don't parse that out
exactly in matroskademux) and seeking that much earlier in case of
accurate seeks. This is especially important for NLE use-cases with GES.

If accurate seeking to a position that happens to have a video keyframe,
it'll go back to the previous keyframe than needed, but with typical
video files that's the best we can do anyway without falling back to
scanning the clusters, as typically only keyframes are indexed in
Cueing Data.
If the media doesn't have a CUE, then we bisect for the cluster to seek
to with the same modified time as well in case of accurate seeking,
ensuring sufficient lead-in. This code path is typically hit only with
(suboptimal) audio-only matroska files, e.g. when created with ffmpeg,
which doesn't add a CUE for audio-only mkv muxing.
2019-08-07 18:51:57 -04:00
..
ebml-ids.h Fix FSF address 2012-11-04 00:07:18 +00:00
ebml-read.c matroska: Quiet a WARN when parsing push mode 2017-01-17 11:50:27 +11:00
ebml-read.h Fix FSF address 2012-11-04 00:07:18 +00:00
ebml-write.c matroska: Remove white space 2019-05-01 14:28:36 +00:00
ebml-write.h matroska: Remove white space 2019-05-01 14:28:36 +00:00
lzo.c matroska: get rid of _stdint.h include 2016-02-08 00:11:55 +00:00
lzo.h Decode the codec private data and following ContentEncoding if necessary. 2008-08-02 18:18:05 +00:00
Makefile.am Remove plugin specific static build option 2017-05-16 14:41:19 -04:00
matroska-demux.c matroska: Provide audio lead-in for some lossy formats 2019-08-07 18:51:57 -04:00
matroska-demux.h matroska: Provide audio lead-in for some lossy formats 2019-08-07 18:51:57 -04:00
matroska-ids.c matroska: Handle interlaced field order 2019-08-07 14:12:32 +00:00
matroska-ids.h matroska: Handle interlaced field order 2019-08-07 14:12:32 +00:00
matroska-mux.c matroska: Port to color_{primaries,transfer,matrix}_to_iso 2019-07-15 23:25:53 +09:00
matroska-mux.h matroskamux: Add new property to offset all streams to start at zero 2019-05-29 11:53:02 +00:00
matroska-parse.c matroska: Handle interlaced field order 2019-08-07 14:12:32 +00:00
matroska-parse.h matroska: Remove unused variable 2015-08-13 14:11:12 +01:00
matroska-read-common.c matroska-demux: Fix caps memleak 2018-10-27 10:48:38 +01:00
matroska-read-common.h matroska: Remove white space 2019-05-01 14:28:36 +00:00
matroska.c Fix FSF address 2012-11-04 00:07:18 +00:00
meson.build doc: Port documentation to hotdoc 2019-05-13 11:34:56 -04:00
webm-mux.c docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
webm-mux.h Fix FSF address 2012-11-04 00:07:18 +00:00