When we add SPS/PPS NAL in front of each keyframe data, this somehow makes the WMF decoder to misbehave and to always return an invalid timestamp.
MozReview-Commit-ID: 2SzTiwP0ii1
--HG--
extra : rebase_source : b499c83d504df772e6d722053630ff4d92306d4f
Having these files in-tree makes it possible to run
`cargo test` to verify changes.
MozReview-Commit-ID: 6x4XZaw4UtD
--HG--
extra : rebase_source : 293572cbbc21929b43a735bf53ddb5521503bcd2
The byteorder dependency was moved to $topsrcdir/third_party/rust/
in bug 1298422 but this import script wasn't updated.
MozReview-Commit-ID: CzoxsFPYpIm
--HG--
extra : rebase_source : 18bcc2e3351887f0593e2167acc59c6c4f6003e8
Result of running the update script, followed by `cargo update`
in tookit/library/rust/.
MozReview-Commit-ID: LNdvuOqVx9a
--HG--
extra : rebase_source : 70b263d1ba1867b5b2b907530fab4beedc25ae56
We do so by checking the frame data for NAL of type 5 as per ISO IEC 14496-2.
MozReview-Commit-ID: JFeLysrZ6aG
--HG--
extra : rebase_source : edf599210fd3a995f3538a7e54e083894620bf9e
Result of running the update script and updating gecko's
integration crate for the layout change.
MozReview-Commit-ID: GaIMFKmPmtf
--HG--
extra : rebase_source : 0d3a2f1d211840879e562cb56afcc9ef7e38c730
This release splits the capi into a separate crate and adds
mp4parse_is_fragmented() for vp9 support.
MozReview-Commit-ID: JkwylmdfPa9
--HG--
extra : rebase_source : b74b7e20aaf49fe1b2b7121562352c755db3aff3
DiscardRemaning was needed to prevent debug-time assertion that the buffer was
read completely or explicitly discarded.
However this required extra work in cases where buffer didn't need to be read
to the end.
And also it could cause crashes (in debug versions) if a buffer was not fully
read, be it because the parser was incorrect or because the media file itself
was wrong (though possibly still readable despite that).
Finding parser issues is still possible by manually instrumenting ByteReader
during development.
And reading media file with small recoverable errors is a bonus.
MozReview-Commit-ID: 2RUYzaYAeRW
--HG--
extra : rebase_source : 26c41758b1b2c87542bf4e41d08e361198ca5b13
This is done by moving FlacFrameParsers' AutoByteReader to a more public spot
in libstagefright's bindings.
Using AutoByteReader means there is no more need for explicit calls to
DiscardRemaining(); which means our parsers relying on BoxReader will be more
lenient about boxes that are larger than needed.
MozReview-Commit-ID: 3EERU749WYB
--HG--
extra : rebase_source : 6deba02ac553303b0a2b694c24bfcb54c2e732b1
Also ByteReader and AutoByteReader are marked RAII, to help prevent misuses.
MozReview-Commit-ID: 7oklXs4QMnq
--HG--
extra : rebase_source : 54fca3168a70d951e6012baea4bf0544827cae11
Use fallible allocations for arrays that could get arbitrarily long
(independant of the media file size.)
MozReview-Commit-ID: LWiKFVpYK5d
--HG--
extra : rebase_source : bc603c30214768b9a39c83bd92bc0df31d1498e4
The patch is generated from following command:
rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,
MozReview-Commit-ID: AtLcWApZfES
--HG--
rename : mfbt/unused.h => mfbt/Unused.h
H264 decoders always use those anyway, so may as well use them in the demuxer if SPS NAL is available.
This guarantees that we have correct dimensions when reading the MP4 metadata, and will have the side benefit that when loadedmetadata is fired, the dimensions provided at the time will be final; not having to wait to decode the first frame.
MozReview-Commit-ID: 3j70Xqw8jJY
--HG--
extra : rebase_source : 6bc0f1fa1c2db35bcaa683cc1a68042d122e2892
Extracted from the H264 codec and using the stagefright one.
MozReview-Commit-ID: ENjsDvB9MYp
--HG--
extra : rebase_source : 51b92215622df8cdcb65453013ab8022923dd9e8
Run the updated import script to split the in-tree byteorder
code into a separate directory and build it as a dependent crate.
MozReview-Commit-ID: EI5X4icOdmM
--HG--
extra : rebase_source : fa0d4cce8503ede5d2fbefc4d4b78735f2140c33
Now that bug 1231764 has landed cargo support in the build system,
we can remove the patches hacking the byteorder crate into a
module within the mp4parse crate.
This updates the import script to copy the byteorder source
files to a separate directory and removes the obsolete patches.
We update the patch against mp4parse/Cargo.toml to add a dependency
path referring to the new source location. This tells cargo to use
the in-tree copy instead of trying to pull from a registery.
MozReview-Commit-ID: FHMkyEq2HdH
--HG--
extra : rebase_source : 49e893008bb120740da92e81444a4bd43f3265d4
This patch is really two separate changes.
The first change is that rust crates are large, standalone entities that
may contain multitudes of source files. It therefore doesn't make sense
to keep them in SOURCES, as we have been doing. Moving to use cargo
will require a higher-level approach, which suggests that we need a
different, higher-level representation for Rust sources in the build
system.
The representation here is to have the build system refer to things
defined in Cargo.toml files as the entities dealt with in the build
system, and let Cargo deal with the details of actually building things.
This approach means that adding a new crate to an existing library just
requires editing Rust and Cargo.toml files, rather than dealing with
moz.build, which seems more natural to Rust programmers. By having the
source files for libraries (and binaries in subsequent iterations of
this support) checked in to the tree, we can also take advantage of
Cargo.lock files.
The second is that we switch the core build system over to building via
cargo, rather than invoking rustc directly.
We also clean up a number of leftover things from the Old Way of doing
things. A number of tests are added to confirm that we'll only permit
crates to be built that have dependencies in-tree.
This patch is really two separate changes.
The first change is that rust crates are large, standalone entities that
may contain multitudes of source files. It therefore doesn't make sense
to keep them in SOURCES, as we have been doing. Moving to use cargo
will require a higher-level approach, which suggests that we need a
different, higher-level representation for Rust sources in the build
system.
The representation here is to have the build system refer to things
defined in Cargo.toml files as the entities dealt with in the build
system, and let Cargo deal with the details of actually building things.
This approach means that adding a new crate to an existing library just
requires editing Rust and Cargo.toml files, rather than dealing with
moz.build, which seems more natural to Rust programmers. By having the
source files for libraries (and binaries in subsequent iterations of
this support) checked in to the tree, we can also take advantage of
Cargo.lock files.
The second is that we switch the core build system over to building via
cargo, rather than invoking rustc directly.
We also clean up a number of leftover things from the Old Way of doing
things. A number of tests are added to confirm that we'll only permit
crates to be built that have dependencies in-tree.
Display dimensions are actually determined from the SPS NAL with h264 and as such we don't really care on what is found in the container (which may be incorrect).
MozReview-Commit-ID: 7JmxIawNOOn
--HG--
extra : rebase_source : 9454b07742af880cd992a92517880788bd18a712
Make Cargo.toml, build.rs and standard cargo source package
layout available in-tree to facilitate testing cargo-driven
builds of rust code.
Update the moz.build script to build using plain rustc as
before, but referencing the new source location.
MozReview-Commit-ID: 11zuebic9tU
--HG--
extra : rebase_source : 1cb71896ae5dd33d1237ca04ec27da60b2256dad
Both the WebM and mp4 demuxers need to pack this value into
the the CodecSpecificConfig, so move the shared implementation
to the OpusDecoder, near where it is unpacked so the two can
be kept in sync.
MozReview-Commit-ID: 2pQaruJoAWr