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

126 Коммитов

Автор SHA1 Сообщение Дата
Chris Pearce f2902bdf82 Bug 1390406 - Remove unnecessary includes in dom/media/mediasource. r=jya
MozReview-Commit-ID: 1aTncGfBicu

--HG--
extra : rebase_source : 8ad085eb81d195732c385718c283b4752e5e3c80
2017-08-15 16:13:00 +12:00
Jean-Yves Avenard f247f14f15 Bug 1389844 - P3. Handle case where currentTime isn't contained in buffered range. r=gerald
When playback starts, currentTime is always 0, and even if the buffered data doesn't contain currentTime it is possible for playback to progress as we always allow up to 500ms gap in the buffered data.

As such, we must use fuzzing on the interval's start time when determining if we have future data.

MozReview-Commit-ID: Ki9QxmKhfdY

--HG--
extra : rebase_source : b7a550348b61d96f91e73b171a5dd03b16a4c152
2017-08-16 19:35:27 +02:00
JW Wang b4e54281c9 Bug 1388228. P2 - cache the result of CanPlayThrough() and mirror it to MDSM. r=gerald
So we don't duplicate the code of calculating CanPlayThrough from
download rate and playback rate in MediaDecoder.

MozReview-Commit-ID: 7M5JAuUxFFc

--HG--
extra : rebase_source : cb216a1af59b9d8207e3056a5d3ae05e93d85e74
extra : source : a183c089760e329508fac44239fee42c1f047b80
2017-08-04 17:38:20 +08:00
Ryan VanderMeulen e0883c892e Bug 1364821 - Fix merge bustage. a=RyanVM
A line was accidentally dropped when resolving merge conflicts between inbound and autoland. CI wasn't amused. This just adds it back.
2017-08-04 15:33:53 -04:00
Sebastian Hengst 765cc1b925 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: JhesEg4Bxjy
2017-08-04 19:28:27 +02:00
Bill McCloskey 2273c53b75 Bug 1364821 - Introduce AbstractThread::AutoEnter and remove main thread's AbstractThread::GetCurrent() (r=jwwang)
MozReview-Commit-ID: FSLVn7xe3sq
2017-08-03 14:19:02 -07:00
JW Wang d685ec7cc3 Bug 1386956. P2 - move mResource to sub-classes. r=gerald
MozReview-Commit-ID: Ixx8NwZfjhO

--HG--
extra : rebase_source : 65529a6cf6736e6fde61ddd413efa6f38cd96922
extra : intermediate-source : 1d75a416e8452c356f533d13c3037cae07aeb291
extra : source : d14219446670baf0f02da86c412932ec59dbf178
2017-08-03 15:38:28 +08:00
JW Wang 17554a637a Bug 1385699. P4 - MediaDecoder::mExplicitDuration doesn't need to be a canonical anymore. r=cpearce
MozReview-Commit-ID: 4FUwQRS2K1m

--HG--
extra : rebase_source : 66b2f1a9fcdf54abd61f071847c1469ad3a3c5c4
extra : source : 0da2d6137100d1cb3ec33d5ce735252eeba3ac62
2017-08-01 15:06:13 +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
Jean-Yves Avenard d0144aba45 Bug 1382303 - P3. Reduce enough data threadhold to 10s. r=jwwang
We waited 30s until we changed readyState to HAVE_ENOUGH_DATA this would cause autoplay media element to start rather late. In particular with live stream. 10s is typically enough ahead time to start playback.

MozReview-Commit-ID: LJvY8cQYfwZ

--HG--
extra : rebase_source : 4c75326891ba4e9317c432ea7074eb033a77b300
2017-07-20 20:49:06 +02: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 5370eb3105 Bug 1316211. P13 - replace use of MediaDecoderReader with MediaFormatReader. r=gerald
We will remove MediaDecoderReader in the future.

MozReview-Commit-ID: BaCRXleKK5a

--HG--
extra : rebase_source : dc14a593d6291136f02b1deb910cd6dcd01c0355
extra : source : 8f71b7dae0a541562c7c3829b5a873e9f9fd2674
2017-07-19 17:01:32 +08:00
JW Wang cf0ba2ea01 Bug 1380569. P3 - remove AbstractMediaDecoder::NotifyWaitingForKey() and its callers. r=gerald
MozReview-Commit-ID: 3fHDr0xw92P

