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

141 Коммитов

Автор SHA1 Сообщение Дата
JW Wang bb45ff010e Bug 1424973. P1 - propagate 'IsLiveStream' changes to MDSM in MediaDecoder subclasses. r=bechen,gerald
MozReview-Commit-ID: 8wSZf7pRERP

--HG--
extra : rebase_source : c2bea725064f5ad2e1cd1de1b8b9c19994bad89b
extra : intermediate-source : 54da627350d8a6276f9ad5d14a7191cb05957901
extra : source : dc582401401272df3150fb639bdf0ad05d749a06
2017-12-06 16:00:20 +08:00
Gerald Squelart c5aeab4f69 Bug 1407810 - Use DDMOZ_LOG in media stack - r=jwwang
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.

MozReview-Commit-ID: IeJJmzYqWMQ

--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
2017-10-13 16:31:59 +11:00
Gerald Squelart 1b357db99b Bug 1407810 - Use DDLogger in media stack - r=jwwang
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
  DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
  classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
  machine -> reader -> demuxer -> resource, etc.

And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)

More will be added later on, from just converting MOZ_LOGs, and as needed.

MozReview-Commit-ID: KgNhHSz35t0

--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
2017-10-10 17:55:27 +11:00
JW Wang 855a4bc6c4 Bug 1421875. P3 - remove MediaDecoder::DownloadProgressed() which is basically a one-line call to GetOwner()->DownloadProgressed(). r=bechen,gerald
Also devirtualize ChannelMediaDecoder::DownloadProgressed() and move it to private.

MozReview-Commit-ID: ITv3ISRbN5t

--HG--
extra : rebase_source : aa75bc11fc1a4af8df15db9224928b1f02267b80
2017-11-30 11:21:14 +08:00
JW Wang 7c3304f247 Bug 1421875. P2 - move MediaDecoder::NotifyDataArrived() down the class hierarchy. r=bechen,gerald
For it is never used by ChannelMediaDecoder.

MozReview-Commit-ID: Jtvlj0iwTm7

--HG--
extra : rebase_source : 8582486e0403cf78366adfdc0c11fab42fedb1c9
2017-11-30 11:07:13 +08:00
Fernando Jimenez 29f504c683 Bug 1421343 - MediaSourceDecoder uses SourceBuffer without including its header. r=cpearce
MozReview-Commit-ID: 3hnmMwzp1xH

--HG--
extra : rebase_source : 98dbebb34f84bb6922efc729411dc52e8584abb1
2017-11-29 09:00:53 +01:00
Jean-Yves Avenard d34a7ebdc5 Bug 1407243 - Don't immediately fire canplaythrough for infinite/live streams. r=jwwang
MozReview-Commit-ID: 2LQFa8PHvO5

--HG--
extra : rebase_source : 3534a963202658870221fca9cc238185d7e55156
2017-10-10 16:14:24 +02:00
Jean-Yves Avenard 3358fb824a Bug 1396629 - P5. Show container type in debug info. r=cpearce
MozReview-Commit-ID: 3olXuGeqqoS

--HG--
extra : rebase_source : bc61d8f67eb4e726ba1d200d731a7740f80f8f82
2017-09-04 22:47:36 +02: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
Kaku Kuo e738871d59 Bug 1393399 P3 - keep the MediaDecoderOwner's identification in MFR; r=gerald
When GPU process crashes, the MediaDecoder, MDSM, and MFR are all destroyed.
So, we use MediaDecoderOwner to identify which video we're dealing with.

MozReview-Commit-ID: 1cv08M7Cpcf

--HG--
extra : rebase_source : 62f7be874d97a58eb4c1d7a98b4e9fe83a9313d3
2017-08-31 17:31:51 +08:00
JW Wang e24fdf16a7 Bug 1395014 - remove MediaSourceResource. r=jya
MozReview-Commit-ID: D3W2u4MBize

--HG--
extra : rebase_source : 7c610abc5c42c80ea8abc081f200c35647b81730
extra : source : c525cc941fb2504eee00b8237defe5fef2eea934
2017-08-29 14:03:19 +08:00
JW Wang c8952581e9 Bug 1394653 - remove MediaResource from the base class of MediaSourceResource. r=jya
MozReview-Commit-ID: 9Pmp7K6zp13

--HG--
extra : rebase_source : b6ce308423c530f6c0b5c71127fc9343561f0fdb
extra : intermediate-source : b443c01608e693905afb69db2ae24bde162a65b9
extra : source : 3fc73f9bd173467c50159bc12ea2274013338b71
2017-08-25 14:08:07 +08:00
JW Wang 2cbbe83757 Bug 1393386. P2 - remove MediaDecoder::GetResource(). r=gerald
MozReview-Commit-ID: 7OfkJthwfoM

--HG--
extra : rebase_source : 88b63f6ebbab3a4df15febede377e427e32e065e
extra : intermediate-source : 39514e130ddbda604a9fdc69fd99d0248ed40420
extra : source : 91eded128b33b655d023f8aa73f9eaf2a38aac4a
2017-08-24 18:10:31 +08:00
JW Wang 470f887d6d Bug 1393369. P4 - remove MediaSourceResource::GetCurrentPrincipal(). r=gerald
MozReview-Commit-ID: J96wBGLBQ45

--HG--
extra : rebase_source : 269edf22f54b0a81331c7b3c8b264a350cac1a91
extra : source : daddcd406a1f61cae957ba941247d602a1f7d3bf
2017-08-24 17:13:03 +08:00
JW Wang 59d7107e86 Bug 1393369. P1 - virtualize MediaDecoder::GetCurrentPrincipal() so the sub-classes know how to calculate the current principal. r=gerald
MozReview-Commit-ID: EOUtPE4hfgO

--HG--
extra : rebase_source : d15166e373fdd3a8490e2c794215aeb2551a7397
extra : source : 5f627ea709d24c8b7c5ddd0115524ef734378e66
2017-08-24 16:58:06 +08:00
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