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

13246 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Chris Pearce 79ee61bdff Bug 1435133 - Test that we delay media play start until we know whether a media has audio or not. r=bryce
Test that play() on a media without audio called before
readyState >= HAVE_METADATA will still play.

MozReview-Commit-ID: 1FeDrEfCEum

--HG--
extra : rebase_source : be6d07905aad853ad028eac372e4e380bdeb1a49
extra : source : e98b4a7aaf020fa3d6d59cb0f53680ef6466d154
2018-04-06 17:13:39 +12:00
Chris Pearce 2be26b6b7c Bug 1443942 - Move code to toggle high res timers into VideoSink. r=jya
We have code in the MDSM to toggle on high resolution timers on Windows when we
start/stop playing because the VideoSink relies on being awoken by timers to
update the set of current frames in the compositor's queue, and on Windows 7 we
end up dropping frames due to the timer lag without this.

We assert in the MDSM's destructor that we've turned off high res timers (as
they cause needless battery drain, so we only want them on when we need them),
and the new test_mediarecorder_principals is hitting that assert on Windows. I
think we're missing turning them off when we create a new VideoSink for
outputting to the MSG. That affects the value returned by
MediaDecoderStateMachine->mVideoSink->IsPlaying(), which is what we use to
decide whether we should enable high resolution timers. We track whether we've
enabled high res timers in MDSM::mHiResTimersRequested, and that gets out of
sync with IsPlaying() when we re-create the MediaSink.

Rather than trying to handle all the permutations of places where we need to
turn off high resolution timers in the MDSM, we're better to move the code to
toggle high res timers into the VideoSink, as that's actually where we need to
be sure that we have high resolution timers enabled anyway. It's the VideoSink
after all that is relying on timers for frame update, not the MDSM.

Also remove the media.hi-res-timers.enabled pref, as we haven't needed it.

MozReview-Commit-ID: 9dNxcYxPDZH

--HG--
extra : rebase_source : 6e403d59bb5f1dd0241fe8298a823ba08b1670fb
2018-04-06 13:33:28 +12:00
Chris Pearce dd45189315 Bug 1443942 - Rewrite test_mediarecorder_principals. r=bryce
I changed this test earlier in this set of commits to use
midflight-redirect.sjs so that we get more reliable and predictable cross
origin redirects during the download. Unfortunately this test now times out on
Windows.

This test times out on Windows because midflight-redirect.sjs redirects at 1/4
through the resource, whereas this test expects to be able to play through to
1/5 through the resource, and on Windows that seems to be not reached during
playback. This is likely due to decode latency being higher on Windows.

On top of that, the test's first case can sometimes call MediaRecorder.start()
before the redirect has happened, and before the principal has changed, and so
start() doesn't throw a SecurityError as expected, and the test intermittently
fails.

Additionally, the test's code could be clearer if we used async/await.

So rewrite the test to use async/await, and take advantage of
midflight-redirect.sjs's redirect being more predictable than the old
dynamic_redirect.sjs. Basically, we can be careful to wait for either
"loadedmetadata" or "error" on the media element in order to be more confident
the redirect has or hasn't happened yet.

We still can't be 100% sure that the redirect won't have already happened by
the time our "loadedmetadata" handlers run. It's quite possible that the
download has reached 1/4 through the resource by the time the loadedmetadata
handler has run, so we need to handle the "error" and "loadedmetadata" events
racing.

MozReview-Commit-ID: 8plMjkXgjYt

--HG--
extra : rebase_source : 7305598f40c09219494f3e7150799d8875b7c30e
2018-04-05 13:35:14 +12:00
Chris Pearce a19e516c04 Bug 1443942 - Ensure MediaCacheStreams are initialized with the length of the resource, not the length of the byte range response. r=jya
I'm seeing intermittent failures of test_midflight_redirect_blocked. In this
test, our custom server responds to Firefox's 0- HTTP Byte Range request with a
[0,200] response. When Firefox requests 200-, the server responds with a cross
origin redirect, and then the remainder of the resource.

