Commit Graph

13185 Commits

Author SHA1 Message Date
sotaro
2cc8bd0a21 Bug 1426199 - Relax ASSERT checks r=nical 2018-04-03 18:25:36 +09:00
Bryce Van Dyk
e9495a620d Bug 1436523 - Update head.js to better handle pref changes for fake/loopback devices during tests. r=achronop
Update head.js so that calls to the gUM helper will check the loopback and fake
device prefs and update the frequency output by test devices accordingly. This
should hopefully avoid issues where tests could change prefs, and the output
tone would no longer be correct for the new configuration.

No longer have audioDevice and videoDevice as globals, this way tests
explicitly fetch direct from prefs.

MozReview-Commit-ID: 9jhVScaBfTX

--HG--
extra : rebase_source : 64b17e44ef166983361f94cf7d287faed3c2cdc5
2018-03-21 15:23:37 -04:00
Bryce Van Dyk
b1fb8c3b44 Bug 1436523 - Change DeviceEnumerationType to scoped enum, add extra logging. r=achronop
Update the DeviceEnumerationType enum to scoped style enum for safety and
consistency. Add extra logging to aid in debugging test issues.

MozReview-Commit-ID: cm5bdlIcEG

--HG--
extra : rebase_source : bfcae3d49f809edfd0ed6ab3e516b8be0c0d517e
2018-03-16 15:09:26 -04:00
Bryce Van Dyk
551cc6f34b Bug 1436523 - Make WebRTC mochitest harness more granular with fake device setup. r=achronop
Update head.js so that logic for fake audio and fake video is more granular.
Now code handles fake audio and fake video separately, and will set the fake
pref is either is needed. This allows for a single loopback device to be set
and fake used for the other. Previously both devices needed to be loopback or
fakes would be used.

MozReview-Commit-ID: K4blmPrSVeh

--HG--
extra : rebase_source : 369ea7f788d29a02db68e517d324977f251c9a98
2018-03-05 14:46:03 -05:00
Bryce Van Dyk
da98dea96a Bug 1436523 - Update dom/media/tests/mochitest tests to better handle loopback devices. r=achronop
With changes giving loopback devices higher precedence in testing, various tests
in dom/media/tests/mochitest have been updated to accommodate this. Many tests
just worked, but some require tweaks, or to explicitly request fake devices.

Also update webaudio's test_mediaStreamAudioSourceNodeGC test to explicitly use
fake devices. This test does not have the loopback tone exposed to it in JS, so
is unabel to adjust the loopback tone to suit its needs.

Various tests are updated to set fake device prefs instead of requesting via
gUM to move away from non-standard behaviour per bug 1436424.

MozReview-Commit-ID: 5GAVZFzF2hq

--HG--
extra : rebase_source : 27f39e3573eda321025ce0739e1d5f4101fc5d12
2018-02-26 12:20:40 -05:00
Bryce Van Dyk
898975f341 Bug 1436523 - Update dom/media/test/ tests to better handle loopback + gUM device config. r=achronop
This changeset adds a gUM_support.js to dom/media/test/. This file provides
functions to setup prefs for loopback or fake device selection before gUM calls
are made. This is useful for configuring tests and providing an explicit point
of reference for settings, rather than the implicit ones provided by the
harness.

Updates tests so that the new helper functions are called before gUM. This
will result in loopback prefs being set if loopback device names are detected,
if not then fake devices will be used. This also removes the use of the fake
constraint in gUM calls.

Update touched tests to use some more modern JS. No behavioural changes were
made (except in minor cases, but functionality should be the same). These
changes are largely as follows:
- var -> let
- async is used in places where I felt it improved readability
- semicolons added to various event handler assignments

MozReview-Commit-ID: 1HuE8thBA6w

--HG--
extra : rebase_source : b866056b2821436cf34ea683421c200b4bb4e55f
2018-02-21 09:11:29 -05:00
Bryce Van Dyk
aa68bc0511 Bug 1436523 - Rework media manager enumeration to prefer loopback to fake devices, allow mixing of fake and loopback. r=achronop
Change the media manager so that if fake and loopback devices are requested,
loopback is preferred. With this change loopback and fake devices can also be
mixed. Since the fake flag is coarse, and does not specify fake audio or video,
we would previously just make everything fake. As loopback sets flags for video
and audio separately, we can now request a single loopback device, while also
setting the fake flag to get a mix. E.g. if we request a loopback audio device,
and set the fake flag, we should get loopback audio and fake video.

