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

108 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bryce Seager van Dyk 3b9b491f8b Bug 1669570 - Rename MediaController thread to MediaSupervisor. r=jya
This renames the thread and identifiers derived from the thread's name. This is
to avoid ambiguity over if the thread relates to the MediaController class,
which it does not.

Differential Revision: https://phabricator.services.mozilla.com/D93806
2020-10-26 15:13:37 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Bryce Seager van Dyk 6e2d1d8482 Bug 1618529 - Store clear crypto subsample info in uint32 rather than uint16. r=jolin
This avoids us risking an overflow when we convert encrypted media with
subsamples to AnnexB (since that conversion can grow the clear sizes of the
sample). See the test in the preceding patch for an example of how and why this
happens.

Differential Revision: https://phabricator.services.mozilla.com/D92300
2020-10-05 18:17:06 +00:00
Jean-Yves Avenard c56eb8ef3c Bug 1653638 - P1. Rename thread type and remove unused one. r=mattwoodrow
Historically, the MediaThreadType::PLAYBACK was used just for that; the MediaDecoderReader and exclusively for playback content.

This is no longer the case ; it's used in multiple places, and not just with playback: webrtc, webaudio, benchmark etc.

The primary use of the "PLAYBACK" thread was to distinguish from the "PLATFORM_DECODER" one as they dispatch synchronous tasks from one to the other, and we must ensure they don't share the same threadpool.

CONTROLLER is more fitting here, as this is how it's typically used: a controller thread manage the decoder threads.

Additionally, we remove the MTG_CONTROL one as it's not used.

Differential Revision: https://phabricator.services.mozilla.com/D85543
2020-08-03 08:01:07 +00:00
Frederik Braun a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
John Lin 697efd3eea Bug 1619550 - p2: use media segment URL access for access control. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D74990
2020-05-19 21:23:59 +00:00
Aaron Klotz 0894f56add Bug 1637452: Part 11 - Fix JNI includes in dom/media; r=jya
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75374
2020-05-15 17:05:12 +00:00
Jean-Yves Avenard d882415a98 Bug 1630802 - P8. Remove unnecessary AutoEnter. r=bholley
AutoEnter was an attempt around a race between AbstractThread and MessageLoopAbstractThreadWrap that would cause AbstractThread::GetCurrent() to return an incorrect value. MessageLoopAbstractThreadWrapper is no more and as such AutoEnter is no longer required.

Differential Revision: https://phabricator.services.mozilla.com/D71279
2020-04-20 02:13:31 +00:00
Aaron Klotz c4f1b7b2d0 Bug 1608577: Part 1 - Remove |using namespace mozilla::java| from dom/media; r=kinetik
Differential Revision: https://phabricator.services.mozilla.com/D59796

--HG--
extra : moz-landing-system : lando
2020-01-13 22:04:02 +00:00
Sylvestre Ledru c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
John Lin e98ea9e53e Bug 1583565 - check if Java wrapper is still valid when updating media info. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D56973

--HG--
extra : moz-landing-system : lando
2019-12-19 04:10:50 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
alwu 441473d744 Bug 1563949 - part4 : prevent direct usage of 'AppendElement()' to append sample. r=jya
We should always append sample by using `AppendSample()` to assert whether a sample is valid, so making `mSamples` private can prevent a direct usage of the nsTarry's `AppendElement()`.
Also provide a method to return non-const mSamples which is only used for the move semantics.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 21:11:21 +00:00
alwu 44cfc7989a Bug 1563949 - part3 : handle invalid sample in demuxer. r=jya
Return demux error when we get a invalid sample. For mp4 demuxer, we use `MOZ_DIAGNOSTIC_ASSERT` instead because we are pretty sure that it won't happen.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 20:48:15 +00:00
alwu 424b48c982 Bug 1563949 - part2 : add 'AppendSample' to assert that a sample should always be valid r=jya
We don't want to have a sample with invalid time, duration, end time or end timecode, so add a diagnostic assertion to check. And will handle invalid sample for demuxers in next patch.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 20:16:26 +00:00
Christian Holler 8cfda79e0d Bug 1465407 - Add media fuzzing targets. r=jya
Depends on D35776

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

--HG--
extra : moz-landing-system : lando
2019-07-16 14:50:17 +00:00
Sylvestre Ledru 2bf505b023 Bug 1562642 - Add missing MPL2 headers r=mhoye
Differential Revision: https://phabricator.services.mozilla.com/D37053

--HG--
extra : moz-landing-system : lando
2019-07-05 17:05:57 +00:00
Nicholas Nethercote d839ef58db Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

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

