Граф коммитов

375 Коммитов

Автор SHA1 Сообщение Дата
Ralph Giles 62347f7023 Bug 1220882 - Use LazyLogModule in MP4Metadata. r=kinetik
Use the new LazyLogModule to instantiate a log for the rust
mp4parse test code instead of using indiscriminate printf()s.

Access results with NSPR_LOG_MODULES=MP4Metadata:5.
2015-11-02 16:19:00 -08:00
Ralph Giles 0f8b14b1fe Bug 1219047 - Call rust mp4parser with logging. r=kinetik
Add a helper for passing the initialization segments
of mp4 streams to the rust parser and log the result.

This runs real data through the new parser for testing
but doesn't use the results.

Code is conditional on MOZ_RUST_MP4PARSE to be defined
in confvars.sh. See bug 1219530.
2015-11-02 11:39:00 -08:00
Ralph Giles 38b78f20c9 Bug 1220754 - Update rust mp4parse to v0.1.3. r=kinetik
New upstream release.

- We now require rust 1.4 for Box::into_raw().
- New mp4parse::Error types.
- Fix memory exhaustion bug with bad ftyp boxes.
2015-11-02 10:15:00 -08:00
Ralph Giles 01d264dc6e Bug 1220754 - Update rust mp4parse import script for v0.1.3. r=kinetik 2015-11-02 10:14:00 -08:00
Birunthan Mohanathas 9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Ralph Giles dd78673eec Bug 1219475 - Fix a comparison warning. r=gerald
Coercing the shift to a bool makes the comparison useless.
This just affects whether a warning is printed, so there's
no change to what files we accept.

We also need to mask of the high 'Starts with SAP' bit
which is usually set and would replace our false negative
with a false positive. ISO/IEC 14496-12:2012(E) sec. 8.16.3.2
2015-10-28 16:10:00 -07:00
Ralph Giles a370569334 Bug 1219452 - Fix unused attribute warning. r=kinetik
Results of running the new update-rust script.

- Include some #[inline] directives missed in bug 1215234.
- Remove #[crate-name] directive to silence a warning caused
  by our building byteorder as a submodule instead of a crate.
2015-10-28 15:29:09 -07:00
Ralph Giles 5ffe01b5a7 Bug 1219452 - Update script for rust mp4parser. r=kinetik
Automate update and patching of the rust mp4 parser from the
upstream repo. A rev for mp4parse-rust can be passed on the
command line, but the byteorder crate's version is hardcoded.

Differences to adapt to the gecko build system are applied as
patches like we do for other media code.

Unfortunately cargo isn't much help here. It can download
crates for us, and we can set CARGO_HOME to force it to
use a specific directory, but it doesn't return enough
information to get the versions, etc. without some guessing/scraping
to find the packaged source.
2015-10-28 15:28:16 -07:00
Jean-Yves Avenard aee82bf660 Bug 1195094: P1. Properly detects SPS changes for decoders requiring Annex B. r=cpearce 2015-10-29 00:46:31 +11:00
Eugen Sawin 0390a166fa Bug 1163667 - [2.1] Extend ByteReader interface with CanRead32(). r=jya 2015-10-26 18:30:52 +01:00
Ralph Giles 0c54ce8b79 Bug 1217261 - Update mp4parse_rust gtest for api changes. r=kinetik.
Allocate an mp4parse_state struct and pass it through.
2015-10-21 18:53:41 -07:00
Ralph Giles ec66a95c8b Bug 1217261 - Update mp4parse-rust to v0.1.2. r=kinetik
This switches to #[derive(Debug)] for trace println!s, and
updates the C api wrapper to thread through the new MediaContext
as an opaque struct. The idea is to be able to query it later.

'extern crate byteorder' converted to 'mod byteorder'.
2015-10-21 18:53:26 -07:00
Nicholas Nethercote 5b34a25af2 Bug 1216020 - Comment all ALLOW_COMPILER_WARNINGS lines. r=glandium.
DONTBUILD because it only changes comments.

This will hopefully prevent confusion like that in bug 1215903.

