Commit Graph

425 Commits

Author SHA1 Message Date
Jean-Yves Avenard
3f3757ce78 Bug 1207429: P2. Enable FFmpeg by default if available. r=kentuckyfriedtakahe
By default we only use libav 9 or FFmpeg 1.2 if found on the system.

If media.fragmented-mp4.ffmpeg.enabled is set, will allow use of libav 0.7 and ffmpeg 0.8 or later.
2015-09-27 15:19:28 +10:00
Chris Pearce
e9dd5ecb69 Bug 1208349 - Ensure we query PDM whether it supports MP4 before assuming it supports MP4. r=jya 2015-09-25 23:17:50 +12:00
Carsten "Tomcat" Book
1c9015e1a5 Backed out 1 changesets (bug 1208349) for m2 and w2/3 test failures
Backed out changeset 188a6e9a86a0 (bug 1208349)
2015-09-25 11:54:49 +02:00
Chris Pearce
af04bc849a Bug 1208349 - Ensure we query PDM whether it supports MP4 before assuming it supports MP4. r=jya 2015-09-25 18:38:22 +12:00
Jean-Yves Avenard
023ff53978 Bug 1204757: P1. Update MediaDataDemuxer::Init() behavior. r=cpearce
A MediaDataDemuxer is now not to resolve the init promise until it has all the metadata.
Except MediaSource, all demuxers would be doing blocking read to scan for the metadata, and having partial metadata would be an error.
For MediaSource, we pass the NotifyDataArrived message which will cause the MediaSourceDemuxer to re-attempt to search for the metadata.

When used within MediaSource's TrackBuffersManager, a demuxer will never be created until we have received a complete init segment (this task is performed by the various ContainerParsers)
2015-09-16 18:14:17 +10:00
Jean-Yves Avenard
33e5945370 Bug 1204407: P2. Remove no longer required MediaDataDemuxer APIs. r=cpearce 2015-09-16 18:14:15 +10:00
Jean-Yves Avenard
71c5c9a7bf Bug 1204419: P4. Remove MediaDataDemuxer API no longer used. r=cpearce 2015-09-16 18:14:12 +10:00
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
Roman Reiss
70689c0fde Bug 875573 - Add video/x-m4v mime type. r=kentuckyfriedtakahe 2015-08-21 20:52:19 +02: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
Wes Kocher
90a0825d69 Backed out changeset f51c32dbea00 (bug 875573) for test_can_play_type_mpeg.html orange
--HG--
extra : rebase_source : ddc4996ce1579c348cea1b87e05e1c7f938fa918
2015-08-20 16:19:39 -07:00
Roman Reiss
ca5609da1f Bug 875573 - Add video/x-m4v mime type to MP4Decoder r=kentuckyfriedtakahe 2015-08-20 14:14:11 -07:00
John Lin
8203f9fd80 Bug 1186845 - Let MP4Decoder handle 3GPP files if Gonk PDM is available. r=cpearce
--HG--
extra : rebase_source : 22a376b9b4724169b2e5661aa4c724cd6303fa50
2015-08-17 15:12:43 -07:00
Matt Woodrow
169ab22517 Bug 1178098 - Report why DXVA initialization failed to about:support. r=cpearce
--HG--
extra : rebase_source : 976baee04db89d0808b8fc494108e01aa163d402
2015-07-13 16:12:23 -04:00
Jean-Yves Avenard
9baf704f1b Bug 1190238: P3. Do not loop calling MediaResource::Read or ReadAt, let MediaResourceIndex do it for us. r=cpearce
This allows to remove a fair amount of duplicated logic.
Most of it is in obsoleted code though.
2015-08-13 15:27:10 +10:00
Alfredo Yang
8c59fda383 Bug 1146086: use promise to Init() in PlatformDecoderModule. r=jya,r=cpearce 2015-08-11 14:09:12 +10:00
Jan Gerber
833434e663 Bug 1185792: [webm] P1. Make MediaInfo.mFrame nsIntRect for visible area. r=jya 2015-08-07 19:31:38 +10:00
Makoto Kato
50e851b877 Bug 830801 - Part 2. Remove NOMINMAX define from moz.build. r=mshal 2015-08-03 10:07:09 +09:00
Jean-Yves Avenard
8204ebce53 Bug 1184826: P1. Mark MPEG-2 AAC as supported. r=cpearce 2015-07-22 14:22:53 +10: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
Bobby Holley
04eaf4c167 Bug 1184634 - Move various includes into the mozilla namespace. r=gerald
I did my a quick best-effort pass to fix up the most egregious ordering
problems. I left some big pre-existing messes alone.
2015-07-16 22:23:18 -07:00
Bobby Holley
997543e6ba Bug 1184634 - Rename MediaTaskQueue to TaskQueue. r=gerald 2015-07-16 22:23:06 -07:00
Bobby Holley
78001ffc43 Bug 1184634 - Rename "TaskQueue()" accessor to "OwnerThread()". r=gerald
Otherwise this name will collide with the rename of MediaTaskQueue to TaskQueue.
It's also a better naming convention, because it generalizes to things that are
owned by an AbstractThread that is not a Task Queue.