However sometimes while running test_midflight_redirect_blocked the MP4 demuxer
reads through all 200 bytes while trying to parse metadata before the redirect
has occurred and fed more data into the cache, and so the demuxer thinks it's
hit end of stream, and reports a failure. The demuxer thinks it's hit end of
stream, because we initialize the MediaCacheStream length in
ChannelMediaResource::Open() with the value of the Content-Length HTTP header.
But in an HTTP byte range response, the Content-Length header tells you the
length of the range returned, not the length of the entire resource. The length
of the resource is in the Content-Range header, we need to use that if
available.

So to fix this intermittent test failure, we need to also parse the
Content-Range header in ChannelMediaResource::Open(), and use the length from
that if available.

MozReview-Commit-ID: 29pPRsUvxag

--HG--
extra : rebase_source : ba1ef03d65ebd22698a29d8385f36b4c747ccf43
2018-04-04 12:36:00 +12:00
Chris Pearce fbd7f61c3c Bug 1443942 - Fix dom/media/test/midflight-redirect.sjs. r=jya
Problems here:
* The variable `to` is undefined for byte range requests to the end of
the resource, making the math fail. Firefox normally makes ranges requests like
this.
* The bytes.length/4 calculation may not be a whole number, so can
result in a byte range header part of the way between two bytes. We need to
round the length off.
* Instead of re-calculating the contentLength, we can just use the length of
the actual byterange substring being returned. That's clearer.
* test_midflight_redirect_blocked needs the redirect to happen
before metadata has completed loading, but other tests require the redirect to
happen *after* metadata is loaded. So add a redirectAt query parameter for the
requester to control when to redirect.

MozReview-Commit-ID: I6n1NqK0Uze

--HG--
extra : rebase_source : a6bd68fe75cfd4c46f63ca815c5a4e9390bd671a
2018-04-04 14:30:15 +12:00
Chris Pearce 9f21b62342 Bug 1443942 - Switch over to midflight redirect for all redirect media tests. r=jya
We have two SJS files; midflight-redirect.sjs and dynamic_redirect.sjs,
which are very similar, but dynamic_redirect.sjs is buggy, so we should
just use midflight-redirect.sjs.

dynamic_redirect.sjs is buggy because it relies on the client doing multiple
HTTP requests to it in order to redirect, but we can't actually guarantee
this. Previously users of it would try things like setting a small MediaCache
size, or only using Ogg for which we expect a seek to the end to calculate
the duration, but I have observed the entire resource being downloaded in
one hit before the media element has finished loading metadata, meaning the
seek (in the Ogg case) can happen without another HTTP request. This is even
with a small MediaCache.

midfligh-redirect.sjs solves this problem by explicitly only returning a
partial response, so the client is forced to make another HTTP request,
which we will serve a redirect to.

MozReview-Commit-ID: 39imyayhnBG

--HG--
extra : rebase_source : 603532e4af0bf304c34739de5b0b243174e3831d
2018-03-29 18:16:33 +13:00
Chris Pearce 6a06dbd8b8 Bug 1443942 - Rewrite test_mixed_principals. r=jya
The original test is failing, as it assumed we'd not error when
origins were mixed without CORS, and the original test was using
outdated practises, so rewrite it.

MozReview-Commit-ID: KlOH83GUOk

--HG--
extra : rebase_source : 2c79691fddc93af0e04d8f23fa31ac8588a8d6e1
extra : amend_source : 2989317530f536915f011977c8f34e048410b018
2018-03-28 16:56:37 +13:00
Chris Pearce 5913d0470e Bug 1443942 - Make redirect SJS' serve with headers to prevent Necko caching. r=jya
Try to prevent Necko from caching the results of our SJS media responses, as
some of the test that use it rely on the server being hit and serving a
redirect. Sometimes the tests which rely on hitting a redirect in an SJS
where timing out without this, as Necko would cache the response and not
hit the server, and so not hit the redirect.

Also include a noise parameter to increase the likelihood that the URL is
unique, to further reduce the chance that Necko caches the result.

MozReview-Commit-ID: 3cLEiDoh4HG

--HG--
extra : rebase_source : 24c152d46540866f14211fae30f1e59c5d23b6d4
2018-03-28 16:55:46 +13:00
Chris Pearce 99ff9f62be Bug 1443943 - Ensure redirect SJS' serve the correct content types. r=jya
dynamic_redirect.sjs and midflight-redirect.sjs are serving files
with "Content-Type: video/ogg", which is incorrect and could lead
to problems given that we're not always asking it to serve Ogg
files. So include the type be to served as a query parameter.

