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

85 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Paul Adenot b7f37d63fd Bug 1457137 - Move instead of copying strings returned from various GetDebugInfo functions for HTMLMediaElement::MozDumpDebugInfo. r=gerald
MozReview-Commit-ID: LbZ0cWe7yb0

--HG--
extra : rebase_source : 31946e6dcfd2f750e16437f5876f29c851698b9f
extra : source : 4fd9b0ce611c4ad4ecbec1aace1777944214212a
2018-04-26 15:57:39 +02:00
Nicholas Nethercote 51f2b494ea Bug 1448222 - Remove MediaPrefs. r=jya
This patch converts all the prefs in MediaPrefs to the new StaticPrefs system.

Note that the "media.wmf.skip-blacklist" pref was present in both MediaPrefs
and gfxPrefs. The copy in MediaPrefs was never used; this explains why this
patch does not add an entry for it to StaticPrefList.h.

Note also that the patch removes themedia.rust.mp4parser pref, because it's
unused.

MozReview-Commit-ID: IfHP37NbIjY

--HG--
extra : rebase_source : df84ea813b7c366d7be663c696891325610149c8
2018-03-20 09:48:56 +11:00
Chris Pearce 259a33e836 Bug 1443942 - Block mid-flight redirects to cross origin destinations during media loads. r=jya
There's no compelling use case for mid-flight redirects, and Chrome
already blocks it, so there's little point in maintaining it.

Add a hidden pref to toggle blocking, so we can toggle it off during
testing to ensure that we're blocking a working mid-flight redirect.

MozReview-Commit-ID: EnGNmYFr8Uv

--HG--
extra : rebase_source : a2f4b7c68b73ecc4c7525d4e41e834f4caf85707
2018-03-06 09:55:03 +13:00
Margareta Eliza Balazs ca8cc145d5 Backed out 2 changesets (bug 1443942) for mda assertion failures in /build/build/src/dom/media/ChannelMediaResource.cpp
Backed out changeset e2f69088b1d7 (bug 1443942)
Backed out changeset 446bfe8412cb (bug 1443942)
2018-03-13 07:14:32 +02:00
Chris Pearce 0ebc1bfba0 Bug 1443942 - Block mid-flight redirects to cross origin destinations during media loads. r=jya
There's no compelling use case for mid-flight redirects, and Chrome
already blocks it, so there's little point in maintaining it.

Add a hidden pref to toggle blocking, so we can toggle it off during
testing to ensure that we're blocking a working mid-flight redirect.

MozReview-Commit-ID: EnGNmYFr8Uv

--HG--
extra : rebase_source : 3ed71273da24f8f0c8bc24ceede49afa7775650d
2018-03-06 09:55:03 +13:00
Noemi Erli 0341e8a283 Backed out 2 changesets (bug 1443942) for bustage on /testing/xpcshell/selftest.py on a CLOSED TREE
Backed out changeset fa5bcc246d0f (bug 1443942)
Backed out changeset 2257546ec484 (bug 1443942)
2018-03-13 00:43:31 +02:00
Chris Pearce 31d1174127 Bug 1443942 - Block mid-flight redirects to cross origin destinations during media loads. r=jya
There's no compelling use case for mid-flight redirects, and Chrome
already blocks it, so there's little point in maintaining it.

Add a hidden pref to toggle blocking, so we can toggle it off during
testing to ensure that we're blocking a working mid-flight redirect.

MozReview-Commit-ID: EnGNmYFr8Uv

--HG--
extra : rebase_source : cdc122a11a648f2451d2983df42597d8274ac9fb
2018-03-06 09:55:03 +13:00
Chris Pearce b6282041c2 Bug 1441153 - Block cross origin redirects after media channel setup for wav. r=jya
--HG--
extra : rebase_source : 1e48388a86c332f9f8001f53fb950c412a9c2466
extra : source : 8ac015e407553baf5f4e60fe1e021d8d3f884e1a
2018-03-01 14:08:30 +13:00
Dorel Luca b9c4533603 Backed out changeset 8ac015e40755 (bug 1441153) for web platform tests failre on media files 2018-03-02 04:06:22 +02:00
Chris Pearce c09105ed50 Bug 1441153 - Block cross origin redirects after media channel setup for wav. r=jya
--HG--
extra : rebase_source : 6ffbdf2d68f5a9de59d24de90fff4e6a8cf594ef
2018-03-01 14:08:30 +13:00
JW Wang 9aabe6d2e7 Bug 1429009. P2 - remove unnecessary AbstractThread::AutoEnter. r=bechen,gerald
It is not needed since we are already in the right context.

