Commit Graph

390 Commits

Author SHA1 Message Date
Mike Conley
44acc929a5 Bug 1521964 - Don't suspend the video decoder when cloning a video visually. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D20674

--HG--
extra : moz-landing-system : lando
2019-03-01 22:36:53 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
alwu
16fe01f1fd Bug 1511235 - part2 : add test. r=jya,baku
Add new webidl method for testing only and a test.

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

--HG--
extra : moz-landing-system : lando
2018-12-20 20:01:46 +00:00
Cosmin Sabou
0bedc24aae Backed out 2 changesets (bug 1511235) for causing bugs 1513454, 1513456 as alwu requested on irc. a=backout
Backed out changeset 4c9f874d6868 (bug 1511235)
Backed out changeset 3432e8bee7f1 (bug 1511235)
2018-12-13 03:43:36 +02:00
alwu
aba79e9edc Bug 1511235 - part2 : add test. r=jya,baku
Add new webidl method for testing only and a test.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 02:16:55 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andreas Pehrson
4213b7db86 Bug 1423241 - Refactor DecodedStream. r=jya
This removes DecodedStream's use of MediaStreamListener in favor of
MediaStreamTrackListener. This change has however rippled through to a lot
more cleanup, per below.

This moves the MediaStreamTrack lifetime ownership for captured
HTMLMediaElements from the media element to DecodedStream, where the
MediaStreamGraph-side tracks are already created and ended today.

This makes MediaStreamTrack creation explicit across the entire codebase and
lets us remove the MediaStreamTrackSourceGetter class and the infrastructure
of adding MediaStreamTracks after they've already been created in the graph
from DOMMediaStream.

With track ownership, and thus TrackID allocation ownership, happening
exclusively in DecodedStream for its output tracks, we also stop throwing
away and recreating the SourceMediaStream to which we feed data on seek.
This is one step closer to fixing bug 1172394 and spec compliance of
HTMLMediaElement.captureStream().

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

--HG--
extra : moz-landing-system : lando
2018-11-23 15:02:03 +00:00
alwu
ff3d8a3510 Bug 1499903 - part3 : change 'mLogicallySeeking' to Watchable r=chunmin
Nobody is mirroring to 'mLogicallySeeking', so we can just use Watchable instead.

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

--HG--
extra : moz-landing-system : lando
2018-11-23 05:07:45 +00:00
alwu
42c302ff20 Bug 1499903 - part1 : correct the events order when we're in the seamless looping. r=chunmin
When the media which has `loop` attribute is playing to the end, the spec mentions that media should do seek to the start position [1].

During seeking, the dispatched events order [2] for MediaElement should be
1. seeking
2. timeupdate
3. seeked

[1] https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:attr-media-loop-2
[2] https://html.spec.whatwg.org/multipage/media.html#seeking:dom-media-seek

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

--HG--
extra : moz-landing-system : lando
2018-11-23 05:23:48 +00:00
Tarek Ziadé
63637ef222 Bug 1497124 - Added some memory info in the performance counters - r=jya,jonco
Add some memory usage information to the Performance counters and make everything asynchronous.

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

--HG--
extra : moz-landing-system : lando
2018-11-19 22:51:12 +00:00
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
Dorel Luca
0a1112ab71 Backed out 3 changesets (bug 1499903) for frequently asserting at dom/media/MediaDecoderStateMachine.cpp
Backed out changeset 634b4c2dad35 (bug 1499903)
Backed out changeset 1a77eb131a2b (bug 1499903)
Backed out changeset ed4236eceb1a (bug 1499903)
2018-11-07 05:40:07 +02:00
alwu
20219eb9f9 Bug 1499903 - part3 : change 'mLogicallySeeking' to Watchable r=chunmin
Nobody is mirroring to 'mLogicallySeeking', so we can just use Watchable instead.

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

--HG--
extra : moz-landing-system : lando
2018-11-06 22:00:11 +00:00
alwu
0c4634255b Bug 1499903 - part1 : correct the events order when we're in the seamless looping. r=chunmin
When the media which has `loop` attribute is playing to the end, the spec mentions that media should do seek to the start position [1].