--HG--
extra : rebase_source : 07ca1ae4e8d65e66beca2d1eb0de232ec6e291fb
extra : intermediate-source : d367e33cc9c132abb9e66aae652f4bbbf4f58be1
extra : source : 029ccea837ef1948bd33ce1d786626f362c41bdf
2017-07-13 14:52:05 +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 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
JW Wang 43c85c2307 Bug 1376227. P5 - merge CreateResource() and Load() for they are highly coupled. r=gerald
MozReview-Commit-ID: EH9NROdQfmd

--HG--
extra : rebase_source : 63c2ba04de1a25fb05db15977d8a19638e31b272
2017-06-23 15:39:57 +08:00
JW Wang 350f03bde7 Bug 1376227. P3 - move Load() down the class hierarchy. r=gerald
So we won't pass an unused |nsIStreamListener**| to MediaSourceDecoder::Load().

MozReview-Commit-ID: 2TCby8m8K5H

--HG--
extra : rebase_source : 349179aa4303c0abd8b86a695789770e158e5c28
extra : intermediate-source : d6f550bd6709a0ee7db6033286af42565a20cdb1
extra : source : ed524d855a1a78665c499152a9360ba961655641
2017-06-23 14:12:41 +08:00
JW Wang 884c26d368 Bug 1376227. P1 - let MediaDecoder sub-classes have the knowledge how to create a MediaResource. r=gerald
MozReview-Commit-ID: 2fHEkU46MUr

--HG--
extra : rebase_source : 18f5b01a065d6acbdc88ce808f8bd1e8e462e8d7
extra : intermediate-source : e003e070535d95f7e6334f4a92d6d763d436023c
extra : source : 450d506c6bb85f53b44fed296a32845bcd777905
2017-06-21 17:30:56 +08: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 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
Jean-Yves Avenard ab282a14d4 Bug 1357040: P2. Don't rely on NotifyDataArrived to resolve MSE init promise. r=gerald
MozReview-Commit-ID: KUxVqfU9umw

--HG--
extra : rebase_source : c6f11109490fbb6fbfbda1b0fe2be1c8088ca4a2
2017-04-27 19:53:53 +02:00
JW Wang f6a893a644 Bug 1358969 - let MediaDecoder::CurrentPosition() return a TimeUnit. r=kikuo
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.

MozReview-Commit-ID: K3Bz3uEXLDK

--HG--
extra : rebase_source : ade3cbd61c764b73a22c360572a525127dbadbc5
extra : intermediate-source : 013227a4aa645fc34a82c44130db6c847d74960b
extra : source : 1ab7ce426b557e4ce9979e023f9e84b4690eeaaa
2017-04-17 17:04:39 +08:00
JW Wang 02369ea1a2 Bug 1357987 - make MediaDecoder::DEFAULT_NEXT_FRAME_AVAILABLE_BUFFERED a TimeUnit to avoid ambiguous int64_t for microseconds. r=kaku
MozReview-Commit-ID: 9JC4zPEc6or

--HG--
extra : rebase_source : 8001ba3924f4bdb2ffb4143f1a22e2c4bf697ce3
extra : intermediate-source : 02bc62f83a7af3059b819c2bbb9fd887e2593043
extra : source : 5af753b1192f36ebf84279ff011617587ede613b
2017-04-17 16:58:44 +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 57506c3907 Bug 1343787. Part 2 - move the Register() calls to Load(). r=gerald
MozReview-Commit-ID: 2jjZujE1qH8

--HG--
extra : rebase_source : f787346a5631acceb27d88e352d67f66e8053bf9
extra : source : 2d3a5e31f306ab2109f38e070a9881ef2affba60
2017-03-02 18:03:20 +08:00
Jean-Yves Avenard 71e0f46c33 Bug 1325707: P4. Fix coding style of MediaDataDemuxers. r=gerald
MozReview-Commit-ID: AV2lXwVZqLV