MozReview-Commit-ID: 6QXxLMQHavv

--HG--
extra : rebase_source : d7a80d3e3d6583bd1732a4048f40576603e83872
extra : source : d700cc52ce2a50a784601f7cff7f63eaff3efced
2018-01-09 17:49:53 +08:00
JW Wang 4d6d7238d7 Bug 1429009. P1 - notify 'DownloadProgressed' immediately to preserve the event order. r=bechen,gerald
We also need to call GetOwner()->UpdateReadyState() since mCanPlayThrough might
have changed.

MozReview-Commit-ID: C5djzu1sXqV

--HG--
extra : rebase_source : 1037cb7e1bf3a32fa60451e9a2a64ce63d06b8c2
extra : intermediate-source : 373c47f094dfb85ca2576d18a302d9ceb4e82ed5
extra : source : b710ff5026c18ac851be56ac9a369fe69b1d5b5d
2018-01-08 14:51:57 +08:00
JW Wang d201fcefe3 Bug 1427931. P1 - remove MediaDecoder::PinForSeek/UnpinForSeek. r=bechen,gerald
PinForSeek() is called only when playback reaches the end. In other words,
it is not called for most cases of seeking. It should be OK not to call it at
all during seeking.

MozReview-Commit-ID: 1xXX1321bO7

--HG--
extra : rebase_source : df8ba3f59da2a337b456546af4b54abaddfe38a9
extra : intermediate-source : 0a70419f9ce639ac0784a0632db4598d6be511f8
extra : source : bfddad9b922386c91fcfa7657a7ac274991d15f4
2017-12-19 17:56:52 +08:00
Ryan VanderMeulen c20bfd39b5 Bug 1425996 - Add in a few more instances of Unused that got missed in the first patch. r=gerald 2017-12-23 16:40:13 -05:00
JW Wang 4b584fc48b Bug 1424973. P2 - remove unused MediaDecoder::IsLiveStream() and friends. r=bechen,gerald
MozReview-Commit-ID: Hf3QAFoq97x

--HG--
extra : rebase_source : 0cbfaaec37dea3ab0ab4ad0622bae8056e383ec0
extra : intermediate-source : b591e2e854d0c480f889aa6ebe87f4892ffc0cdc
extra : source : 13db1fcd03825077382e41235c02d1f8ecc5edf2
2017-12-06 16:24:31 +08:00
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
JW Wang 29f9e59896 Bug 1423465. P7 - GetOwner()->DownloadProgressed() should be called after updating mCanPlayThrough. r=bechen,gerald
GetOwner()->DownloadProgressed() will update readyState of the media element
which will need to read mCanPlayThrough.

MozReview-Commit-ID: EDHlLJjKDoL

--HG--
extra : rebase_source : df4ffabc02f9e6b4b20e5fa6c9be6988570a9974
extra : intermediate-source : 371a6509c04bf89edb07b3437a41a9b36dba25ff
extra : source : 227ffb87de637994baefab6b178afeae4673a2ef
2017-12-05 16:01:18 +08:00
JW Wang 477cabbc8f Bug 1423465. P5 - run ComputePlaybackRate() off the main thread. r=bechen,gerald
MozReview-Commit-ID: DhaZUVcHhiy

--HG--
extra : rebase_source : ff8e0ce52daee77aebee94bca8ec4f95b5ea51df
extra : intermediate-source : 25eb2b6120e83602b06bc8ef76c2c7e45a412966
extra : source : c3c25dee22ef2019a96e0c66cf5a1c2d6d1f4f17
2017-12-05 15:21:45 +08:00
JW Wang 2d2b8a57e9 Bug 1423465. P4 - run GetStatistics() off the main thread. r=bechen,gerald
Note we cache the result of GetStatistics().CanPlayThrough() which is needed
by CanPlayThroughImpl().

MozReview-Commit-ID: QYNqk1pUN5

--HG--
extra : rebase_source : e4ce549f1069fd3106da4f68dcb429afa291aa5d
extra : intermediate-source : 9d7c532bdad7733bc3f9e725feecd83bea1ab156
extra : source : b552dad39a644026eb0d62e7e975c4120e550447
2017-12-05 15:06:34 +08:00
JW Wang 8bf10990f3 Bug 1423465. P2 - run UpdatePlaybackRate() off the main thread. r=bechen,gerald
MozReview-Commit-ID: Ktw4IxzHT2f