MozReview-Commit-ID: 5f0PXy8lL3G

--HG--
extra : rebase_source : 757395a21317655422767efe3f7c1923a19c0114
2018-03-28 16:51:04 +13:00
Chris Pearce e8c1b1b7f1 Bug 1443942 - Test for blocking midflight redirects in media elements. r=jya
Test that playback works if we don't block, doesn't if we do block, and does
if we do block and CORS is used.

MozReview-Commit-ID: 9PTZXLOdHIU

--HG--
extra : rebase_source : db7f0c61b64990623ef035b266cf052c45df1c76
2018-03-06 14:44:26 +13: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
Noemi Erli 11310197b3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-04-09 19:54:32 +03:00
Noemi Erli b55e1a1cbc Merge inbound to mozilla-central. a=merge 2018-04-09 19:46:07 +03:00
Coroiu Cristina fa24350f83 Backed out 2 changesets (bug 1306529) for build bustage on a CLOSED TREE
Backed out changeset 87206102c699 (bug 1306529)
Backed out changeset 7e70a7f597c4 (bug 1306529)
2018-04-09 15:59:58 +03:00
Kartikaya Gupta 5cbb6be895 Bug 1426199 - Re-enable more crashtests that are now passing. r=sotaro 2018-04-09 08:02:12 -04:00
Andreas Pehrson 2027a140e6 Bug 1452472 - Guard against stopped source and removed listener after timer fired. r=jib
MozReview-Commit-ID: 72M3xpbOgXP

--HG--
extra : rebase_source : c4ddcce0eac7b7539a61f389010f09383e15ee1f
2018-04-09 13:53:32 +02:00
Takuro Ashie 297ca3383c Bug 1306529 - OmxDataDecoder: Fix a stall issue on shutting down r=jya
Because the shutdown closure awaits finishing itself by
TaskQueue::AwaitShutdownAndIdle(), the function blocks infinitely.

The code is wrongly introduced at the following commit:

  * https://bugzilla.mozilla.org/show_bug.cgi?id=1319987
    * https://hg.mozilla.org/mozilla-central/rev/b2171e3e8b69

This patch calls it on mTaskQueue intead of mOmxTaskQueue to
avoid the issue.

MozReview-Commit-ID: 4qmX2QlniEG

--HG--
extra : rebase_source : f0784c0c5b2e39d2078a5aff72be03b52e413139
extra : intermediate-source : 635153e1dcdc442f8d72727b6fe504842b4ffa31
extra : source : bf011140459cc227c9435e3960770bafb3cecb8e
2018-03-27 16:37:21 +09:00
Takuro Ashie 6e0c9d24c2 Bug 1306529 - Add initial implementation of PureOmxPlatformLayer r=jya
It's a concrete class of OmxPlatformLayer for accessing OpenMAX IL
libraries directly. It will be usable on various embedded linux systems.
Note that it's not enabled by default yet. Add the following config to
your mozconfig.

  ac_add_options --enable-openmax

TODO: Implement zero-copy mode

MozReview-Commit-ID: EMEXAKzzR64

--HG--
extra : rebase_source : d7c5b9baf66d87db38723b278c57fd581a3cbf98
extra : intermediate-source : b8c671a02a4fce085433b16db998c9b04ace87db
extra : source : 131b65580e3dd5c9dcb0ba6a05c16ab90c2dcc68
2018-03-28 18:21:04 +09:00
Alex Chronopoulos 16d2b965f6 Bug 1451781 - Check if output device is mono and remove stereo check in order to disable opus channel inversion. r=jya
MozReview-Commit-ID: 3x27rBs5Ika

--HG--
extra : rebase_source : 0b7232a0705edceda8793444c140aa947cc99d51
2018-04-09 13:07:58 +03:00
Andreas Pehrson 1e2190d040 Bug 1451798 - Check the variable actually containing the string. r=jib
MozReview-Commit-ID: 2xizfHwVPiW

--HG--
extra : rebase_source : 345327a6721e84b64ba3b66cb308dbe1100391bb
2018-04-06 15:06:46 +02:00
Noemi Erli 3c6217a11e Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-04-07 01:03:50 +03:00
Noemi Erli 2108ebfea1 Bug 1446456 - disable test_audioParamSetCurveAtTimeTwice.html for frequent failures on Linux and Windows. r=jmaher
--HG--
extra : rebase_source : 36dfabc5d23aca549f544c25d4f2ef90329dea7d
2018-04-06 13:18:00 +03:00
Nils Ohlmeier [:drno] c9b218795e Bug 1451926: add a user pref for AV1 codec. r=cpearce
MozReview-Commit-ID: 9R6Ac4O81Ji