--HG--
extra : rebase_source : f66559f4d104516c8dfd2c9a146dfba8672dce33
2017-02-07 09:23:34 +01:00
Jean-Yves Avenard b7844bd5c3 Bug 1319987: P9. More coding style fixes. r=gerald
MozReview-Commit-ID: DhFRqkWQZny

--HG--
extra : rebase_source : 03ed44efc83fe9cab7fc975229ac4e5746aff96b
2017-01-27 13:20:37 +01:00
Bevis Tseng f2bdbd8fd1 Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG

--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08:00
JW Wang 992114f5fd Bug 1332160 - use nsCString internally whenever possible. r=gerald
MozReview-Commit-ID: 1DUaJWfbL88

--HG--
extra : rebase_source : f4a02736b0385e4be6258a185822f7855d0b0189
extra : intermediate-source : 1faaf4254a2e1ce2c096a8650b66d07c84c7fdbe
extra : source : c23fc2cea382627af8ff20ae3edea926eaa6d51a
2017-01-18 16:51:31 +08:00
Jean-Yves Avenard 85862da5ee Bug 1298606: [MSE] P2. Properly determine next frame status in ended state. r=gerald
MozReview-Commit-ID: 2m05GzauHes

--HG--
extra : rebase_source : d5541dd96dc0480c41e7d68cfb96a95243b9a454
2016-08-27 22:27:22 +12:00
Bryce Van Dyk bf4a449efb Bug 1145011 - Implement waitingforkey event. r=jya
Bubble information from SamplesWaitingForKey to an HTMLMediaElement so that we
can emit a waitingForKey event. If we are unable to decode more samples due to
needing a key the event will be signalled. See
http://w3c.github.io/encrypted-media/#dom-evt-waitingforkey for more information
on this event.

The code in place before this patch handles updating readyState when we are
waiting for a key, this patch adds the event which should be emitted in such a
case. The spec defines certain preconditions should be the case before running
the algo to emit this event. For example, the element should potentially be
playing, and it should have at least HAVE_FUTURE_DATA ready state. This is not
strictly true for when the new code is run, due how existing code handles ready
state. We are honoring the spirit of the spec, though the letter of the spec is
lightly gone against in the handling of the preconditions.

MozReview-Commit-ID: LKlDd4wkRSE

--HG--
extra : rebase_source : 2c61fc41636e430afa23240ad5d26c886124d87f
2016-08-22 08:51:01 +12:00
Jean-Yves Avenard 4769abd741 Bug 1294648: [MSE] Return early if mediasource isn't attached. r=gerald
MozReview-Commit-ID: 9hCi5sPbZpW

--HG--
extra : rebase_source : 23b4cd16d3e104a30c0f1709b9ce0d04a105d219
2016-08-12 20:56:45 +10:00
Jean-Yves Avenard 57bcb09a90 Bug 1128069: [MSE] P6. Call NotifyDataArrived from MediaDecoder. r=gerald
Calling NotifyDataArrived from each sourcebuffer will cause multiple unnecessary NotifyDataArrived to the MediaFormatReader when it could only be done once. Additionally, it ensures that the media duration is updated prior to the reader actioning on the notification.

Extra: mEnded is only ever accessed on the main thread, there's no need to make it atomic.

MozReview-Commit-ID: IKq7IRBbWic

--HG--
extra : rebase_source : 6cf18b1f71f5ee6c8e82c73bdd2857e783f343b8
2016-08-08 13:56:38 +10:00
JW Wang 95cf484548 Bug 1290780. Part 7 - We don't want to trigger DurationChanged(). So just set mExplicitDuration without calling SetExplicitDuration(). r=jya
MozReview-Commit-ID: 5yWLhteUgQt

--HG--
extra : rebase_source : 9a17eccfc572d92317f7859d84e15e7b973e8fcd
2016-07-28 16:50:10 +08:00
JW Wang 887d693c49 Bug 1290780. Part 6 - Assert IsShutdown() is false in SetMediaSourceDuration(). r=jya
1. It is called from SetInitialDuration() when mMediaSource is non-null which happens before Shutdown() which clears |mMediaSource|.
2. It is called from MediaSource::SetDuration() which happens before MediaSourceDecoder::Shutdown() for |mDecoder| is non-null.
3. It is called from MediaSource::DurationChange() where |mDecoder| is non-null.

