Commit Graph

222 Commits

Author SHA1 Message Date
Alastor Wu
50105cec03 Bug 1417300 - adjust sample time before calculating the total decoded duration. r=jya
We do not want to perform the adjustment of the timestamp after reading the ogg
chain but before. Otherwise the parent's mDecodedAudioDuration would be adjusted
causing the sample's time to be twice the value it should be.

MozReview-Commit-ID: 50VrOCzrwFg

--HG--
extra : rebase_source : 48b1efecb138ca7fa0e4c0584e21be1b6850cce3
2017-12-01 10:54:13 +08:00
Alfredo.Yang
41a2709293 Bug 1411525 - use BufferReader in flac/ogg parser. r=kinetik
MozReview-Commit-ID: 5chnxLnpqmY

--HG--
extra : rebase_source : 85e68812f1d354813ae36731a5a36bfe7f58c2e2
2017-10-19 10:16:32 +08:00
Gerald Squelart
b0442493e5 Bug 1405531 - Remove unused MediaDataDemuxer::HasTrackType - r=jwwang
The only actual code use in MediaSourceDemuxer can trivially be folded into
its caller GetNumberTracks in the same class.

MozReview-Commit-ID: E6zh98zmJwJ

--HG--
extra : rebase_source : 9358dc37523d6cd7c1a4d5ec62a790db6a092063
2017-10-04 11:40:29 +11:00
Alastor Wu
a08c8019d2 Bug 1398139 - part2 : adjust sample's start time for chained ogg. r=jya
For chained ogg files, the new part would contain new timestamp from zero, so
we need to add the duration of previously decoded data to make sure the current
time is correct.

MozReview-Commit-ID: Bb1lCiKz4uQ

--HG--
extra : rebase_source : 5cfd81eb092a042e6394aa5209516ad75e741a37
2017-09-15 18:05:10 +08:00
Gerald Squelart
7dbe315e25 Bug 1398999 - nsDequeFunctor::operator() doesn't need to return anything - r=froydnj
Its return value is never used, and most implementations return nullptr anyway.

MozReview-Commit-ID: 8rxC053mmE8

--HG--
extra : rebase_source : 61a0b8b1373396182efd27d3c01b96e5e5541364
2017-02-09 14:06:36 +11:00
Jean-Yves Avenard
9349efba14 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc

--HG--
extra : rebase_source : 918cf87b2ce82c8de245dcb23cc359289ac5f21f
2017-09-04 11:27:43 +02:00
Chris Pearce
ec0ac75c45 Bug 1394648 - Switch from nsInt{Point,Rect,Size} to gfx::Int{Point,Rect,Size} in dom/media. r=jwwang
The nsRect.h and nsSize.h headers typedef nsIntRect to gfx::IntRect etc, so the
rect/size objects we use will be the same, just under a different name.
However the old headers #include a bunch of things we don't use, so we if we
use the gfx objects directly we end up with a smaller include graph.

MozReview-Commit-ID: 7S4OSqBJK9m

--HG--
extra : rebase_source : 7cc48507356ce754e8395af957fa68a28711e00a
2017-08-29 14:00:33 +12:00
Chris Pearce
38854683c2 Bug 1390748 - Remove unnecessary includes in *Decoders. r=jwwang
MozReview-Commit-ID: 3bfAdpopOfp

--HG--
extra : rebase_source : c9b0a0991d731b38d3f077f90cd4f79b6470fe38
2017-08-16 17:19:39 +12:00
Chris Pearce
09b9dbe471 Bug 1390748 - Remove ChannelMediaDecoder::CloneImpl() and remove subclasses of ChannelMediaDecoder. r=jwwang
MozReview-Commit-ID: 6nlBArYgwEJ

--HG--
extra : rebase_source : 5a87dfe0d77fc23d36a4f57452322c39d720698c
2017-08-15 17:52:17 +12:00
Chris Pearce
502cbde454 Bug 1390748 - Remove OggDecoder::CreateStateMachine(). r=jwwang
MozReview-Commit-ID: 2JgZ2Ppv6as