We rename to Queue() in TestMozPromise, because that's more accurate.
2015-07-16 22:22:07 -07:00
Bobby Holley
407d2c5f90 Bug 1184634 - Rename MediaPromise to MozPromise. r=gerald 2015-07-16 22:21:56 -07:00
Jean-Yves Avenard
3db4cce1f9 Bug 1169473: Re-add H264 telemetry. r=miketaylr 2015-07-16 14:31:52 +10:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Jean-Yves Avenard
9e0b01d33a Bug 1181894: Always create a PlatformDecoderModule in CDMWrapper. r=cpearce
Not all tracks may be encrypted, as such we need a default PDM in order to decode non-encrypted data.
2015-07-09 16:18:05 +10:00
Jean-Yves Avenard
641d20eb39 Bug 1180403: P1. Ensure buffered index is up to date. r=cpearce 2015-07-09 11:06:07 +10:00
Jean-Yves Avenard
c7b6fa505d Bug 1179094: Use TimeUnit in PlatformDecoderModule. r=cpearce 2015-07-08 10:56:16 +10:00
Cervantes Yu
5dfad47413 Bug 1180644: Fix crashes after enabling OOP on B2GDroid. r=snorp 2015-07-06 19:18:20 +08:00
Sotaro Ikeda
05e6073126 Bug 1171257 - Add force decode ahead to MediaFormatReader r=jya,bholley 2015-07-05 09:39:30 -07:00
Bobby Holley
f15bd05ef7 Bug 1179110 - Use a Maybe<> to store start time, rather than using -1 as a sentinel. r=jya
This allows us to properly support videos with a negative start time, which
is happening here.
2015-07-02 12:05:17 -07:00
Bobby Holley
2324e58fb3 Bug 1178437 - Do the dormant-enabled tracking on the main thread. r=jww,r=jya
This is purely a question of policy, so there's no reason it needs to live on
the off-main-thread decoding machinery.
2015-07-01 18:47:41 -07:00
Bobby Holley
a80e87862b Bug 1175768 - Use mirroring for buffered ranges. r=jya 2015-06-27 01:19:13 -07:00
Bobby Holley
f25ea07acc Bug 1175768 - Dispatch NotifyDataArrived and remove the aBuffer argument. r=jya
It would be nice to remove the argument in a separate patch, but we can't
perform MediaResource reads on the main thread, so the SilentReadAt stuff
needs to happen at the same time as the off-main-thread stuff.
2015-06-27 01:19:10 -07:00
Ryan VanderMeulen
d9ca5de3ed Backed out 8 changesets (bug 1175768) for frequent media test failures.
Backed out changeset a369cfb95b59 (bug 1175768)
Backed out changeset e02dd312d622 (bug 1175768)
Backed out changeset 6776ce74b9e5 (bug 1175768)
Backed out changeset 6aa5fa1d318e (bug 1175768)
Backed out changeset a8bd7a0d2aea (bug 1175768)
Backed out changeset 41ffc9a9ac48 (bug 1175768)
Backed out changeset 2d2cefa397dc (bug 1175768)
Backed out changeset 4e06368496d2 (bug 1175768)

CLOSED TREE
2015-06-23 16:20:15 -04:00
Bobby Holley
5c20ea36aa Bug 1175768 - Use mirroring for buffered ranges. r=jya 2015-06-22 22:53:09 -07:00
Bobby Holley
23c16e6894 Bug 1175768 - Dispatch NotifyDataArrived and remove the aBuffer argument. r=jya
It would be nice to remove the argument in a separate patch, but we can't
perform MediaResource reads on the main thread, so the SilentReadAt stuff
needs to happen at the same time as the off-main-thread stuff.
2015-06-22 22:53:07 -07:00
Jean-Yves Avenard
a6eb757a5b Bug 1174582: P3. Do not skip keyframe with negative timestamp. rpending=alfredo
MP4Reader.
2015-06-19 16:45:17 +10:00
Bobby Holley
89519087bc Bug 1163223 - Move bailout case in GetBuffered into the readers. r=jww
The problem here is that, because we run mReader->SetStartTime() as a promise
callback, MDSM::HasStartTime() may be true while the reader hasn't been
notified yet. This is obviously broken, but no more broken than the fact that
GetBuffered operates synchronously (and is basically the last piece of
machinery left doing so). Fixing that is next on my list, but let's just hack
around this for now to get this stack landed.
2015-06-16 15:08:29 -07:00
Wes Kocher
f45cfb1d2d Backed out 8 changesets (bug 1163223) for getting in the way of me backing out f46a712edf7e
Backed out changeset c1b33c43f0c5 (bug 1163223)
Backed out changeset a7ee6eb45f62 (bug 1163223)
Backed out changeset b2e10f194455 (bug 1163223)
Backed out changeset 9e7651567cad (bug 1163223)
Backed out changeset 20e25e93ed5f (bug 1163223)
Backed out changeset 5193508738f8 (bug 1163223)
Backed out changeset aea6b8d15318 (bug 1163223)
Backed out changeset 7b6804398fc3 (bug 1163223)
2015-06-16 14:47:50 -07:00
Bobby Holley
593a76d612 Bug 1163223 - Move bailout case in GetBuffered into the readers. r=jww
The problem here is that, because we run mReader->SetStartTime() as a promise
callback, MDSM::HasStartTime() may be true while the reader hasn't been
notified yet. This is obviously broken, but no more broken than the fact that
GetBuffered operates synchronously (and is basically the last piece of
machinery left doing so). Fixing that is next on my list, but let's just hack
around this for now to get this stack landed.
2015-06-16 12:59:56 -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
63af29a4ae Bug 1171330: P8. Check MoofParser index before demuxing. r=cpearce
--HG--
extra : rebase_source : 96025f72457f9aba4c70732d580a2447cc219e26
2015-06-11 15:55:20 +10:00
Bobby Holley
c2bf6e7564 Bug 1173001 - Fix up some task queue naming to make MediaDecoderReader consistent with MDSM. r=jww 2015-06-10 14:17:26 -07:00
Bobby Holley
adc66a3dab Bug 1173001 - Initialize reader task queue in the constructor. r=jww
This is a necessary step towards having mirrored/canonical values, since those
need to know the task queue in their constructor.
2015-06-10 14:17:25 -07:00