--HG--
extra : rebase_source : f0a601d77b5f42b4fbe090693234f934e3becc42
2015-10-19 18:05:20 -07:00
Ralph Giles ed4d10cea4 Bug 1215696 - Update tests for mp4parse v0.1.1. r=kinetik
Now that this is returning the correct number of tracks for
the test file we can un-XFAIL.
2015-10-19 16:30:52 -07:00
Ralph Giles 1c5fbb1d62 Bug 1215696 - Update mp4parse-rust to v0.1.1. r=kinetik
Change is just to loop over the input buffer in read_box_from_buffer()
so we parse the entire contents instead of just the first box.

'extern crate byteorder' converted to 'mod byteorder'.
2015-10-19 16:30:43 -07:00
Wes Kocher 1492cb26ec Backed out 2 changesets (bug 1215696) for build bustage causing a CLOSED TREE
Backed out changeset c1c69af32aa7 (bug 1215696)
Backed out changeset a186c0afb34f (bug 1215696)
2015-10-19 15:02:56 -07:00
Ralph Giles 2250d068e3 Bug 1215696 - Update tests for mp4parse v0.1.1. r=kinetik
Now that this is returning the correct number of tracks for
the test file we can un-XFAIL.
2015-10-19 14:15:37 -07:00
Ralph Giles 2e0c0bdbde Bug 1215696 - Update mp4parse-rust to v0.1.1. r=kinetik
Change is just to loop over the input buffer in read_box_from_buffer()
so we parse the entire contents instead of just the first box.

'extern crate byteorder' converted to 'mod byteorder'.
2015-10-19 14:15:37 -07:00
Ehsan Akhgari ecda739d3e Bug 1216177 - Remove the remaining nsRefPtr forward declarations; r=froydnj 2015-10-19 12:02:14 -04:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Ralph Giles 2a418be9e4 Bug 1215234 - Update gtest for mp4parse-rust v0.1.0. r=kinetik
read_box_from_buffer now returns the (alleged) number of tracks,
or -1 on error instead of a bool. It currently returns 0 for
the test file instead of 2, so I marked that line with an XFAIL
comment for now.
2015-10-15 16:26:52 -07:00
Ralph Giles 00f4fa8146 Bug 1215234 - Update mp4parse-rust to v0.1.0. r=kinetik
'extern crate byteorder' converted to 'mod byteorder'.
2015-10-15 16:26:44 -07:00
Ralph Giles 705c464ab4 Bug 1215234 - Update to byteorder v0.3.13. r=kinetik
This just adds inline directives. The 'use' directive in new.rs
is updated to work inside our crate as before.
2015-10-15 16:26:37 -07:00
Gerald Squelart 60a48742e4 Bug 1211741 - Remove libstagefright ID3 files. r=k17e 2015-10-06 14:24:00 +02:00
Jan Henning 7db0ee08cb Bug 1202286 - Part 0 - Add some explicit namespace references to keep the compiler and IntelliSense happy. r=esawin
DecoderTraits.cpp pulls in MP3Demuxer.h which in turn pulls in mp4_demuxer/ByteReader.h. In that context, for some reason the ByteReader can't find the definition for MediaByteBuffer unless it is prefixed with the proper namespace.

MP3Demuxer.cpp itself compiles fine, but for some reason in Visual Studio IntelliSense complains about TimeUnit and TimeIntervals being undefined unless the using statement uses the full namespace hierarchy.

Also fix a small typo.

