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

56 Коммитов

Автор SHA1 Сообщение Дата
Chris Pearce fe9919cbfa Bug 1405697 - Move MediaPrefs include from MediaResource.h into cpp file. r=jwwang
This moves the include into the file where it's used, and means I don't need
to import it into gecko-media crate yet.


MozReview-Commit-ID: JnEgtwnLxgO

--HG--
extra : rebase_source : 84f9b98e3c64dc1a337a12b714fd4c8bc45429a1
extra : source : 396e995935c6ada2a069c56cd1ede3c9ef418f31
2017-10-05 09:27:15 +02: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
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
James Cheng 6dd36073da Bug 1395015 - Remove HLSResource. r=jwwang
Move the dependent method into HLSDecoder.
Remove the class entirely.

MozReview-Commit-ID: F9eOFQvgeLQ

--HG--
extra : rebase_source : a45407d88513883245f429c5f4bd09c78bef6f10
2017-08-30 14:14:32 +08:00
JW Wang c26c18e8c8 Bug 1394651 - remove MediaResource from the base class of HLSResource. r=gerald
MozReview-Commit-ID: 3RaLXA1kKzA

--HG--
extra : rebase_source : 9cc0d22671ff866ece5d3773e1efcda15c966fa4
extra : intermediate-source : 51fb3c2b3834f04b3fa944f02b230b4365557060
extra : source : 08a811cbddc2477f79985b5a9b5c20743a718b12
2017-08-25 14:03:45 +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 4af519df25 Bug 1393386. P1 - make PinForSeek/UnpinForSeek pure virtual. r=gerald
Sub-classes should know how to pin/unpin the resource.

MozReview-Commit-ID: 50S8oSD5oEU

--HG--
extra : rebase_source : 5e1b7c657b759c0d1dfdd7b5c0a4b7dbc4077ffe
extra : intermediate-source : 3000b76a3b97c08955c2d584ac215114c8e8f59a
extra : source : a56b9846db916ff85a0cae09736c3284bd895506
2017-08-24 18:08:37 +08:00
JW Wang b634b53e60 Bug 1393379. P2 - remove MediaResource::SizeOfIncludingThis/SizeOfExcludingThis. r=gerald
MozReview-Commit-ID: MMhVOaSUuX

--HG--
extra : rebase_source : a158bbd9c718212247896e299f6063773ca81d1a
extra : source : ff3aef3a67c67e281aac244206aeb15eccbace29
2017-08-24 17:52:21 +08:00
JW Wang 2c37ac8f7c Bug 1393379. P1 - make MediaDecoder::AddSizeOfResources pure virtual. r=gerald
We will move the implementation to sub-classes which have more details
about how to calculate the resource size.

MozReview-Commit-ID: 7lfiz5GNtPE

--HG--
extra : rebase_source : bf14ef91a6de456d65bee7cb1f53f8e542f55247
extra : source : 22640df9dd3a1491594a82b3d0bd175e46073fa3
2017-08-24 17:35:24 +08:00
JW Wang db3e1718f7 Bug 1393369. P2 - remove MediaResource::GetCurrentPrincipal(). r=gerald
MozReview-Commit-ID: 9as5ya2xXdL

--HG--
extra : rebase_source : 7141cec4f3e9c38253b85e71d3b5efe5a5d7dddd
extra : source : 9d9f1de4db95a353040f7c7c484e7d9d79f275fa
2017-08-24 17:01:08 +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
JW Wang 9ba52292a9 Bug 1393346. P2 - move IsTransportSeekable() from MediaResource to BaseMediaResource. r=gerald
MozReview-Commit-ID: KqpzIRH31gz

--HG--
extra : rebase_source : e9303347b34d3cbfbd8d6a6f2a474dd8f0fb1447
2017-08-24 00:08:41 +08:00
JW Wang 3202c8815c Bug 1393346. P1 - virtualize IsTransportSeekable(). r=gerald
MozReview-Commit-ID: LIwEEbH3tBT

--HG--
extra : rebase_source : e02954fb3b6ddf40259bc6c69221192e01fc1410
2017-08-24 00:06:23 +08:00
JW Wang e8dd02d4f8 Bug 1393345 - remove MediaResource::IsSuspended() which has no callers. r=gerald
MozReview-Commit-ID: Jn6TIXpFflR

--HG--
extra : rebase_source : 0efc64660523f1e846feb247075ab69e54f5f24a
2017-08-23 15:52:33 +08:00
JW Wang da66e5c214 Bug 1392919. P2 - remove MediaResource::IsSuspendedByCache(). r=gerald
MozReview-Commit-ID: E1lkfLARMhS

--HG--
extra : rebase_source : 354adbb22db9bdacec74a824bf04bfce0775faad
2017-08-23 14:38:00 +08:00
JW Wang 2834911596 Bug 1391170 - lessen the assertion in AddMediaElementToURITable() so we can move MediaDecoder::GetResource() to private. r=gerald
If AddMediaElementToURITable() is called after the decoder Load failed, mDecoder
will be reset and it is sufficient to assert mDecoder only.

