Commit Graph

307 Commits

Author SHA1 Message Date
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Chris Peterson
6b261a1c9e Bug 1197563 - Polyfill __func__ for MSVC 2013 and earlier. r=froydnj 2015-08-20 23:39:18 -07:00
Anthony Jones
bf71b3c4f9 Bug 1180101 - Skip four bytes when we hit a zero length box; r=jya 2015-08-26 18:12:59 +12:00
Jean-Yves Avenard
1a98b5d4e0 Bug 1196398: [mp4] Do not allocate memory spanning across ftyp and moov atom. r=kentuckyfriedtakahe
A typical non-fragmented mp4 would have the ftyp atom located at the beginning of the mp4 and the moov at the end. We would to calculate the location of the metadata by spanning the byte range of the two atoms.
As such, we would typically allocate an amount of memory equivalent to the size of the mp4.

Instead we now reconstruct the metadata to only have the ftyp and moov atoms contiguously.
2015-08-21 15:35:31 +10:00
Jean-Yves Avenard
af3e91f01a Revert "Bug 1196398: [mp4] Do not allocate memory spanning across ftyp and moov atom. r=kentuckyfriedtakahe"
This reverts commit 73156610be5f
2015-08-21 14:48:23 +10:00
Jean-Yves Avenard
600ae4f2bf Bug 1196398: [mp4] Do not allocate memory spanning across ftyp and moov atom. r=kentuckyfriedtakahe
A typical non-fragmented mp4 would have the ftyp atom located at the beginning of the mp4 and the moov at the end. We would to calculate the location of the metadata by spanning the byte range of the two atoms.
As such, we would typically allocate an amount of memory equivalent to the size of the mp4.

Instead we now reconstruct the metadata to only have the ftyp and moov atoms contiguously.
2015-08-21 13:10:34 +10:00
Jean-Yves Avenard
e42ca2d177 Bug 1181651: Replace use of stagefright::Vector with nsTArray. r=kentuckyfriedtakahe 2015-08-20 20:54:59 +10:00
Sebastian Hengst
944b95cdee Backed out changeset 966aa9c1ca25 (bug 1181651) for build bustage. r=backout on a CLOSED TREE 2015-08-20 09:28:55 +02:00
Jean-Yves Avenard
20ed0b8c7c Bug 1181651: Replace use of stagefright::Vector with nsTArray. r=kentuckyfriedtakahe 2015-08-20 16:57:07 +10:00
Jean-Yves Avenard
186b001e2e Bug 1194708: Properly find SPS NAL in some H264 streams. r=kentuckyfriedtakahe
With some encoding, we didn't detect the SPS. With AVC3 stream it would cause playback to never start on mac or linux (ffmpeg)
2015-08-17 10:28:37 +10:00
Jean-Yves Avenard
8c8e3b2a70 Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce 2015-08-06 18:48:44 +10:00
Jean-Yves Avenard
fdad9271bf Bug 1185115 - Ensure we have enough memory to allocate required capacity. r=kentuckyfriedtakahe
CLOSED TREE