This change also attempts to somewhat consolidate where these settings take
place. Previously, EnumerateRawDevices did much of the loopback setup. However,
other steps around fingerprint resistance or fake devices were done in earlier
functions (EnumerateDevices and GetUserMedia). This changeset moves the loopback
setup so that it's more consolidated with the other setup code in these
functions.

MozReview-Commit-ID: FF0bR0Nyws9

--HG--
extra : rebase_source : 374a6fd0842a430e27c695bcf956e2e072a77fc3
2018-02-12 16:56:26 -05:00
Bryce Van Dyk
057cac41e3 Bug 1436523 - Add enum to specify select type of devices to enumerate in MediaManager rather than use bools. r=achronop
Prior to this patch various bools are used to track if we requst fake or
loopback devices during enumeration. However, since the normal, fake, and
loopback cases are mutually exclusive, a enum can be used. This provides allows
for having descriptive enum values in code and makes clear that the settings are
mutually exclusive.

MozReview-Commit-ID: FF0bR0Nyws9

--HG--
extra : rebase_source : 498513bdc6673fa299080097364a6d0dff00a073
2018-02-12 16:55:45 -05:00
Alex Chronopoulos
5cf2c64821 Bug 1431810 - Correct typo mistake in a webaudio test. r=kinetik
MozReview-Commit-ID: 45kAYeTAjaD

--HG--
extra : rebase_source : 101728377ed0e25e27184c2c25c4024b546decca
2018-03-28 14:14:46 +03:00
Alex Chronopoulos
321ec00151 Bug 1431810 - Test that opus phase inversion is disabled on mono output. r=kinetik
MozReview-Commit-ID: 4Q4E4MUF2iW

--HG--
extra : rebase_source : 91439572a6d58856d18188f56226d6b819763e71
2018-03-15 18:30:19 +02:00
Alex Chronopoulos
851a3ee589 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Tom Ritter
9f13fdcfce Bug 1449244 Remove SphinxBase r=drno
MozReview-Commit-ID: AIcwcWAa4nV

--HG--
extra : rebase_source : 26a1f1379595917c20f042abfa2fbb25c634a9db
2018-03-27 12:04:10 -05:00
Andreas Pehrson
7835856206 Bug 1447563 - Clear direct track listeners from TrackUnionStream during shutdown. r=padenot
MozReview-Commit-ID: 9PbpQpOaIIh

--HG--
extra : rebase_source : d37a941097e921de5b83753244ab1523b34157b8
2018-03-26 19:20:44 +02:00
Andreas Pehrson
a55204490f Bug 1447563 - Clear video outputs during shutdown. r=padenot
MozReview-Commit-ID: L1ZnhmxrPqa

--HG--
extra : rebase_source : b35a810559d4b5706c3cce5a42b58cf388246ba7
2018-03-26 14:58:06 +02:00
Dan Glastonbury
6835957d77 Bug 1446233 - P2: Add prefs to control audioipc client thread pool. r=kinetik
MozReview-Commit-ID: EZXfIxBRyG4

--HG--
extra : rebase_source : a0d903e0b64bb72e0dc70a3d9fccee0e9636ef56
2018-03-22 15:33:25 +10:00
Margareta Eliza Balazs
adebb06ac1 Merge inbound to mozilla-central. a=merge 2018-03-28 00:48:11 +03:00
Paul Adenot
ca8f68d641 Bug 1441509 - Start performing the analysis in test_seamless_looping.html after the second loop, to let things stabilize. r=karlt
MozReview-Commit-ID: 5FK30GNk4s5

--HG--
extra : rebase_source : a2963dba94f1ed78779ea9797c59813c08eb9ff1
2018-03-09 15:24:03 +01: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
Bryce Van Dyk
93937894aa Bug 1449178 - MediaEngineWebRTC now clears device indicies while updating before checking cubeb. r=padenot
Stop us potentially keeping a stale device list when updating if we can't get a
cubeb context.

MozReview-Commit-ID: H6GdeNXObWV

--HG--
extra : rebase_source : 48fce949627fa17402336db824374847e1b439e6
2018-03-26 14:14:47 -04:00
Bryce Van Dyk
5e0fc84a7a Bug 1447821 - Add logging to ADTSSampleConverter ctor. r=jya
Add logging to aid in debugging of our EME ADTS conversion path.

MozReview-Commit-ID: A7Wv8n31V8V