--HG--
extra : rebase_source : bd2f46b5596c0ebafc4f60bb8bf1812a8bf776f5
2018-04-05 20:35:57 -07:00
Eliza Balazs 930bf58210 Bug 1446346 - Disable test_audioParamLinearRamp.html on linux and windows for frequent failures. r=jmaher 2018-04-04 06:01:00 +03:00
Andreea Pavel 7a4b9a3f56 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
extra : rebase_source : 66bd87105d99036ada5008499ff0eaea579b531a
2018-04-06 13:20:21 +03:00
Randell Jesup 3013268159 Bug 1448705: use input latency for draining r=jya 2018-04-05 17:15:07 -04:00
Dan Minor edc3382dd2 Bug 1432793 - Add mochitest for odd simulcast resolutions; r=bwc
This creates a simulcast stream with an odd resolution. This previously would
have caused a runtime assertion failure and crash.

MozReview-Commit-ID: IsywVOu6UeV

--HG--
extra : rebase_source : 7ad1cbe7dd36ccdd7a05e0c0a83db98a36c8c416
2018-04-04 09:24:28 -04:00
Boris Zbarsky 83412146ec Bug 1449631 part 13. Remove now-unnecessary forwarding macros. r=smaug
MozReview-Commit-ID: 6teO2KoGqUo
2018-04-05 13:42:42 -04:00
Boris Zbarsky 2cdc7450c3 Bug 1449631 part 10. Devirtualize AddEventListener. r=smaug
The CanCallerAccess check in the "webidl" version of
nsGlobalWindowOuter::AddEventListener was pointless, because bindings never
call things on outer windows.

MozReview-Commit-ID: 1CGMJ277bPu
2018-04-05 13:42:42 -04:00
Boris Zbarsky 88937275cc Bug 1449631 part 9. Remove nsIDOMEventTarget::AddEventListener. r=smaug
Also switch the XPCOM-y version of EventTarget::AddEventListner to a
Nullable<bool> for aWantsUntrusted.

The three-arg overload of AddEventListener in ContentFrameMessageManager was
never called, so all the AddEventListener overloads there are not needed.

MozReview-Commit-ID: 4IhqHmPVWzE
2018-04-05 13:42:42 -04:00
Boris Zbarsky 4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Noemi Erli ff466e94c1 Merge inbound to mozilla-central. a=merge 2018-04-05 13:02:11 +03:00
Boris Zbarsky 5ae1563978 Bug 1450422. Get rid of nsIDOMDataChannel. r=mystor
MozReview-Commit-ID: Dei5EEd0FZO
2018-04-04 15:32:19 -04:00
Nils Ohlmeier [:drno] 48edb741ab Bug 1446880: updated IDP interface to use RTCIdentityProviderOptions. r=mt
MozReview-Commit-ID: 2xwDYR2kk27

--HG--
extra : rebase_source : 043a2217af0735ad0a5d0d72398e7771fd055105
2018-03-20 11:15:10 +00:00
Nils Ohlmeier [:drno] 641209cf77 Bug 1446880: update setIdentityProvider() to take RTCIdentityProviderOptions. r=mt
MozReview-Commit-ID: Hx3LV9Uw7fi

--HG--
extra : rebase_source : b597b7fe0daff9b6fead92b3cc9c2da3e45a671c
2018-03-19 06:16:20 +00:00
Brindusan Cristian 88cd740311 Backed out 3 changesets (bug 1446880) for mochitest failures on test_exceptions_from_jsimplemented.htm CLOSED TREE
Backed out changeset 3d162d7e2721 (bug 1446880)
Backed out changeset 7142d472f2a4 (bug 1446880)
Backed out changeset 50c255c237f1 (bug 1446880)
2018-04-04 20:48:59 +03:00
Nils Ohlmeier [:drno] f3ad51380e Bug 1446880: updated IDP interface to use RTCIdentityProviderOptions. r=mt
MozReview-Commit-ID: 2xwDYR2kk27