--HG--
extra : rebase_source : 9edd14062ad1692bf4a85655ac126e1d199e9e8c
extra : intermediate-source : 78e2a1d577508ff3619debdbdd35c64fcd1b0b1e
extra : source : 970eb209afa288929bed8f8b16c40c48c0dc5fda
2017-12-05 14:13:22 +08:00
JW Wang 32ec06ebb2 Bug 1422657. P2 - remove unused mDecoderPosition and related code. r=bechen,gerald
MozReview-Commit-ID: 8RobmJKC40i

--HG--
extra : rebase_source : 2b9abaa1a22b78cadbbdbf99d1c778fe82f84eac
extra : source : 7267883c2b722f806fc11c35ff9c8c5743a57bf3
2017-12-01 14:02:44 +08:00
JW Wang d72cfc05d2 Bug 1422657. P1 - GetStatistics() should pass mPlaybackPosition to mResource->GetCachedDataEnd(). r=bechen,gerald
Usually mDecoderPosition and mPlaybackPosition are in the same cached range so
GetCachedDataEnd(mDecoderPosition) and GetCachedDataEnd(mPlaybackPosition) will
give the same result.

It also makes more sense to pass the playback position instead of decoder
position since 'canplaythrough' is about playback instead of decoding.

MozReview-Commit-ID: Kk1uUeSFTCI

--HG--
extra : rebase_source : 1f40adce4b93dbcf55cb3de9f5c16fdd6d0b6bee
extra : source : 9c77dddb2faca84bd8cf09fc2007e18986e62f64
2017-12-01 13:53:46 +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
Narcis Beleuzu bc723a6e7e Backed out 2 changesets (bug 1422657) for browser chrome failures on browser_cache.js r=backout on a CLOSED TREE
Backed out changeset 7267883c2b72 (bug 1422657)
Backed out changeset 9c77dddb2fac (bug 1422657)
2017-12-06 00:40:16 +02:00
JW Wang e6e0f63154 Bug 1422677. P5 - remove mPlaybackBytesPerSecond and mPlaybackRateReliable by removing the side effect of ComputePlaybackRate(). r=bechen,gerald
MozReview-Commit-ID: BbCdsLXHT9d

--HG--
extra : rebase_source : c5a538b16ef91e20a54f2f645d8d5e0c88462b97
2017-12-01 15:05:25 +08:00
JW Wang 19a55c6ba7 Bug 1422677. P4 - remove the call to ComputePlaybackRate() from OnPlaybackEvent(). r=bechen,gerald
It should be called explicitly for anyone that wants its side effect.

MozReview-Commit-ID: EHiPjklV6oZ

--HG--
extra : rebase_source : bb7b0138698448f1064e90b0318637db969b1527
2017-12-01 14:44:34 +08:00
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 2f2083875c Bug 1422677. P2 - remove the side effect of MediaDecoder::CanPlayThrough(). r=bechen,gerald
We calculate 'canplaythrough' in ChannelMediaDecoder::DownloadProgressed() and
send updates to MDSM.

MozReview-Commit-ID: KAeDciPAUKs

--HG--
extra : rebase_source : 64d7705fb5ca6b1003664ac313ad1ae0ab1bbea6
2017-12-01 14:34:58 +08:00
JW Wang d2f91da2bd Bug 1422677. P1 - move the call to ComputePlaybackRate() out of UpdatePlaybackRate(). r=bechen,gerald
We want to remove the side effect of ComputePlaybackRate(). Anyone who wants
the side effect (updating mPlaybackBytesPerSecond/mPlaybackRateReliable)
should call it explicitly.

MozReview-Commit-ID: 8oHvCl5pewz

--HG--
extra : rebase_source : 3ee54ea32d2d2d7185d9a65c6658a3e700f1fb71
2017-12-01 14:24:27 +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 972cab9021 Bug 1422657. P1 - GetStatistics() should pass mPlaybackPosition to mResource->GetCachedDataEnd(). r=bechen,gerald
Usually mDecoderPosition and mPlaybackPosition are in the same cached range so
GetCachedDataEnd(mDecoderPosition) and GetCachedDataEnd(mPlaybackPosition) will
give the same result.

It also makes more sense to pass the playback position instead of decoder
position since 'canplaythrough' is about playback instead of decoding.

MozReview-Commit-ID: Kk1uUeSFTCI