--HG--
extra : amend_source : d3104ef74195446962f52d1328b75f62484bf3f1
2015-08-04 13:43:17 -04:00
Jean-Yves Avenard
b2e8611aaa Bug 1183196: [MSE] P2. Do not ignore tracks other than the first one. r=kentuckyfriedtakahe
When used in the MP4ContainerParser, the MoofParser set the trackID as 0 ; indicating that all tracks are to be parsed. However it set later the trackID to the first one found, causing to ignore all following tracks.
2015-07-30 20:42:44 +10:00
Bobby Holley
97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Ehsan Akhgari
e36f5e1a38 Bug 1188212 - Fix more constructors in media; r=cpearce 2015-07-28 08:53:33 -04:00
Jean-Yves Avenard
7cb5a3857f Bug 1186149: P1. Allow both first sample flags flag and sample flags simultaneously. r=kentuckyfriedtakahe 2015-07-28 14:11:04 +10:00
Jean-Yves Avenard
89e5d96fae Bug 1186718 - Ensure ESDS have valid size. r=kentuckyfriedtakahe
--HG--
extra : rebase_source : 7040d05738365d164bb0891130d04a16daa273cc
2015-07-27 16:25:17 -04:00
Jean-Yves Avenard
e0264d1f80 Bug 1185115 - Ensure we have enough memory to allocate required capacity. r=kentuckyfriedtakahe
--HG--
extra : rebase_source : 1a83126a3081c4d2b5d5a1d900b3a8a65c5016dd
2015-07-27 11:27:34 -04:00
Alfredo Yang
8393a2233e Bug 1163486 - Remove MP4Reader. r=jya 2015-07-21 02:48:00 +02:00
Carsten "Tomcat" Book
de3872af29 Backed out changeset 1704ea727e81 (bug 1163486) for at least b2g bustage 2015-07-21 08:42:54 +02:00
Alfredo Yang
23c919b20e Bug 1163486 - Remove MP4Reader. r=jya 2015-07-20 19:25:00 +02:00
Jean-Yves Avenard
81ace05809 Bug 1144107 - Part 4: Prevent assert when hitting EOS. r=kentuckyfriedtakahe
this would occur if we attempt to read exactly the end of the array.
2015-07-14 09:21:27 -04:00
Jean-Yves Avenard
95bf127594 Bug 1144107 - Part 3: Prevent int overflow in sort. r=kentuckyfriedtakahe 2015-07-14 09:21:27 -04:00
Jean-Yves Avenard
76090b241e Bug 1144107 - Part 2: Prevent uin32_t overflow. r=kentuckyfriedtakahe 2015-07-14 09:21:27 -04:00
Jean-Yves Avenard
03d7a25152 Bug 1144107 - Part 1: Mark tracks with no samples table as invalid. r=kentuckyfriedtakahe 2015-07-14 09:21:27 -04:00
Robert O'Callahan
680664fafe Bug 1143575. Add RefBase #include to stagefright stubs. r=cpearce
--HG--
extra : commitid : wcsOwklXjp
extra : rebase_source : 8c4973bc7c8c032dc1c28b4525ca0fca998a1989
2015-05-12 15:36:19 +12:00
Ralph Giles
8931994bd3 Bug 1179885 - Update rust mp4parser gtest. r=k17e
Switch to stdio for reading the file snippet. I can't figure
out how to cleanly read a minimum subset into a vector with
ifstream. Previously we were asking it to read zero bytes,
so the argument validation in read_box_from_buffer() was
rejecting the data without trying to parse it.

With this and the v0.0.9 changes to catch eof, we can remove
the expected fail on the street.mp4 test.
2015-07-02 14:12:14 -07:00
Ralph Giles
7e60c406ad Bug 1179885 - Update rust mp4parser to v0.0.9. r=k17e
Source from https://notabug.org/rillian/mp4parse-rust

Modified to use byteorder as a local mod instead of an
extern crate, per bug 1175322.
2015-07-02 14:12:13 -07:00
Ralph Giles
c9aa6b2fac Bug 1177029 - Use stdint.h instead of cstdint. r=kinetik
Clang can't find this on my MacOS X machine.
2015-06-24 00:23:00 -07:00
Jean-Yves Avenard
3f6934ace6 Bug 1174577: P1. Have Init segment range only include the first moov. r=kentuckyfriedtakahe 2015-06-19 16:45:15 +10:00
Ralph Giles
074f872aa1 Bug 1175322 - Add gtests for rust mp4 metadata parser. r=k17e
Add a null buffer test.
Add a street.mp4 test.

We have trouble parsing gizmo.mp4, and the dom/media/gtest
already exposes the file, which is confusing since we apparently
can't have duplicates in TEST_HARNESS_FILES.

