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

49 Коммитов

Автор SHA1 Сообщение Дата
JW Wang d1dc9d3976 Bug 1422677. P3 - pass a MediaStatistics to ShouldThrottleDownload(). r=bechen,gerald
So it won't have to call GetStatistics() again.

MozReview-Commit-ID: 1tRnRHAiX4L

--HG--
extra : rebase_source : 4e2d3c4eb6f149fded9c9ba05872a72c55fad05b
2017-12-01 14:36:35 +08:00
JW Wang da8d5c072e Bug 1422657. P2 - remove unused mDecoderPosition and related code. r=bechen,gerald
MozReview-Commit-ID: 8RobmJKC40i

--HG--
extra : rebase_source : 50037c4dbe422f911819f845548b0ba69ac5d35f
2017-12-01 14:02:44 +08:00
JW Wang d6c2016780 Bug 1421179. P2 - mPlaybackStatistics should accumulate bytes as playback position progresses. r=bechen,gerald
The original code accumulates bytes as the underlying decoder moves on which is wrong.

MozReview-Commit-ID: 72hTwOHwKRh

--HG--
extra : rebase_source : 68b62543314c7ecc823473a8dbf14e17d2a6eb7b
2017-12-01 11:26:03 +08:00
JW Wang 73e80931ea Bug 1421179. P1 - associate data with playback events published by MDSM. r=bechen,gerald
This is required for we want to associate playback offset with the
PlaybackStarted/PlaybackStopped events.

MozReview-Commit-ID: JkRhC2QE7kr

--HG--
extra : rebase_source : c5f637f2e5849565acb5b91364537f1724ce7d5f
2017-12-01 10:33:44 +08: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 1f62c1d92b Bug 1417869. P3 - pass descriptive messages to NetworkError(). r=jya
MozReview-Commit-ID: 6yaFJvXG3g8

--HG--
extra : rebase_source : 2d1c851098be7eb880a01432c504c6db96d86756
extra : source : a30f9699f49687b23d4ccf955d7a0af8ce0c7653
2017-11-17 11:07:30 +08:00
JW Wang da256ca76e Bug 1411476. P5 - dump debug info for ChannelMediaResource. r=gerald
MozReview-Commit-ID: GjdtrlNb948

--HG--
extra : rebase_source : 248f4926435118ddc8baa0f901c5e4ec3f699c64
2017-10-25 13:57:39 +08:00
Chris Pearce 2ba329dae6 Bug 1409178 - Move DecoderTraits::CreateDecoder() to ChannelMediaDecoder::Create(). r=jwwang
Now DecoderTraits doesn't need to depend on ChannelMediaDecoder.

MozReview-Commit-ID: D4AUiV2eGWy

--HG--
extra : rebase_source : 38e6c4cdd0f7e32473c6945550bca6fd0cc72bf2
2017-10-16 22:55:26 +02:00
Chris Pearce 9f0aad7b2e Bug 1405697 - Move MediaChannelStatistics to its own file. r=jwwang
It currently resides in MediaResource.h, but it's only used in a
ChannelMediaDecoder and ChannelMediaResource, so it doesn't need to be in the
abstract header.


MozReview-Commit-ID: GskE5mjMav1

--HG--
extra : rebase_source : b42321ddcb1966d4de7203f04852c14f6d271acd
2017-10-04 16:30:32 +02:00
JW Wang 6dcbfcbee7 Bug 1398659. P4 - remove unused code and add some assertions. r=gerald
MozReview-Commit-ID: LRgF9qjdMXz

--HG--
extra : rebase_source : af8b8bb4272c9be0f0ab8b51356362e9676c7076
extra : intermediate-source : 640d38acf9d3cf4aa583c67fc20ea487c849a570
extra : source : 0faec6a6b214ce4d5ca59ac2b098d4a5bfe4470b
2017-09-05 17:39:57 +08:00
JW Wang 7183d8c7c6 Bug 1395802. P1 - add AbstractMainThread() to MediaResourceCallback. r=cpearce
This is required by P3 to preserve the ordering. E.g. we want
mChannelStatistics.AddBytes() to happen before the new data is consumed
by the decoder and is made observable to the main thread. Using
SystemGroup::Dispatch() won't guarantee the ordering.

MozReview-Commit-ID: 7MP0CzTGpOs

--HG--
extra : rebase_source : 1161b7c713f57625f38b70714bb8684c2edecb2a
extra : source : 22b362b56f218acb70cc7ce3c0fd0ea113563681
2017-09-06 15:12:34 +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 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 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 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 c960cfcc65 Bug 1392919. P1 - include the suspend status when notifying NotifySuspendedStatusChanged. r=gerald
MozReview-Commit-ID: GwzIBNLjcZr

--HG--
extra : rebase_source : 7673ba535636b3442f3987d3fe30f7e00822c621
2017-08-23 14:32:51 +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
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 7bf74ce2b5 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 5a9932bf98992e13ba850dd640d2623ad8bcccbb
2017-08-15 16:37:00 +12:00
Carsten "Tomcat" Book fd8d71864f Backed out changeset b86afd45a710 (bug 1390748)
--HG--
extra : rebase_source : 3567c5675e1506f5c46ffbe626f5f128118cf4c7
2017-08-17 08:35:38 +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
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 622ee050c8 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 5a9932bf98992e13ba850dd640d2623ad8bcccbb
2017-08-15 16:37:00 +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 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 582456c0a6 Bug 1390748 - Make MediaDecoder::CreateStateMachine() non-virtual. r=jwwang
MediaDecoder::CreateStateMachine is only virtual so that Ogg can attach
the reader's metadata/seekable produces to its chaining event.