--HG--
extra : rebase_source : fc46fc82bf06b61c9ac31c2f4331f84f8557c51e
2015-10-01 11:29:48 +02:00
Gerald Squelart 8d3b440600 Bug 1156505 - p2: Null-check sampleTable before use. r=rillian 2015-10-02 16:13:00 +02:00
Gerald Squelart 3912254dc2 Bug 1156505 - p1: Added test case file from bug. r=rillian 2015-10-05 04:01:00 +02:00
Nigel Babu 81457d9f19 Backed out changeset b05d8992f36c (bug 1156505) for build bustage on a CLOSED TREE
--HG--
extra : amend_source : 713237598ed473d81ac91f800a7e8601bc1f777d
2015-10-05 12:40:46 +05:30
Nigel Babu 20b4fdf19f Backed out changeset dd628d2021d5 (bug 1156505) 2015-10-05 12:40:44 +05:30
Gerald Squelart ffc47660b8 Bug 1156505 - p2: Null-check sampleTable before use - r=rillian
--HG--
extra : rebase_source : 9bacf9a568f1020ba19957cba06f3792b4e7c325
2015-10-02 16:13:00 +02:00
Gerald Squelart 9e0bca97d2 Bug 1156505 - p1: Added test case file from bug - r=rillian
--HG--
extra : rebase_source : 3ed46238e2e70b355aa9bb3a7628f2168cfb5203
2015-10-01 00:59:00 +02:00
Gerald Squelart 1fe6483699 Bug 1204580 - p2: Check box ranges. r=rillian 2015-10-02 09:20:39 +02:00
Gerald Squelart 9a4c54dec5 Bug 1204580 - p1: Added test case files. r=rillian 2015-10-02 09:20:13 +02:00
Gerald Squelart 3c9a325b39 Bug 1207909 - p2: Fixed a warning (uninitialized 'err') and typo - r=jya 2015-09-30 07:37:00 +02:00
Gerald Squelart 1866c4d412 Bug 1207909 - p1: Fixed ALOGV statement - r=jya 2015-09-30 07:36:00 +02:00
Gerald Squelart 29585ecb47 Bug 1200326 - p4 - Added test case from bug 1200326, with more checks - r=rillian 2015-09-26 04:44:00 +02:00
Gerald Squelart 842c4906d8 Bug 1200326 - p3 - Test case filenames are now in a list, to allow adding more tests - r=rillian 2015-09-26 04:43:00 +02:00
Gerald Squelart 3d366a1473 Bug 1200326 - part 2 - Parse subsets of the input stream - r=rillian
In addition to starting parsing at different points across the input stream,
different sizes are given, from the minimum step size up to the remainder of the stream.

--HG--
extra : amend_source : 1d98d71cba9bf87f4501b3a554a3c7fa0adc81bc
2015-09-26 04:42:00 +02:00
Gerald Squelart 8e4e911bcf Bug 1200326 - P 1 - Moved test case contents from test source into separate file - r=rillian
This will make it easier to modify input files and add more of them.
2015-09-26 04:40:00 +02:00
Jean-Yves Avenard 28995f8c35 Bug 1207441: [mp4] Ignore invalid tracks. r=gerald
This is designed to minimize the chance of regressions.
2015-09-28 14:12:47 +10:00
Jean-Yves Avenard b048d19b03 Bug 1206211: P2. Abort on OOM. r=kentuckyfriedtakahe 2015-09-24 16:42:54 +10:00
Jean-Yves Avenard 5414266df5 Bug 1206211: P1. Ensure operation can't overflow. r=kentuckyfriedtakahe 2015-09-24 16:42:54 +10:00
Jean-Yves Avenard 4b6099e165 Bug 1207478: P2. Prevent potential division by zero. r=gerald 2015-09-24 16:42:52 +10:00
Jean-Yves Avenard 7d65b942c5 Bug 1207478: P1. Prevent microseconds calculation overflow. r=gerald
This leaves us safe until year 294441 (assuming unix timestamp).
2015-09-24 16:42:51 +10:00
Chris Peterson 71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Jean-Yves Avenard c5be92978d Bug 1207021: [mp4] Properly set dts on plain mp4 media. r=edwin 2015-09-23 12:59:26 +10:00
Jean-Yves Avenard d9647c7d7e Bug 1138992: P2. Add gtest. r=kentuckyfriedtakahe 2015-09-23 12:59:24 +10:00
Jean-Yves Avenard 9626f348b2 Bug 1138992: P1. Ignore ctts version if we have 0 samples in the table. r=kentuckyfriedtakahe 2015-09-23 12:59:24 +10:00
Wes Kocher 9379203266 Backed out changeset 51994c27948c (bug 1197280) for test_eme_non_mse_fails.html failures CLOSED TREE 2015-09-16 14:39:03 -07:00
Ralph Giles 02eebef322 Bug 1197280 - Use CheckedInt instead of manual comparison. r=baku,gerald
This is less error-prone and somewhat easier to read.
Based on a patch from Joshua J. Drake and suggestions
from Andrea Marchesini.

NB CheckedInt<T>::value() returns a T, so the comparison with
SIZE_MAX should always succeed. Doesn't warn on clang though.
2015-09-16 11:44:31 -07:00