--HG--
extra : rebase_source : 5ce2fe9136dcd32f62f7de0e85523cdcda8fa206
2017-08-15 16:21:35 +12:00
Carsten "Tomcat" Book
c6627dee5c Backed out changeset 57be2e971ae2 (bug 1390748) for bustage
--HG--
extra : rebase_source : d698de5ec05677e010c0a47f27a1753c40acb90d
2017-08-17 08:37:17 +02:00
Carsten "Tomcat" Book
cdf7a88921 Backed out changeset d3c000525403 (bug 1390748)
--HG--
extra : rebase_source : e8fcead7d669d02c1696a522777c83e4b0def623
2017-08-17 08:35:25 +02:00
Carsten "Tomcat" Book
ce6b956372 Backed out changeset 3f9350bf23ff (bug 1390748)
--HG--
extra : rebase_source : 8f8f504428a69d6f91f86fa7bf944402180a6d82
2017-08-17 08:35:20 +02:00
Chris Pearce
343a77339a Bug 1390748 - Remove unnecessary includes in *Decoders. r=jwwang
MozReview-Commit-ID: 3bfAdpopOfp

--HG--
extra : rebase_source : 4a1c9d156c48140196aef219552b1982ad1161d0
2017-08-16 17:19:39 +12:00
Chris Pearce
51800b3d2a Bug 1390748 - Remove ChannelMediaDecoder::CloneImpl() and remove subclasses of ChannelMediaDecoder. r=jwwang
MozReview-Commit-ID: 6nlBArYgwEJ

--HG--
extra : rebase_source : eb7a6fedf7b118e951e5f701b2c9f54459b3f3f0
2017-08-15 17:52:17 +12:00
Chris Pearce
e238ff328d Bug 1390748 - Remove OggDecoder::CreateStateMachine(). r=jwwang
MozReview-Commit-ID: 2JgZ2Ppv6as

--HG--
extra : rebase_source : 5ce2fe9136dcd32f62f7de0e85523cdcda8fa206
2017-08-15 16:21:35 +12:00
Phil Ringnalda
38ce1ea2a0 Backed out 10 changesets (bug 1390748) for build bustage
Backed out changeset 02b36ee5fb17 (bug 1390748)
Backed out changeset 84e8bf01c856 (bug 1390748)
Backed out changeset fc8989be30f3 (bug 1390748)
Backed out changeset 14d421ace6cc (bug 1390748)
Backed out changeset 7dadac869038 (bug 1390748)
Backed out changeset 0e77809e7bc2 (bug 1390748)
Backed out changeset bf78a8dce9c5 (bug 1390748)
Backed out changeset 5fa77990472e (bug 1390748)
Backed out changeset 5d3b637d2485 (bug 1390748)
Backed out changeset 634fe076d134 (bug 1390748)

MozReview-Commit-ID: Dxio8vXDCHg
2017-08-16 21:33:10 -07:00
Chris Pearce
162ce2ce95 Bug 1390748 - Remove unnecessary includes in *Decoders. r=jwwang
MozReview-Commit-ID: 3bfAdpopOfp

--HG--
extra : rebase_source : 0696df4f22dd261d245f905db2749ae3323460bc
2017-08-16 17:19:39 +12:00
Chris Pearce
d22c79dd24 Bug 1390748 - Remove ChannelMediaDecoder::CloneImpl() and remove subclasses of ChannelMediaDecoder. r=jwwang
MozReview-Commit-ID: 6nlBArYgwEJ

--HG--
extra : rebase_source : 5a669544b7a9c6f2d4d27a47c621c21b9317f789
2017-08-15 17:52:17 +12:00
Chris Pearce
145246057b Bug 1390748 - Remove OggDecoder::CreateStateMachine(). r=jwwang
MozReview-Commit-ID: 2JgZ2Ppv6as