--HG--
extra : rebase_source : 13f20179aa29180047a37a127029d0e28a1c4f80
2018-03-26 14:29:31 -04:00
Bryce Van Dyk
dd07217b57 Bug 1447821 - Update EMEDecoderModule to handle profile values < 1. r=jya
Update EMEDecoderModule to use 2 as profile number when the given profile is
less than 1 or greater than 4. The CDM doesn't appear to care what values are
given, but 2 was chosen as a safe fallback per discussion on the bug. This
addresses the use case where 0 values are stored in mProfile due to the use of
extended profiles (which are then stored in the mExtendedProfile field).

MozReview-Commit-ID: 5XgabNDsgdf

--HG--
extra : rebase_source : dd66a872aaac2acf4af55f06d3c24f53debe4e63
2018-03-23 14:54:41 -04:00
Tom Ritter
889652f2a2 Bug 1448869 Turn off jitter for some other wbeaudio tests r=baku
MozReview-Commit-ID: GTrw5nJnuCw

--HG--
extra : rebase_source : 22f0ec56b8fd69a00b8ba42d81ec691f45c828fb
2018-03-26 14:17:13 -05:00
Jean-Yves Avenard
130acc845f Bug 1447124 - Use int64_t for SaferMultDiv. r=gerald
This prevent potential division by zero should the cast on the argument cause an overflow.
We still limit the mul and div arguments to INT64_MAX.

MozReview-Commit-ID: gHkv6m4zq0

--HG--
extra : rebase_source : 1c27f9a2ecc4c8bf6a763dedf2859e64bf79ea85
2018-03-27 11:27:08 +02:00
Christian Holler
bfd12285ac Bug 1446929 - Support audio files in media Benchmark class. r=jya
MozReview-Commit-ID: 3EWNM1F4loN

--HG--
extra : rebase_source : 3fe6df940d75772f048b2b65fd7af33c605cab56
2018-03-27 14:07:12 +02:00
Christian Holler
3f4a6d5f8d Bug 1446932 - Handle nullptr in FlacFrameParser::GetTags. r=jya
MozReview-Commit-ID: I50zXqUUD7x

--HG--
extra : rebase_source : d16c105d715af6b8f0dbfead2ad91cd3b8c149a6
2018-03-27 13:02:15 +02:00
Bogdan Tara
302a55b534 Merge inbound to mozilla-central. a=merge 2018-03-27 12:12:57 +03:00
Tom Ritter
c44b92e887 Bug 1446394 Turn off Time Jitter for test_audioParamSetTargetAtTimeZeroTimeConstant.html r=baku
Disable time jittering when comparing different AudioContexts because they might look
different.

MozReview-Commit-ID: A3neLqokQ5c

--HG--
extra : rebase_source : b275942db06d3bb8e80bdb6ed5f94299636d1a8f
2018-03-16 15:10:25 -05:00
Gurzau Raul
1368521911 Backed out 3 changesets (bug 1431810) for failing test_bug1431810_opus_downmix_to_mono.html on Windows
Backed out changeset a01c1941a829 (bug 1431810)
Backed out changeset 43eb1c01c67f (bug 1431810)
Backed out changeset 3fe9d85d684a (bug 1431810)
2018-03-26 12:09:42 +03:00
Alex Chronopoulos
82d85fa592 Bug 1431810 - Correct typo mistake in a webaudio test. r=kinetik
MozReview-Commit-ID: 64Y38ekJKda

--HG--
extra : rebase_source : 0a84291c2f4af5508cb9c46747044224a0ff401c
2018-03-23 20:04:40 +02:00
Alex Chronopoulos
0a753f3dbb Bug 1431810 - Test that opus phase inversion is disabled on mono output. r=kinetik
MozReview-Commit-ID: BUWZUrXmzz2

--HG--
extra : rebase_source : 083c61aa3d53ddbe206343224264579ec1762ee8
2018-03-15 18:30:19 +02:00
Alex Chronopoulos
85119eac26 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Ciure Andrei
d2b19e2ea2 Merge inbound to mozilla-central. a=merge 2018-03-25 00:38:44 +02:00
Jean-Yves Avenard
276fbcf9e9 Bug 1444479 - P11. Remove unused constant. r=padenot
MozReview-Commit-ID: JJ5vdecIlqy
2018-03-24 11:04:18 +01:00
Jean-Yves Avenard
45419290ff Bug 1444479 - P10. Don't reject files with more than 8 audio channels. r=padenot
MozReview-Commit-ID: 642RlRlHRv7
2018-03-24 10:58:02 +01:00
Jean-Yves Avenard
ebae2f1fac Bug 1444479 - P9. Remove WMF audio decoder channel limit. r=padenot
MozReview-Commit-ID: 4xj1Cd0ZzrA
2018-03-24 10:58:02 +01:00
Jean-Yves Avenard
48fb044530 Bug 1444479 - P8. Remove FFmpeg audio decoder channel limitation. r=padenot
MozReview-Commit-ID: JQWcOny5Tgd
2018-03-24 10:58:02 +01:00
Jean-Yves Avenard
5d750cff32 Bug 1444479 - P7. Allow Apple AudioToolbox decoder handle more than 8 channels. r=padenot
Apple layout standard has a 1:1 equivalence with the WAVE standard. As such, any streams under 18 channels, properly defining a channel layout, should play on all platform.
Otherwise, as Opus and Vorbis, the result will be platform dependent.