The street.mp4 test always fails because we don't catch
the eof in the rust code.
2015-06-16 15:52:00 -07:00
Ralph Giles
dbec6e99b1 Bug 1175322 - Import byteorder crate. r=k17e
This is the source of Andrew Gallant's byteorder crate,
used end the MIT license.

It has been slightly modified to re-export the new sub-module
so it can be built as a mod inside our MP4Metadata crate since
we don't currently support crate dependencies.
2015-06-16 15:51:00 -07:00
Ralph Giles
35b5a70f29 Bug 1175322 - Import mp4parse v0.0.8 source. r=k17e
Source from https://notabug.org/rillian/mp4parse-rust
2015-06-16 15:50:00 -07:00
Ralph Giles
83d61e2787 Bug 1174356 - Add missing MediaData include. r=jya
Needed for separate compilation of MP4Metadata.h in unit tests.

--HG--
extra : rebase_source : 13d6298ff6a5e6706ab42a8d6fe2cadb15dba631
2015-06-15 08:53:00 -07:00
Birunthan Mohanathas
2d96c72f58 Bug 1174220 - Part 2: Use MediaByteBuffer instead of MediaLargeByteBuffer. r=jya
All MediaLargeByteBuffer calls already include the `mozilla::fallible`
parameter so we can safely replace MediaLargeByteBuffer with MediaByteBuffer.
2015-06-14 21:37:13 -07:00
Jean-Yves Avenard
bc7bec465a Bug 1171330: P14. Add ContainerParser::FirstCompleteMediaHeader() method. r=kentuckyfriedtakahe
--HG--
extra : rebase_source : 6adaf84ce44a6024b5eb40672f3d8d9bb107432d
2015-06-11 16:27:15 +10:00
Jean-Yves Avenard
584ec04c52 Bug 1171330: P1. Add ContainerParser::MediaSegmentRange() method. r=kentuckyfriedtakahe
And add abilities to MoofParser to indicate if a media segment is complete.
In MP4 a media segment is made of a moof atom followed by one (or more) mdat
atoms.

--HG--
extra : rebase_source : 0b0db48d55462025d9d45bf9b3bbdbc806b0e7a8
2015-06-11 15:49:49 +10:00
Birunthan Mohanathas
94f1cfa658 Bug 968520 - Add mozilla::fallible to more FallibleTArray calls. r=froydnj
This calls were already fallible due to their type (FallibleTArray). This
commit merely makes that fact visible at the call site.
2015-06-10 14:30:41 -07:00
Jean-Yves Avenard
8b436991f9 Bug 1171067: Part2. Properly hande box size marked as 0. r=kentuckyfriedtakahe
This indicates that the box goes to the end of the file.
2015-06-10 19:38:13 +10:00
Jean-Yves Avenard
884ee68615 Bug 1171067: Properly read 64bits header's size. r=kentuckyfriedtakahe 2015-06-10 19:38:13 +10:00
Jean-Yves Avenard
cb1a613e49 Bug 1168040: P3. MP4 dts must use the same timeline as pts. r=kentuckyfriedtakahe 2015-06-10 19:38:13 +10:00
Jean-Yves Avenard
9a7876feb4 Bug 1168040: Part2. Properly handle MP4 time offset in MoofParser. r=kentuckyfriedtakahe 2015-06-10 19:38:13 +10:00
Jean-Yves Avenard
34ab4962db Bug 1168040: Part1. Properly handle MP4 starting offset. r=kentuckyfriedtakahe 2015-06-10 19:38:13 +10:00
Jean-Yves Avenard
c2533f75f1 Bug 1171629: Use fallible array to store MP4 samples index. r=kentuckyfriedtakahe 2015-06-10 19:38:13 +10:00
Eugen Sawin
e03391c07e Bug 1166779 - Rebase MP3 demuxer on MediaDataDemuxer interface. r=kinetik
--HG--
rename : media/libstagefright/binding/MP3TrackDemuxer.cpp => dom/media/MP3Demuxer.cpp
rename : media/libstagefright/binding/include/mp4_demuxer/MP3TrackDemuxer.h => dom/media/MP3Demuxer.h
extra : rebase_source : 1cbc9b841cdba57e9d72c00f6c6ec95eebb3b371
2015-06-05 14:34:19 +02:00
Eric Rahm
75c4bebb79 Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-03 15:25:57 -07:00
Carsten "Tomcat" Book
5471309381 Backed out 14 changesets (bug 1165515) for linux x64 e10s m2 test failures
Backed out changeset d68dcf2ef372 (bug 1165515)
Backed out changeset 7c3b45a47811 (bug 1165515)
Backed out changeset b668b617bef2 (bug 1165515)
Backed out changeset d0916e1283a2 (bug 1165515)
Backed out changeset ac4dc7489942 (bug 1165515)
Backed out changeset e9632ce8bc65 (bug 1165515)
Backed out changeset c16d215cc7e4 (bug 1165515)
Backed out changeset e4d474f3c51a (bug 1165515)
Backed out changeset d87680bf9f7c (bug 1165515)
Backed out changeset b3c0a45ba99e (bug 1165515)
Backed out changeset 9370fa197674 (bug 1165515)
Backed out changeset 50970d668ca1 (bug 1165515)
Backed out changeset ffa4eb6d24b9 (bug 1165515)
Backed out changeset 5fcf1203cc1d (bug 1165515)