--HG--
extra : rebase_source : fac9fc0b3904061881bf161aee7223cd5b1d14b9
2017-08-15 16:21:35 +12:00
Chris Pearce
2317493000 Bug 1388288 - Make Flac and Ogg decoders build in non-Unified mode. r=jya
FLAC_MAX_CHANNELS is used in FlacDemuxer and in FrameParser, so move it,
and all the other FLAC_{MIN,MAX}* #defines to FrameParser.h. The other
defines don't technically need to be there, but it's nicer to have them
all defined together.

MozReview-Commit-ID: LVZzXvBSvMq

--HG--
extra : rebase_source : 1c8e5c111232856ef5589f214c00d510ece9af00
2017-08-08 15:46:37 +08:00
JW Wang
09bd1a691e Bug 1383628. P1 - divide Clone() into 2 functions. r=gerald
Now we have a non-virtual Clone() and a virtual CloneImpl().
We will call Load() inside Clone().

MozReview-Commit-ID: Hd6p206Brhq

--HG--
extra : rebase_source : fe30611f6524234d98494cd55453140e3b78c7d6
extra : source : 517cd32514e65cf5f6cd7fe46acecd7f9aea6310
2017-08-03 17:39:55 +08:00
Bevis Tseng
a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Carsten "Tomcat" Book
0c215343b0 merge mozilla-inbound to mozilla-central a=merge 2017-07-24 13:01:44 +02:00
Nicholas Nethercote
90eaa02ea0 Bug 1382099 - Remove MOZ_WIDGET_GONK from dom/media/. r=gerald.
As well as the obvious #ifdefs, this allows DOMHwMediaStream to be
removed, and also the "phone-state-changed" observer.

--HG--
extra : rebase_source : 373280183e228bd4b9bd9d866959409f2444c77e
2017-07-24 10:08:55 +10:00
JW Wang
ef025c6fcf Bug 1316211. P15 - remove MDR from the base class of MFR. r=gerald
MozReview-Commit-ID: Jf5pCxkhexg

--HG--
extra : rebase_source : 3ec9423d4d0f3b60ee9e5f6f19af18188530e1d9
extra : source : 4fbc225bfc79abacaf47ffd4405ef2d6711dea32
2017-07-19 22:18:37 +08:00
JW Wang
789cd1ebe8 Bug 1380532. P1 - pass GMPCrashHelper through MediaDecoderReaderInit to MFR. r=gerald
So we can reduce dependency on AbstractMediaDecoder.
See bug 1378295 comment 1 for the detail.

Note it is not ideal to repeat |init.mCrashHelper = ...| several times in
this patch. We will re-visit it to reduce code duplication after bug 1378295
is done.

MozReview-Commit-ID: AEC56ukqtYr

--HG--
extra : rebase_source : 07554566af74b65f391811e55847e58365ac81fe
extra : source : 7f613117f815369f65256408b221131683c0dd82
2017-07-13 10:19:36 +08:00
JW Wang
4ca981216d Bug 1380234. P1 - pass KnowsCompositor to MFR through MediaDecoderReaderInit. r=jya
MozReview-Commit-ID: 3krK3meG5jV

--HG--
extra : rebase_source : f0a628ab28a527fa7f79ec61672e988cf1def8e7
extra : source : c8c2a6f2506338a8208f3bcf56160c47e6a29000
2017-07-12 15:37:02 +08:00
JW Wang
30093548fb Bug 1378295. P6 - remove AbstractMediaDecoder and fix includes. r=jya
MozReview-Commit-ID: xN1Ywo9VDY

--HG--
extra : rebase_source : 9aee1697b5299e43eb35450a20015c08a11bdea6
extra : intermediate-source : 3095884f04356d0d2c3c34843098a0a8b23211b8
extra : source : ef0f7e5300060b7888b961596a32a8fbf483ebd2
2017-07-13 17:39:42 +08:00
JW Wang
35f6829a03 Bug 1378295. P1 - remove unused MFR::mDecoder. r=jya
MozReview-Commit-ID: BuvxlYs0LqD