MozReview-Commit-ID: ID6b9u2UNQr
2018-03-24 10:58:01 +01:00
Jean-Yves Avenard
6edfbc05e3 Bug 1444479 - P6. Make Opus and Vorbis decoder deal with more channels than 8. r=padenot
Under 8 channels, the audio will be reordered so it can be playable on any platforms.
Over 8 channels, the channels will be as output by the decoder. Playing of such stream will be platform dependent as neither Opus nor Vorbis define a channel layout with more than 8 channels.

With WebAudio however, the result will be platform independent (as long as you don't attempt to play it)

MozReview-Commit-ID: 93ATiKm9y20
2018-03-24 10:58:01 +01:00
Jean-Yves Avenard
f15eea87d5 Bug 1444479 - P5. Let AudioSink deal with unknown layout. r=padenot
MozReview-Commit-ID: F31zNl5o9n1
2018-03-24 10:58:01 +01:00
Jean-Yves Avenard
adbf3514c6 Bug 1444479 - P4. Add new AudioConfig constructor. r=padenot
This will allow to create an AudioConfig with an unknown or unsupported channel layout, defaulting instead to the number of channels.

MozReview-Commit-ID: IonLuo9q2a5
2018-03-24 10:58:01 +01:00
Jean-Yves Avenard
52d5d366d4 Bug 1444479 - P3. Add Channels(ChannelMap) method. r=padenot
MozReview-Commit-ID: 9sYeh30NHFF
2018-03-24 10:58:00 +01:00
Jean-Yves Avenard
6f7668d056 Bug 1444479 - P2. Make AudioConverter works with unknown layout. r=padenot
If a channel layout is unsupported, the AudioConverter will instead just use the channel count information to leave the data as-is, only trimming extra channels, or inserting silence if needed.

MozReview-Commit-ID: CXOjcSRsRwI
2018-03-24 10:58:00 +01:00
Jean-Yves Avenard
d44cd705b3 Bug 1444479 - P1. Remove 8 channels limitation in AudioConfig. r=padenot
Instead we place it at 32.
Future changes will change the meaning of this limit to when we can deal with channel layout. If outside that limit the audio will be played on a best attempt basis.

MozReview-Commit-ID: EavmmcxjLI0
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
4680798728 Bug 1432779 - P7. Use typedef rather than actual type. r=padenot
this improve readability.

MozReview-Commit-ID: IYfrLMZ5djX
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
4e7b0b2695 Bug 1432779 - P5. Remove no longer used variables. r=padenot
MozReview-Commit-ID: LqOuM1F0NC2
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
87fa7068d5 Bug 1432779 - P4. Remove the concept of preferred layout. r=padenot,r=kamidphish
Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between.

So we remove it.

MozReview-Commit-ID: CSCAInNmzMS
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
5a631a5822 Bug 1432779 - P3. Properly set channel map layout after seeking. r=padenot
MozReview-Commit-ID: 5FY9hdaijhf
2018-03-24 10:57:58 +01:00
Jean-Yves Avenard
113a5cf5d7 Bug 1432779 - P1. Fix ChannelLayout calculation for uncommon layouts. r=padenot
MozReview-Commit-ID: Fi5ESBhziOp
2018-03-24 10:57:58 +01:00
Jean-Yves Avenard
57c6cc0428 Bug 1431221 - P14. Remove static layout definitions. r=padenot
That ChannelLayout uses an AutoTArray internally makes XPCOM report them as leaking when declared as static.

They weren't use outside of ChannelLayout anyway so they can be removed.

MozReview-Commit-ID: KVqdjzvL8pr
2018-03-24 10:57:57 +01:00
Jean-Yves Avenard
e766599866 Bug 1431221 - P13. Remove dual mono layout. r=padenot
It makes no sense to have a case for those as the data structure used (a bitmask) do not allow to represent this channel layout (a channel can only be present once). As such it was a non-functional layout

MozReview-Commit-ID: FjA0fojFcJp
2018-03-24 10:57:56 +01:00