--HG--
extra : rebase_source : c25e6ae78af97bf974079a58795a8f11ceb10912
2018-03-20 11:15:10 +00:00
Nils Ohlmeier [:drno] 5051a0eb24 Bug 1446880: update setIdentityProvider() to take RTCIdentityProviderOptions. r=mt
MozReview-Commit-ID: Hx3LV9Uw7fi

--HG--
extra : rebase_source : 0ecc2d1e17409f7cb4379be9efb6675aa1eb92f2
2018-03-19 06:16:20 +00:00
Jean-Yves Avenard 7bf7eeeccb Bug 1446931 - P2. Refactor code flow in Benchmark. r=gerald
The code relied on a flag to be set to simply abort. However, that made the code workflow hard to read.

We split each runs so that there's no ambiguity.

MozReview-Commit-ID: LI7pL5p69zu

--HG--
extra : rebase_source : 6c912edf87c13fc6b10a9be6bd57d4ffbf1dfc39
2018-03-30 11:00:50 +02:00
Jean-Yves Avenard ee706e3b83 Bug 1446931 - P1. Handle errors in Benchmark. r=gerald
Benchmark had never been intended to be able to process invalid content. However over time Benchmark class has been used extensively by the fuzzing team.
As such, it became necessary to handle errors of all kind.

MozReview-Commit-ID: E0YulHuoiq2

--HG--
extra : rebase_source : a8c5bf2e05d5b4e9c89723cb1e0d71e61f17d501
2018-03-29 22:11:06 +02:00
Andreas Pehrson c90665389c Bug 1407549 - Copy AudioSegment by constructor. r=padenot
This allows static analysis to pass for AudioNodeExternalInputStream.cpp.

MozReview-Commit-ID: 9dvllnnODed

--HG--
extra : rebase_source : 0c7665a3240422d52b82c5c2eaa4942be522dcb9
2018-04-04 12:07:41 +02:00
Andreas Pehrson c213ba1025 Bug 1407549 - Avoid copying principal handles as much as possible. r=padenot
MozReview-Commit-ID: EMX2nf5nk1L

--HG--
extra : rebase_source : 4cbdfabcafb0bfb844dd022e6f56b425c4f6e87c
2018-03-29 16:15:51 +02:00
Andreas Pehrson d46c8b84c9 Bug 1407549 - Simplify MSGImpl::AudioTrackPresent. r=padenot
MozReview-Commit-ID: 9MBH3xoah1f

--HG--
extra : rebase_source : 536dc84e1fd11e8edbf426067943c8c210ea0327
2018-03-29 16:10:29 +02:00
Andreas Pehrson 7ca59d202e Bug 1407549 - Make segments allocate chunk storage locally. r=padenot
MozReview-Commit-ID: 19VOLomq8A6

--HG--
extra : rebase_source : 0f492c83bd7d2695fce44381a11cc71ddc9fbc17
2018-03-29 16:13:36 +02:00
Andreas Pehrson e5aeaef968 Bug 1407549 - Avoid array operations that can cause alloc/dalloc in MediaSegment. r=padenot
MozReview-Commit-ID: Fhg9NIltFti

--HG--
extra : rebase_source : 0e3536bbc1942ac0b5aa2d1c0bdc22eb73b72851
2018-03-28 14:41:11 +02:00
Andreas Pehrson 638e248ed3 Bug 1407549 - Give MediaSegment's chunk array a default capacity. r=padenot
MozReview-Commit-ID: 5BZMFimFjpS

--HG--
extra : rebase_source : 7851e13bbed0d377c376c4b15a708d18944bf133
2018-03-28 14:39:54 +02:00
Dan Glastonbury e2671eba43 Bug 1451221 - Don't run test_background_video_suspend_ends.html in parallel. r=cpearce
When this test times out, one of the two videos in parallel takes
minutes to start.

MozReview-Commit-ID: AhXsQKDKwOD

--HG--
extra : rebase_source : 3d42329967204c201b9e882b13dafc3149247c79
2018-04-04 16:27:11 +10:00
Margareta Eliza Balazs 210797c4c1 Merge inbound to mozilla-central. a=merge 2018-04-04 12:43:55 +03:00
Ciure Andrei 5ffac2bcd3 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-04-04 00:58:50 +03:00