--HG--
extra : rebase_source : 6fb850d063cbabe738f97f0380302153e3eae97a
2015-06-02 13:05:56 +02:00
Eric Rahm
a9afd68cef Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 22:17:33 -07:00
Wes Kocher
4e9f80ed2e Backed out 14 changesets (bug 1165515) for b2g mochitest-6 permafail CLOSED TREE
Backed out changeset 9b97e2aa2ed9 (bug 1165515)
Backed out changeset 150606c022a2 (bug 1165515)
Backed out changeset 4e875a488349 (bug 1165515)
Backed out changeset 467e7feeb546 (bug 1165515)
Backed out changeset d6b6cc373197 (bug 1165515)
Backed out changeset 0615265b593c (bug 1165515)
Backed out changeset fafd1dce9f08 (bug 1165515)
Backed out changeset d1df869245f9 (bug 1165515)
Backed out changeset 6876a7c63611 (bug 1165515)
Backed out changeset b7841c94a9a3 (bug 1165515)
Backed out changeset e5e3617f7c73 (bug 1165515)
Backed out changeset 39be3db95978 (bug 1165515)
Backed out changeset 0ec74176f8de (bug 1165515)
Backed out changeset 5b928dd10d71 (bug 1165515)
2015-06-01 17:57:58 -07:00
Eric Rahm
f82c0e7caf Bug 1165515 - Part 13-2: Replace usage of PRLogModuleLevel and PR_LOG_*. rs=froydnj
This is straightforward mapping of PR_LOG levels to their LogLevel
counterparts:
  PR_LOG_ERROR   -> LogLevel::Error
  PR_LOG_WARNING -> LogLevel::Warning
  PR_LOG_WARN    -> LogLevel::Warning
  PR_LOG_INFO    -> LogLevel::Info
  PR_LOG_DEBUG   -> LogLevel::Debug
  PR_LOG_NOTICE  -> LogLevel::Debug
  PR_LOG_VERBOSE -> LogLevel::Verbose

Instances of PRLogModuleLevel were mapped to a fully qualified
mozilla::LogLevel, instances of PR_LOG levels in #defines were mapped to a
fully qualified mozilla::LogLevel::* level, and all other instances were
mapped to us a shorter format of LogLevel::*.

Bustage for usage of the non-fully qualified LogLevel were fixed by adding
|using mozilla::LogLevel;| where appropriate.
2015-06-01 14:31:01 -07:00