--HG--
extra : rebase_source : 8595e8c5e08e9cd6575b3e3bf37e59e25c79045c
extra : intermediate-source : 589082a3f0571cea45e6942a1e6b82adda7efdcb
extra : source : 47cdc0a2b7acec44d102b165e1867b4f689e488c
2017-07-13 15:13:12 +08:00
JW Wang
0ad4cd546b Bug 1380568. P1 - store FrameStatistics in MFR. r=jya
So we can remove the use of AbstractMediaDecoder::NotifyDecodedFrames().

MozReview-Commit-ID: Ch7Saha6zdi

--HG--
extra : rebase_source : 8562faa56d1f31797643ed0f7ae550765d8c86d7
extra : intermediate-source : 05b50517cc40f2adf06facfccea628488dd319da
extra : source : d5af89f5a09e03c8fbb0d6111f88e3221f3a1d57
2017-07-07 11:05:03 +08:00
JW Wang
aeaad5857f Bug 1378689 - add a structure to pack the data sent to the MediaDecoderReader constructor. r=jya
It would be handy we want to pass more data to the constructor.

MozReview-Commit-ID: 3AUUsTbv534

--HG--
extra : rebase_source : 8d230c85addf1ba296e6a0512f0d18ebd41c0d17
extra : source : e6568e9fa24f52c59baecaa16aa044b492f407fb
2017-07-06 16:59:22 +08:00
JW Wang
15da20ff70 Bug 1378316. P1 - store MediaDecoderReader in MediaDecoder. r=gerald
So we are able to dispatch NotifyDataArrived() to MediaDecoderReader in P2.

MozReview-Commit-ID: 3RM66uTvYSc

--HG--
extra : rebase_source : 40311cf27fefbd2046016fb246a3a4ccfce845a8
extra : source : 515d9b3b3cd4b0b30d2fd8196b48c55e14466263
2017-07-05 17:21:17 +08:00
JW Wang
ab6f636e4a Bug 1378304. P2 - replace GetResource() with mResource in MediaDecoder sub-classes. r=jya
MozReview-Commit-ID: GRIBp3y0Cb7

--HG--
extra : rebase_source : c80386b223d90e8a9a7fb285a09edc526227bde8
extra : source : b74c63131f6ed873726519eed1a308aaaf35a6a9
2017-07-05 14:52:42 +08:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote
58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
JW Wang
61f7ca2479 Bug 1374930. P3 - move Clone() down to ChannelMediaDecoder for clone is possible only for those use channel-based resource. r=cpearce
MozReview-Commit-ID: Ci2kbts2pkQ

--HG--
extra : rebase_source : 3a2e70ca4bf56e1c73b7faff8e183211787a96bf
extra : source : 682cb949adae4683ae1cbbfbb4c457b83cb1fddc
2017-06-20 18:10:27 +08:00
JW Wang
5c00111ef1 Bug 1374930. P1 - add ChannelMediaDecoder to be the base class which uses channel-based MediaResource. r=cpearce
MozReview-Commit-ID: 6L4me2BQkgi

--HG--
extra : rebase_source : d78de302d0551b9754569885d79ed3aba6571f61
extra : intermediate-source : d32948c3c5110b663d4ac61a1f483c8f8db00707
extra : source : cfd7941b933671dcb83c1131463b39f58fec627d
2017-06-19 15:50:09 +08:00
Mats Palmgren
0b07470173 Bug 1372012 - Remove redundant hashtable Contains calls before Get. r=froydnj
MozReview-Commit-ID: 1RC4HY6Hya9
2017-06-14 16:11:21 +02:00
Mats Palmgren
36a3a728a9 Bug 1372011 - Use LookupForAdd instead of Contains+Put to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 57p6FeJnYAi
2017-06-14 16:11:21 +02:00
JW Wang
ba75abc972 Bug 1371514. P1 - remove AbstractMediaDecoder::IsOggDecoderShutdown() and its friends. r=gerald
MozReview-Commit-ID: 5HOqH6YtB8b