--HG--
extra : rebase_source : 354fe5b4a6fb73a477ded40bf5fb91979a2c2a8a
2017-12-01 13:53:46 +08:00
JW Wang f2f9809386 Bug 1421179. P3 - ComputePlaybackRate() should call mPlaybackStatistics.GetRate() instead of mPlaybackStatistics.GetRateAtLastStop(). r=bechen,gerald
Otherwise mPlaybackBytesPerSecond will always be zero before playback is
stopped for the 1st time. This is important for a live stream where playback
rate can't be calculated from the duration and resource length (-1).

MozReview-Commit-ID: GEojREzHVEz

--HG--
extra : rebase_source : 6f770b54597abb303631da8e41c3199d92ebda6e
2017-12-01 12:25:00 +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 9262b684e3 Bug 1421875. P1 - rename MediaDecoder::NotifyDataArrivedInternal(). r=bechen,gerald
MozReview-Commit-ID: DVzTX4GePtB

--HG--
extra : rebase_source : 82b1f291468aa7e20d661161c9e83ec41a3864ab
2017-11-30 10:51:56 +08:00
JW Wang 1ee2ce9a65 Bug 1421861 - remove unused MediaStatistics::mDecoderPosition. r=bechen
MozReview-Commit-ID: LxZtvFpg3mD

--HG--
extra : rebase_source : 5f3c9132a386b1d290b8c0b169011baec4240b34
extra : source : b30985c8d5b99f6770d156942e5f91a0a408513a
2017-11-29 10:57:40 +08:00
JW Wang 1ae4603e61 Bug 1421134. P1 - default MediaCacheStream::mCurrentMode to MODE_METADATA. r=bechen,gerald
We always read metadata when decoding starts. This allows us to remove the call
to mResource->SetReadMode(MediaCacheStream::MODE_METADATA) in ChannelMediaDecoder::Load().

MozReview-Commit-ID: AQMq4HxDZdT

--HG--
extra : rebase_source : 141c43bb93f274d8320a270b5c7289bd1eab134d
extra : source : 7de3d88ddb5c99352f4b5bd0b5e648a52a4a67a5
2017-11-28 10:43:50 +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 819392126d Bug 1417305. P3 - treat NS_BASE_STREAM_CLOSED as success. r=bechen,gerald
Since we don't want to treat NS_BASE_STREAM_CLOSED as abort or error, let's just
treat it as success to simplify the call flow.

MozReview-Commit-ID: 1Fubaq6lfAq

--HG--
extra : rebase_source : b9168704aa618eca553d96770e3256aadcc4b925
2017-11-15 11:24:22 +08:00
JW Wang 15d26ae3e8 Bug 1417305. P2 - move some code from NotifyDataEnded() into NotifyDownloadEnded() to make the code more readable. r=bechen,gerald
MozReview-Commit-ID: LveThVjuemq

--HG--
extra : rebase_source : 8a3164b767fa86468725de9401db308daeba591d
2017-11-15 11:07:06 +08:00
JW Wang e02c72ba9e Bug 1417305. P1 - let callers of MediaResourceCallback::NotifyDataEnded() decide whether to call it synchronously. r=bechen,gerald
Instead of doing dispatch inside MediaResourceCallback::NotifyDataEnded(),
we let the callers decide whether to call the function synchronously. This is required
by ChannelMediaResource::CacheClientNotifyDataEnded() which will run off the main thread.

MozReview-Commit-ID: IzUYw8QMZbD

--HG--
extra : rebase_source : b888049d5b999a37515f00e52ae02dcf17f227e8
extra : intermediate-source : 7b660cd9b9fbb1a00e427b8e9074c9b736a80ae9
extra : source : cc055c39bd9fbbeb4354bbbebe0c46512be6e3a3
2017-11-10 14:27:59 +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
Sebastian Hengst 32f7c8fec3 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 1h3kZyrtqSt
2017-10-17 11:45:16 +02: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
Kris Maglione 60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Chris Pearce 47c2e3ae92 Bug 1405697 - Move BaseMediaResource declaration to its own file. r=jwwang
This means we can simplify MediaResource.h to only include the abstract
interface, and MediaResourceIndex.

I also had to add a few includes here and there to fix the non-unified build.


MozReview-Commit-ID: 4R7LTXq25dm

--HG--
rename : dom/media/MediaResource.h => dom/media/BaseMediaResource.h
extra : rebase_source : edef4a65df4dcb92f8536052d170d78f95315753
2017-10-04 20:57:11 +02:00