MozReview-Commit-ID: 58WT8zFeiFj

--HG--
extra : rebase_source : 712579b544e9a9ce971778b85795d06e58bd4ea5
extra : intermediate-source : 470e2d8a20010e11d7a7dce5540957e89439811e
extra : source : 59f4b2b33212794aa1cf3e8782737a2d4af8c241
2017-08-17 15:41:22 +08:00
JW Wang 41cd273f4e Bug 1391142. P3 - remove IsLiveStream() from MediaResource. r=gerald
MozReview-Commit-ID: DBFrYfj2lGB

--HG--
extra : rebase_source : 18532f55f38c5ac54660c11f078741e09273a30a
extra : source : 0e45bca0cdc0b2428216e6c9a55f8651e5b21017
2017-08-17 15:20:40 +08:00
JW Wang 9bfb2b1c06 Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB

--HG--
extra : rebase_source : 8c1fc9b4da08290f7a177ef60793c831b0cc7a25
extra : intermediate-source : a86b94e4bdc04bae34f6e8966dfe9b5e11f98677
extra : source : 498e2844d2d0d1cee087552f5aaf5aac7e34c3bf
2017-08-16 15:37:29 +08:00
Sebastian Hengst 9d63faba53 Backed out changeset 05b2bf2e6017 (bug 1390443) 2017-08-21 10:19:39 +02:00
JW Wang a7f1c5d69b Bug 1390443. P2 - remove unused IsExpectingMoreData(). r=cpearce
MozReview-Commit-ID: KTxmjIrD1WB

--HG--
extra : rebase_source : 3cad2f2df2f75d6b052cbc6e6f5623ba9c587987
extra : intermediate-source : a86b94e4bdc04bae34f6e8966dfe9b5e11f98677
extra : source : 498e2844d2d0d1cee087552f5aaf5aac7e34c3bf
2017-08-16 15:37:29 +08: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
JW Wang 32951f4824 Bug 1388604 - move SetReadMode() from MediaResource to BaseMediaResource. r=gerald
It would be less accurate to call SetReadMode(MediaCacheStream::MODE_PLAYBACK)
in ChannelMediaDecoder::MetadataLoaded() instead of DecodeMetadataState::OnMetadataRead()
because MDSM might have started decoding by the time 'metadata loaded' event arrives
in the main thread. However this little inaccuracy should be fine since it only
affects a small amount of data concerning the eviction algorithm.

MozReview-Commit-ID: JoQMGr5Fvge

--HG--
extra : rebase_source : 3663a028522cc8b973964f62e59d7568a5eba10a
extra : source : 359b4454633432d3334a106aedb267a2451afb45
2017-08-09 11:06:29 +08:00
JW Wang cf112f4b88 Bug 1388228. P6 - following P5, we are now able to move some methods that are related to nsIChannel to BaseMediaResource. r=gerald
So we reduce the number of unimplemented methods in the sub-classes of MediaResource.

MozReview-Commit-ID: EAmUEv9WQk8

--HG--
extra : rebase_source : deed5fd089e8c42a5a6ab0546e0781d0061591e5
2017-08-07 18:09:56 +08:00
JW Wang e5f016de87 Bug 1388228. P4 - move the implementation of MediaDecoder::CanPlayThroughImpl() down to ChannelMediaDecoder. r=gerald
Because GetStatistics() only makes sense for ChannelMediaResource.

MozReview-Commit-ID: HkEpb4frUx1

--HG--
extra : rebase_source : 7086721f47b381b692a165302ff3bdc13caa8b41
2017-08-07 11:48:43 +08: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 be3df48dc5 Bug 1384831. P5 - remove unused arguments from HLSDecoder::Load(). r=gerald
MozReview-Commit-ID: JsULuDcMiNa

--HG--
extra : rebase_source : c9c78f57a4fb2278143c8c69343d5e8a97765bbb
extra : source : e019f6fc241c8f35d58a8aa27854159b09dd21f9
2017-07-27 02:54:53 +08:00
JW Wang ddec7cb574 Bug 1384831. P4 - let HLSDecoder inherit MediaDecoder. r=kikuo
MozReview-Commit-ID: B9XvfbjjMxX

--HG--
extra : rebase_source : eb3212aca6f4c93bffc56bb5e8d75177cb64a28e
extra : source : 7753fca48c5f229ae14aa2e9c08e4d3d86bea39e
2017-07-27 02:52:07 +08:00
JW Wang e72f601403 Bug 1384831. P3 - let HLSResource notify HLSDecoder directly without going through MediaResourceCallback. r=kikuo
We can't use MediaResourceCallback since HLSDecoder will not inherit ChannelMediaDecoder.

MozReview-Commit-ID: BzKatvYU90Y

--HG--
extra : rebase_source : a3fea763ef5f484fd1e455add4e6e6c91277aff1
extra : source : a9332539c0bc1ef81286b0e119250c3fce84101b
2017-07-26 23:26:17 +08:00
James Cheng 7236b09a4d Bug 1384578 - Adjust the calling sequence to avoid app crash by race condition. r=jolin
MozReview-Commit-ID: JKtfNYTTCjp