--HG--
extra : rebase_source : 49cc525c32d827584c856e815a1ff3e2df968cea
2017-06-09 11:24:45 +08:00
JW Wang
4031d18757 Bug 1371200. P1 - add MediaDecoderInit and fix MediaDecoder constructor and its friends. r=cpearce
We will add more fields to MediaDecoderInit and be able to remove some setters.

MozReview-Commit-ID: BVx935IHQHf

--HG--
extra : rebase_source : 6d167265e478ce39881ceada1303e9ca18189bbf
extra : source : 0c26f909568f673591ad6720458dfc912c01daad
2017-06-07 12:14:11 +08:00
JW Wang
f2ea37e57b Bug 1357986 - Use helper functions of TimeUnit to make code more readable. r=kaku
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().

MozReview-Commit-ID: 6hC94PXx86i

--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
2017-04-17 16:35:04 +08:00
JW Wang
302d82c85a Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O

--HG--
extra : rebase_source : d504ac15a6dc59ad42f3ab80faf23f629d74315f
extra : intermediate-source : 6e52995b6c8146451d98dffc62f6907755dc856e
extra : source : 82d2649cdafb5a6389f6858c23578811933580c9
2017-04-14 17:13:36 +08:00
JW Wang
235f1f55ed Bug 1356506 - change the type of MediaData::mTimecode to TimeUnit since int64_t is ambiguous. r=gerald
MozReview-Commit-ID: 7dO5OOUuORz

--HG--
extra : rebase_source : 1c1c020700d9180ef9f85d7e2e679f498ab71fce
extra : intermediate-source : d173c820bef7a113e28e9732c42e8c1af36160ab
extra : source : 04c08a780526ca3a5ac4d1a6f9b7ae30d9957e92
2017-04-14 14:52:14 +08:00
JW Wang
3c0e7bddc7 Bug 1356502. P1 - let MediaDatra::GetEndTime() return a TimeUnit instead of ambiguous int64_t. r=gerald
MozReview-Commit-ID: DBQELBs32Ad

--HG--
extra : rebase_source : a7c9f7affbdfa12aaf94a6d0505cf4f54f4408cc
extra : intermediate-source : e1fcccdb12bb86c23520b5c2e0d76aef355597a5
extra : source : ddb8a8382c74e18dd52cdfbc7e8eee54cf46f05d
2017-04-14 14:14:08 +08:00
JW Wang
464497b945 Bug 1355756. P1 - change the type of MediaData::mDuration to TimeUnit. r=gerald
MozReview-Commit-ID: 3d4bUYtSuMI

--HG--
extra : rebase_source : 94c821b6d381421035e6a12cbe038436055c5822
extra : intermediate-source : 9a06beffc736486f47b9cf05e7f482e726d53068
extra : source : fdbdcd5c1474f04dc1dbde66fcf3a9ecec953053
2017-04-12 17:27:34 +08:00
JW Wang
f45fa7374e Bug 1355740 - Change the type of TrackInfo::mDuration to TimeUnit. r=jya
MozReview-Commit-ID: P7aqw4d5Vk

--HG--
extra : rebase_source : f22743fec9c8b70cbb092e3b26e252e7a4cb0b31
extra : source : 2413cd58f073b734a2cb85cec3658942bfd46e08
2017-04-12 16:41:36 +08:00
Kaku Kuo
c4c19bf3c4 Bug 1351522 - Label runnables in dom/media/ogg/OggDemuxer.cpp; r=jwwang
MozReview-Commit-ID: 8dIioCvfiJk

--HG--
extra : rebase_source : 6f35f1fffad6674623afb778de286f0a58b1e41c
2017-03-29 10:26:09 +08:00
Michael Layzell
4ed3440974 Bug 1336510 - Part 6: Avoid AddRefing/Releasing CamerasChild on the wrong thread, r=jwwang
MozReview-Commit-ID: 8b5KK7sL6wb
2017-02-24 14:34:26 -05:00