During seeking, the dispatched events order [2] for MediaElement should be
1. seeking
2. timeupdate
3. seeked

[1] https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:attr-media-loop-2
[2] https://html.spec.whatwg.org/multipage/media.html#seeking:dom-media-seek

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

--HG--
extra : moz-landing-system : lando
2018-11-06 16:55:38 +00:00
Bogdan Tara
4119f6ad2e Backed out 3 changesets (bug 1499903) for causing bug 1502637 CLOSED TREE
Backed out changeset 3c7165875616 (bug 1499903)
Backed out changeset 106752b77131 (bug 1499903)
Backed out changeset 3f6d3c425b42 (bug 1499903)
2018-10-29 23:32:50 +02:00
alwu
e9771aeaa5 Bug 1499903 - part3 : change 'mLogicallySeeking' to Watchable r=chunmin
Nobody is mirroring to 'mLogicallySeeking', so we can just use Watchable instead.

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

--HG--
extra : moz-landing-system : lando
2018-10-25 17:44:38 +00:00
alwu
b0a8a872f6 Bug 1499903 - part1 : correct the events order when we're in the seamless looping. r=chunmin
When the media which has `loop` attribute is playing to the end, the spec mentions that media should do seek to the start position [1].

During seeking, the dispatched events order [2] for MediaElement should be
1. seeking
2. timeupdate
3. seeked

[1] https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:attr-media-loop-2
[2] https://html.spec.whatwg.org/multipage/media.html#seeking:dom-media-seek

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

--HG--
extra : moz-landing-system : lando
2018-10-26 23:21:00 +00:00
Alex Chronopoulos
6e1c6f8946 Bug 934425 - Implement asynchronous method to switch sink in MediaDecoder. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D5872

--HG--
extra : moz-landing-system : lando
2018-10-12 08:44:47 +00:00
Andreas Pehrson
6c6e70fcbc Bug 1453127 - Ensure TrackID uniqueness for captured MediaDecoder. r=jya 2018-05-29 10:21:51 +02:00
Jean-Yves Avenard
7c6fc40c1a Bug 1458566 - Make MediaDecoder::Play() return void. r=bryce
MediaDecoder::Play() cannot fail and was always returning NS_OK

MozReview-Commit-ID: 7OgwZQw569Y

--HG--
extra : rebase_source : 907f6304df42640ccd03e8d144fe89cd748eec07
2018-05-02 17:27:27 +02:00
Jean-Yves Avenard
f627e9792e Bug 1457960 - P2. Don't make MediaDecoder::Seek virtual. r=bryce
It's unnecessary.

MozReview-Commit-ID: Hau3nb9WLKe

--HG--
extra : rebase_source : d210489cd6a470c7954068306703482342a45092
2018-04-30 19:59:32 +02:00
Jean-Yves Avenard
1e4866d526 Bug 1457960 - P1. make MediaDecoder::Seek returns void. r=bryce
MozReview-Commit-ID: 2pbZprnYqcF

--HG--
extra : rebase_source : b6c521f65be5fb17d7d33b7ed86eb044d4cdfa9f
2018-04-30 19:58:11 +02: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
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
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
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
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
Chris Pearce
4d4bf4593d Bug 1423372 - Move MediaDecoder::BackgroundVideoDecodingPermissionObserver to its own file. r=jwwang
This class contains a bunch of Gecko DOM specific stuff, and it would make
keeping the copy of MediaDecoder in Servo up to date easier if the Gecko
DOM stuff wasn't in MediaDecoder (and the other classes we import).

MozReview-Commit-ID: 3dP1nrQ7sT3

--HG--
extra : rebase_source : 79040a8d3cff6ac946b20a99d68e57630ec60848
2017-12-06 11:22:36 +13: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
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
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
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
496d14a291 Bug 1415441 - Eagerly init gMediaDecoderLog to debug crash. r=cpearce
MozReview-Commit-ID: E7ZDdQwZ32
2017-11-08 15:34:19 +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
Kilik Kuo
3f546c6285 Bug 1395922 - [P3] Make HTMLMediaElement::SetMediaKeys asynchronously. r=cpearce
MozReview-Commit-ID: 5M8CTHMsmIh