The MediaSourceDecoder also overrides CreateStateMachine(), but it's not
called by anything external, so its implementation doesn't actually need
to be virtual.

MozReview-Commit-ID: 2x6bpK6Fdzd

--HG--
extra : rebase_source : 01b4a59cba8ec64480779fb6849322841646ca3b
2017-08-15 16:37:00 +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 6ab3fdad07 Bug 1388228. P5 - move some more members to ChannelMediaDecoder. r=gerald
Those members only make sense for ChannelMediaResource.

MozReview-Commit-ID: 2z6WPQeJnIT

--HG--
extra : rebase_source : 7f43635ee91c8fad1d6ad6f56788e880d54beab2
2017-08-07 13:23:43 +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 4eb2d7a53b Bug 1388228. P1 - move some members to ChannelMediaDecoder. r=gerald
These members are used only by ChannelMediaDecoder.

MozReview-Commit-ID: 10CHV1sjY9k

--HG--
extra : rebase_source : 2a9817a433cd098d818399e718a5c08d6b88df4c
extra : source : 5d606d67b79543adde8580d96f5aa7055fe0286c
2017-08-04 16:02:40 +08:00
JW Wang b2d75fa057 Bug 1383628. P5 - move CanClone() from MediaResource to BaseMediaResource. r=gerald
1. we move clone related methods to BaseMediaResource which is the only cloneable sub-class of MediaResource.
2. add CanClone() to ChannelMediaDecoder to reduce the dependency on MediaResource for HTMLMediaElement.
   MediaResource should be internal details to MediaDecoder.

MozReview-Commit-ID: Hl2nAiuyTO0

--HG--
extra : rebase_source : 43dd9ee33ef2ef2e9093eb6b264dc174379d61d2
extra : source : 978ded48a90f2c407c4545486243acabf492736a
2017-08-04 15:29:55 +08:00
JW Wang 163c6a8c8b Bug 1383628. P4 - move CloneData() and Create() from MediaResource to BaseMediaResource. r=gerald
Now we can store a more specific resource type in ChannelMediaDecoder.

MozReview-Commit-ID: EzXC547O7aR

--HG--
extra : rebase_source : eea1872eeeee9b5964fcc767c79b0315bf277602
extra : source : 84011bf4847bbed26e89af0b831aded93522f7ac
2017-08-04 14:52:22 +08:00
JW Wang da1e4aeb7b Bug 1383628. P3 - devirtualize Load() which has no overrides. r=gerald
MozReview-Commit-ID: EZ9jcHiWGZb

--HG--
extra : rebase_source : 6e1547598a5ac1a797ce09d79dc7f2935678570c
extra : source : c7362776a480758a9c12ed69cc155b19872bd238
2017-08-03 17:48:26 +08:00
JW Wang a8a917b8bb Bug 1383628. P2 - move the call to Load() into Clone(). r=gerald
MozReview-Commit-ID: 9k8BXLwAepI

--HG--
extra : rebase_source : 52d3fb871bad53691585e774c2745f328592eb3f
extra : source : cdc492f87aa634eaaae0809aacb261ad25be7b08
2017-08-03 17:47:23 +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
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 1ab15ede36 Bug 1385699. P3 - remove MediaDecoder::SetInfinite() and related code. r=cpearce
Since inf can be encoded in MDSM::mDuration, we don't need an additional flag
in MediaDecoder to indicate 'infinite' anymore. Note duration change from infinite
to finite is handled by MDSM, so we can remove the explicit calls to SetInfinite(false).

MozReview-Commit-ID: EoxwZJzPAJl

--HG--
extra : rebase_source : 669d7ed5b99a89b1827f60f89e0a21f08a18dedd
extra : source : a30b614784afe8772b2212728c1e4a2eac67f94b
2017-08-01 14:15:29 +08:00
JW Wang 7f6f26e511 Bug 1386951 - have ChannelMediaDecoder implement CreateStateMachine() and fix includes. r=jya
The implementation will be shared by most of the sub-classes except OggDecoder
which needs to call demuxer->SetChainingEvents().

http://searchfox.org/mozilla-central/rev/f0e4ae5f8c40ba742214e89aba3f554da0b89a33/dom/media/ogg/OggDecoder.cpp#25

This helps reducing code changes whenever we add a field to MediaFormatReaderInit.

MozReview-Commit-ID: 5K8NY1oxol4

--HG--
extra : rebase_source : 7bc2a71ad9bd982ada51fd28d6a5b7c6f1d7395a
extra : source : cccd49795938ce53cd8eee597ec0ea4859543c37
2017-08-03 14:05:28 +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 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 1dbf0f77fa Bug 1376227. P2 - remove unused code following P1. r=gerald
MozReview-Commit-ID: JbwY1Owtk7H

--HG--
extra : rebase_source : 0f82ac16f56ce6ba27944b093b49c8ff6479e66c
extra : intermediate-source : 38c1c8a70fb0209f8c6a3ca596664db9af089763
extra : source : 7cfe394c4790ca7687db9004c96380f088c2bb59
2017-06-21 17:34:22 +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 6cd0d57b3c Bug 1374930. P4 - move ResourceCallback to ChannelMediaDecoder. r=cpearce
We also move some methods to protected so they are callable from ChannelMediaDecoder.

MozReview-Commit-ID: 6s9LKNkbJhX

--HG--
extra : rebase_source : 172ea88bc01552a90f5ef51db2b5af0ac5551c3b
extra : intermediate-source : a724333159c6b408e2fa68dba2d0a467f3c55940
extra : source : 03760e05ea8044b3404d29bb62205a2f62892d4b
2017-06-20 18:10: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 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