--HG--
extra : rebase_source : 526f6dd42de7170fd7baf49817e6c721245314fb
2017-07-31 11:23:29 +08:00
James Cheng 4843d195fb Bug 1382151 - Pause Exoplayer when mediaelement is paused. r=kikuo
MozReview-Commit-ID: 5MDBBP5vfpa

--HG--
extra : rebase_source : 9981585791cd359296ac7fef0fe0d7e900af6c61
2017-07-20 17:47:54 +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 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
James Cheng 950fc2b63c Bug 1379866 - Implement MediaResource Suspend and Resume in HLSResource. r=jolin
1. Pause the Exoplayer when navigating to another page and resume playback when navigating back.

2. Fix the OOM issue.

MozReview-Commit-ID: 5UGmBzpObsb

--HG--
extra : rebase_source : f8f268612687669e1b31881465600b02b3531c55
2017-07-14 01:29:00 +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
James Cheng 2bbf8b0437 Bug 1380237 - Tweak HLSDemuxer to handle audio format change. r=jya
1. Moving UpdateA/VInfo to HLSTrackDemuxer and related changes.
2. Handle audio format change by changing the stream id.
MozReview-Commit-ID: IJmSvygZLVf

--HG--
extra : rebase_source : fb90c1454f20ff930626b6febf74b7cb0c4d20b9
2017-07-12 15:12:06 +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 b02249e698 Bug 1377370. P2 - simplify HLSDecoder::Clone() for HLSResource doesn't support clone at all. r=kikuo
MozReview-Commit-ID: FxebHdK4EmM

--HG--
extra : rebase_source : d1074b8e5edf646244922a734839c19f8a4fb1b4
extra : source : 418066ce151ef0e5dc4b817f8663c281fc5fcc0d
2017-06-30 10:20:32 +08:00
JW Wang 7d2785b4a8 Bug 1377370. P1 - let HLSDecoder override Load() so it can create an HLSResource directly without going through MediaResource::Create(). r=kikuo
MozReview-Commit-ID: BL8bt2JtKfa

--HG--
extra : rebase_source : 70231ab332fee2316e86aa73e834f108183b23d8
extra : source : e97125ebc28890e0d538c4ef4d8abc9232e69bac
2017-06-30 10:11:42 +08:00
JW Wang c6e43291cb Bug 1376363. P3 - remove MediaResource::GetContentType() and its friends. r=gerald
Note we remove the call to mChannel->SetContentType() from RecreateChannel().

The hint never works as expected for [1] is the only caller to
nsIChannel::GetContentType() and MediaResource::Create() always happens
before any reads from the resource.

[1] http://searchfox.org/mozilla-central/rev/b425854d9bbd49d5caf9baef3686e49ec91c17ec/dom/media/MediaResource.cpp#1500

MozReview-Commit-ID: 1n4yHEouCjC

--HG--
extra : rebase_source : 9a7345c29b985ddee7a90a94191e9d526e2a0a67
extra : source : 054d9ffaf21eb937a6349df76228269ad2d7dc2c
2017-06-26 21:39:16 +08:00
Kilik Kuo 200981e17f Bug 1368904 - Handle unexpected error callback from GeckoHlsPlayer. r=JamesCheng
MozReview-Commit-ID: CQDjFXiFDrQ

--HG--
extra : rebase_source : 48624955e10c3df3b860bcf77ada11da43f9d068
2017-06-28 15:09:00 -07:00
JW Wang a05b9a90ee Bug 1376360. P1 - give CloneData() a default implementation for most resource types don't support clone. r=gerald
Also remove CanClone() overrides that are identical to that of the base class.

MozReview-Commit-ID: A0Q5ychQtso

--HG--
extra : rebase_source : 3369558a8e6bc9f86ab6dcdc39fe40f686041001
2017-06-23 16:26:30 +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
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
Kilik Kuo 4483d2da19 Bug 1368954 - [Part2] Modify HLSDemuxer native code to accommondate wrapper interface change. r=JamesCheng
MozReview-Commit-ID: IGhJPLp1A6R

--HG--
extra : rebase_source : 5a249ddebf051d041bb64dde875ed0ec3ff91ae0
2017-06-14 17:47:11 +08:00
James Cheng e57e5e5589 Bug 1372841 - Make HLSResource inherit from MediaResource instead of BaseMediaResource. r=jwwang
MozReview-Commit-ID: 3B6aaGiV77o

--HG--
extra : rebase_source : 03c91570c464f1bb40c3eb6b6f548fa92d39d0c2
2017-06-14 17:13:42 +08:00
James Cheng 60874a3b96 Bug 1368907 - Part6 - Modify the corresponding native code callers. r=jolin
MozReview-Commit-ID: KUa1EjdwE4B

--HG--
extra : rebase_source : 8f8baee5af6f2e231a5b3e6b86722463a140615c
2017-06-12 16:54:19 +08:00