MozReview-Commit-ID: 56AmWRLkkiv

--HG--
extra : rebase_source : 1f9443ac3670b12401ffa5ad397638c095e72566
2016-07-28 15:52:30 +08:00
Jean-Yves Avenard 103da1bf41 Bug 1286810: [MSE] P2. Update duration change as per new MSE spec. r=gerald
See w3c/MSE Issue 19, 20 & 26.

Changing the duration now can never call the range removal algorithm. An explicit call to remove must be used for range removal.
This change performs the following:
- Require remove() for all Range Removals
- Error on Duration Changes that need remove first

MozReview-Commit-ID: 1fK2O1slnQ1
2016-07-19 11:45:28 +10:00
Jean-Yves Avenard 8b5b0ae730 Bug 1286723: [MSE] P1. Add support for live seekable attribute. r=bz,gerald
See https://github.com/w3c/media-source/issues/5

MozReview-Commit-ID: EP37gRmUAXF

--HG--
extra : rebase_source : cd134517a3f1d50bce2f17a82acabe0f2bb042cb
2016-07-14 14:34:45 +10:00
Jean-Yves Avenard d31cb0499b Bug 1206637: P2. Replace all cached preferences with MediaPrefs ones. r=cpearce
Additionally, clean up stray and unused Preferences.h header.

MozReview-Commit-ID: IcPrD2inkDE

--HG--
extra : rebase_source : c3c6e37767627db3601090c2855a3dfa98cb4368
2016-05-10 11:02:28 +10:00
JW Wang 0a9e6a6567 Bug 1267933 - rewrite the shutdown sequence of MediaShutdownManager. r=jya,gerald.
MozReview-Commit-ID: 8n7JlXOby0z
2016-05-04 16:13:25 +08:00
Jean-Yves Avenard 31a0cd2056 Bug 1269249: [MSE] P1. Clamp range to media source duration when media source is ended. r=jwwang
MozReview-Commit-ID: KncGDdTISQ8

--HG--
extra : rebase_source : 6d3234e46b21140e935d9b4490ca50c594c00370
2016-05-02 15:21:40 +10:00
JW Wang 753cf80b90 Bug 1259473 - per comment 14, move actions involving |this| to Init() from the constructor. r=jya. 2016-04-01 23:10:44 +08:00
Jean-Yves Avenard e4b81849b8 Bug 1258562: MSE] Abort if MediaSource has been shutdown. r=gerald
The assumption was made that this code was never called if MediaSourceDecoder::NextFrameBufferedStatus() had been called before. However, that assumption was incorrect as NextFrameBufferedStatus() is only called if we had determine we had no frame buffered.

MozReview-Commit-ID: 1hsEJuInION

--HG--
extra : rebase_source : f760ef8df01858c24887ba024c6b350332d2e4dc
2016-03-22 10:34:30 +11:00
Jean-Yves Avenard aceca098dd Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-12 23:45:46 +11:00
Phil Ringnalda 6111439998 Back out 6 changesets (bug 1245463) for !mAppendRunning (Append is running) assertion failures
CLOSED TREE

Backed out changeset 75d96e417aaf (bug 1245463)
Backed out changeset dca0577d741c (bug 1245463)
Backed out changeset 17ffbe7ca24e (bug 1245463)
Backed out changeset 83a2de2fcf02 (bug 1245463)
Backed out changeset e8bb35ea72e4 (bug 1245463)
Backed out changeset 48364b868055 (bug 1245463)
2016-02-11 23:39:36 -08:00
Jean-Yves Avenard 5a49dc9392 Bug 1245463: [MSE] P1. Do not attempt to retrieve the buffered range if the mediasource is in closed state. r=gerald
The changes that follow may cause the active sourcebuffer list to be modified; which will trigger an assertion if the mediasource object is closed.

MozReview-Commit-ID: 8A1CMKAUyTq
2016-02-12 10:27:33 +11:00
Carsten "Tomcat" Book f854f0417e Backed out changeset 5b37030dbfe3 (bug 1245463) for Android m-9 crashes 2016-02-10 11:20:31 +01:00