Tomas Härdin
8ce41721a4
mxfdec: Add MXFIndexTables
...
This structs collects MXFIndexTableSegments belonging to one IndexSID and some
other bits of useful information.
13 years ago
Tomas Härdin
31029e30fa
mxfdec: Move mxf_read_packet*() near the bottom of the file
...
This simplifies future commits.
13 years ago
Tomas Härdin
7d531e83b6
mxfdec: Set DTS and PTS on video packets
...
This involves computing DTS/PTS from the index tables.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tomas Härdin
8a2cb2abbf
mxfdec: Only sort IndexTableSegments once
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tomas Härdin
0bcada9f61
mxfdec: Add Avid's essence element key
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tomas Härdin
1e14bfc117
mxfdec: Add support for Avid indexes
...
These indexes duplicate every entry and have the total size of the essence
container as the last entry.
This patch also computes the size of the packets when unknown.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tomas Härdin
89cc8c17df
mxfdec: Check slice_count before freeing slice_offset_entries
...
This fixes SIGSEGV on sliceless (single stream) VBR files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tomas Härdin
c0ee522df6
mxfdec: Bring back accumulated_offset that was removed in 5e67e3e
...
I thought it had to do with file offsets, but's actually the offset inside
the essence container.
In other words, unbreak multiple EditUnitByteCounts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
5207f9597e
Separate mxf_essence_container_uls for audio and video.
...
It is a really bad idea to assign a video codec id
when we have set codec_type to audio and vice versa.
Fixes ticket #721 .
13 years ago
Reimar Döffinger
2483f53693
mxfdec: do not try to use an obviously broken index.
...
Also fixes a memleak.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Tomas Härdin
ddcf3e0535
mxfdec: Index table driven demuxing and seeking
...
This adds OPAtom support and proper seeking.
D-10 and non-seekable OP1a streams still use the old demuxing/seeking code.
13 years ago
Tomas Härdin
5e67e3eac2
mxfdec: Compute packet offsets properly
...
This replaces the old essence_offset code
13 years ago
Tomas Härdin
5fb800f49a
mxfdec: Use MaterialPackage - Track - TrackID instead of the system_item hack
13 years ago
Tomas Härdin
fd34dbea58
mxfdec: Parse more values in PartitionPack
...
These values include KAGSize, HeaderByteCount and IndexByteCount.
The length of the pack itself is also stored, and KAGSize is sanity checked.
The FATE sample has KAGSize == 0, which is adjusted to 512.
Other bad KAGSizes are set to 1.
13 years ago
Tomas Härdin
7560c26495
mxfdec: Parse TemporalOffsets
13 years ago
Tomas Härdin
623128d782
mxfdec: av_dlog():ify 'no corresponding source package found'
...
This isn't an error. It's also expected behavior for OPAtom files.
13 years ago
Tomas Härdin
336246238e
mxfdec: Compute essence container offsets and lengths into mxf->partitions
13 years ago
Tomas Härdin
289bc14449
mxfdec: Make mxf->partitions sorted by offset
...
This also zeroes new entries for good measure (used by future patches).
13 years ago
Tomas Härdin
e5f9c8927b
mxfdec: Parse ThisPartition
13 years ago
Tomas Härdin
dcd30b83b4
mxfdec: Speed up metadata and index parsing
...
Specifically, this means parsing as before until we run into essence.
At that point we seek to the footer and parse until EOF. After that we start
seeking backward to the previous partition and parse that until we run into
essence or the next partition. This procedure is repeated until we encounter
the last partition we parsed in the forward direction.
The end result of all this is that large essence containers aren't needlessly
parsed. This speeds up parsing large files a lot.
13 years ago
Tomas Härdin
e1914b5a2f
mxfdec: Make sure DataDefinition is consistent between material track and source track
...
This fixes 0001GL.MXF.V1.mxf_opatom.mxf and 0001GL00.MXF.A1.mxf_opatom.mxf
getting two streams each due to both using the same SourcePackageID.
13 years ago
Tomas Härdin
1170749b39
mxfdec: Add EssenceContainer UL found in 0001GL00.MXF.A1.mxf_opatom.mxf
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Tomas Härdin
fd1cea6549
mxfdec: Add hack that adjusts the n_delta calculation when system items are present
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tomas Härdin
7ddb0607f3
mxfdec: Parse IndexTableSegments and convert them into AVIndexEntry arrays
...
Based on work by Georg Lippitsch <georg.lippitsch@gmx.at>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
eef3ea8c71
Rename remaining ByteIOContext to AVIOContext.
13 years ago
Alex Converse
735e601be1
mxfdec: Fix comparison of unsigned expression < 0.
...
'size' is populated by functions returning int64_t and int that return
negative error codes.
13 years ago
Anton Khirnov
a2faa95151
lavf: make some seeking functions private
...
Specifically av_update_cur_dts(), av_seek_frame_binary() and
av_gen_search().
They are not supposed to be called outside lavf.
13 years ago
Anton Khirnov
84ad31ff18
lavf: replace av_new_stream->avformat_new_stream part II.
...
Manual replacements are done in this commit.
In many cases, the id is some constant made up number (e.g. 0 for video
and 1 for audio), which is then not used in the demuxer for anything.
Those ids are removed.
13 years ago
Alex Converse
0c46e958d1
mxfdec: Fix some buffer overreads caused by the misuse of AVPacket related functions.
13 years ago
Tomas Härdin
d377deaaa3
mxfdec: Move FooterPartition to MXFContext and make sure it's never set to zero
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tomas Härdin
3e48dceac0
mxfdec: Consider QuantizationBits between 17 and 24 to be pcm_s24*
...
This fixes playback of BRD38772509.mxf
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Joakim Plate
a3f4fc813d
[mxfdec] Check return value of avio_seek and avoid modifying state if it fails
13 years ago
Philip de Nier
47886e3644
mxfdec: skip to end of structural sets This fixes reading of partition packs. The code stops reading after the operational pattern and should skip the array of essence container labels that follow
13 years ago
Tomas Härdin
9289eada91
Parse MXF partitions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Alex Converse
1f6f58d585
mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
...
This prevents out of bounds reads when extradata is being decoded.
14 years ago
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Mans Rullgard
0ebcdf5cda
Do not include mathematics.h in avutil.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Diego Biurrun
b0a4e5f9e7
Employ correct printf format specifiers, mostly in debug output.
14 years ago
Clément Bœsch
fd38a15adf
Fix various bad printf format warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
45a8a02a41
lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes sense
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
66e5b1df36
avio: deprecate url_feof
...
AVIOContext.eof_reached should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
384c9c2fa7
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712
)
14 years ago
Anton Khirnov
a2704c9712
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
74b3f67c9c
lavf: replace all uses of url_fskip with avio_seek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e356fc57a2
)
14 years ago
Anton Khirnov
f59d8ff8cd
avio: avio_ prefix for url_fseek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6b4aa5dac8
)
14 years ago
Anton Khirnov
e356fc57a2
lavf: replace all uses of url_fskip with avio_seek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
6b4aa5dac8
avio: avio_ prefix for url_fseek
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e63a362857
avio: avio_ prefixes for get_* functions
...
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit b7effd4e83
)
14 years ago