--HG--
extra : rebase_source : daec666760097b73a7dfad2960881173127eb69e
2017-11-03 20:14:17 +08:00
Csoregi Natalia
978711ce7c Merge autoland to mozilla-central r=merge a=merge 2017-11-06 12:44:18 +02:00
Csoregi Natalia
6bf19d4921 Backed out 6 changesets (bug 1395922) for failing Media tests test_eme_sample_groups_playback.html and test_eme_sample_groups_playback.html r=backout a=backout
Backed out changeset f856af63682e (bug 1395922)
Backed out changeset f59a7e727f39 (bug 1395922)
Backed out changeset 9cd31c6a8e2c (bug 1395922)
Backed out changeset d46f952f94f8 (bug 1395922)
Backed out changeset f786d928b1e0 (bug 1395922)
Backed out changeset bacda0f99f71 (bug 1395922)
2017-11-06 12:34:02 +02:00
JW Wang
3fc794b919 Bug 1414121. P2 - let MediaDecoder::DumpDebugInfo() return a MozPromise. r=jya
MozReview-Commit-ID: Fau4ysdlwwa

--HG--
extra : rebase_source : cdf67d359301eed57935c761cad5c74e2ffdabb7
extra : source : f0e2e3449a80e507c3cc041f6ba87fce6455ffc5
2017-11-03 10:46:02 +08:00
Kilik Kuo
55be93073e Bug 1395922 - [P3] Make HTMLMediaElement::SetMediaKeys asynchronously. r=cpearce
MozReview-Commit-ID: 5M8CTHMsmIh

--HG--
extra : rebase_source : c1b186f6da354b79036dea7175960e1e33a2eaae
2017-11-03 20:14:17 +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
eb61536947 Bug 1409178 - Remove MediaDecoder::InitStatics() since it's a no-op. r=jwwang
MozReview-Commit-ID: Leo5wNaxpjg

--HG--
extra : rebase_source : 2555c7dc26ca6867e79322bd572085a0cdfeb3b2
2017-10-16 22:39:02 +02:00
Chris Pearce
1d354be8e8 Bug 1409060 - Don't include necko-config.h in MediaDecoder.h. r=jwwang
MozReview-Commit-ID: 2RmqxUayD0L

--HG--
extra : rebase_source : ac868ce7df6a308a9005ce89c725616006c666ba
2017-10-16 17:54:18 +02:00
JW Wang
ba8adddaa7 Bug 1405025. P2 - revert Bug 1390443 P1. r=jya
Since we don't use state-mirroring to dispatch nextFrameStatus changes, we
can now revert the workaround of bug 1390443 P1. See bug 1390443 comment 0
for more details.

MozReview-Commit-ID: FRxXUnGC3x2

--HG--
extra : rebase_source : 67192634e001c635e2f15cc77545df79fed11b2d
extra : intermediate-source : 7c02f95ff9d1864fcc53216304b15c266634c753
extra : source : 6a46f27ac74f2c5b013ff8ace3ce8a77279a99b5
2017-10-06 15:58:59 +08:00
JW Wang
4026dc6f84 Bug 1405025. P1 - ensure 'seeking' is fired before 'waiting'. r=jya
Use MediaEventSource instead of state-mirroring to notify nextFrameStatus
changes so we have more control over the order of events.

MozReview-Commit-ID: 3DGtMbghEQm

--HG--
extra : rebase_source : 774fc3da290c033769871a1bd7230177ff24d5bf
extra : intermediate-source : 6583b9281492be1a3bb0771b600cd80efd487af8
extra : source : 00570c319bfbd94970d4c637c7bf81b52d79ca02
2017-10-06 15:48:38 +08:00
JW Wang
f23594e114 Bug 1402584. P1 - Backed out changeset 442e8020e2ac. r=gerald
MozReview-Commit-ID: JqZJDTMyKGm
2017-10-08 17:07:55 +02:00