--HG--
extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
2019-06-28 14:09:05 +10:00
Csoregi Natalia db63d343f2 Backed out changeset d637ee5ceb51 (bug 1552145) as per request. a=backout 2019-06-07 00:45:43 +03:00
Chris Pearce 0ebe8e14ac Bug 1552145 - Change HLS seek to seek before seek target and drop frames until next keyframe. r=jya
The Java ExoPlayer that we use for HLS support on Android does an accurate
seek, that is, it seeks to the frame at the seek target. This may not be a
keyframe, which we can start decoding at. So change the HLS seek to seek 2
seconds behind the seek target, and drop all frames up to the next keyframe.
This means that after a seek the HLSDemuxer will output a keyframe, and
hopefully (but we can't guarantee of course) it will lie behind the actual seek
target.

We also need to purge the GeckoHlsVideoRenderer's queue of frames which it
is holding onto in order to determine their durations, otherwise after a seek,
we'll get output from this queue of frames. That is, after a seek we would still
get a few frames from the old playback position.

This seek case is particularly problematic as we aggressively shutdown decoders
when the media is paused, including right after the load reaches
loadedmetadata, and we need to seek in order to recover from going dormant.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 22:20:49 +00:00
Andrea Marchesini f4c9f068fa Bug 1554847 - Improve cross-origin checks in canvas API - consider intermediate redirects, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32792

--HG--
extra : moz-landing-system : lando
2019-06-04 06:32:37 +00:00
Coroiu Cristina 73edc6621b Backed out 4 changesets (bug 1554847) for wpt failures at /service-workers/service-worker/fetch-canvas-tainting-video-cache.https.html
Backed out changeset 17e36d139ac2 (bug 1554847)
Backed out changeset 101bd1c2d688 (bug 1554847)
Backed out changeset 3ff9a221f3e5 (bug 1554847)
Backed out changeset 946e4d9420dd (bug 1554847)
2019-06-04 03:24:42 +03:00
Andrea Marchesini 8df66534cf Bug 1554847 - Improve cross-origin checks in canvas API - consider intermediate redirects, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32792

--HG--
extra : moz-landing-system : lando
2019-06-03 09:54:43 +00:00
John Lin 23e73b3f4c Bug 1510340 - p2: limit the concurrently created HLSDecoder instances. r=jya
Each instance has an instance of Java ExoPlayer that consumes memory in the
limited JVM heap. Too many concurrent players will cause OutOfMemoryError.

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

--HG--
extra : moz-landing-system : lando
2019-02-21 01:22:02 +00:00
John Lin e4a543d886 Bug 1517252 - p1: don't lock HLSResourceCallbacksSupport mutex unnecessarily. r=jya
HLSResourceCallbacksSupport::mDecoder is cleared on main thread too, so
the nullness check already ensures decoder methods won't be called after
shut down. In fact, for OnError() the lock is harmful because the task calls
MediaDecoder::NetworkError(), which triggers decoder shutdown and eventually
HLSResourceCallbacksSupport::Detach(), which tries to lock the mutex again
while the mutex is still locked.

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

--HG--
extra : moz-landing-system : lando
2019-01-22 22:55:58 +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
John Lin 9c28465e35 Bug 1482452 - p1: validate buffer contents before accessing. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D16707

--HG--
extra : moz-landing-system : lando
2019-01-16 16:31:16 +00:00
Bryce Van Dyk fa9d86fda5 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec: the scheme implies mode. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec --
  possibly if the isProtected flag which we were tracking with mMode, is
  ever changed to be more than a bool in the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 15:29:45 +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
Paul Adenot 250b3fdb07 Bug 1478843 - Consider HLS resources CORS cross-origin. r=jya
--HG--
extra : rebase_source : ad47a391a42a73fc88cea1cf3cf2c8cfbefb0365
2018-07-30 10:07:34 +02:00
Jean-Yves Avenard d586f6f943 Bug 1409664 - P9. Remove AutoTaskQueue and its use r=bryce
Summary:
TaskQueue no longer requires an explicit call to BeginShutdown() as such we no longer have a need for AutoTaskQueue.

Depends on D1621

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1622
2018-07-03 11:45:19 -07: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
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
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
Nathan Froyd 052d391b9c Bug 1448031 - make various audio/video/media constructors explicit; r=gerald
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Chris Peterson 0129d900f3 Bug 1436263 - Part 2: Replace `override final` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: 70gt5SUu4Dv

--HG--
extra : rebase_source : 71912c6bde22aaed01e70615a4ee794a36e70d0e
extra : source : 1c22d4c65d70b797ee3e963ec426c90e1f89b5e3
2018-02-05 22:50:00 -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
JW Wang 79b5f2dd2e Bug 1425996 - fix build error: unused variable 'rv'. r=gerald
MozReview-Commit-ID: 7MhsSWbxB3z

--HG--
extra : rebase_source : 81207a1e5b663314295f2f95afd4b726ffe8f12d
2017-12-21 12:12:42 +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 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
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01: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
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