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

18211 Коммитов

Автор SHA1 Сообщение Дата
Andreas Pehrson b8cbd64557 Bug 1651745 - Change MediaEngineSource::SetTrack to take a MediaTrack base class. r=padenot
This allows us to pass in different sub classes, which the next patch will do.

Differential Revision: https://phabricator.services.mozilla.com/D95933
2020-11-05 16:42:07 +00:00
Andreas Pehrson 3b3ae5f371 Bug 1651745 - Make channel count explicit for every audio MediaTrack. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D95932
2020-11-05 16:41:45 +00:00
Andreas Pehrson 7b6488e143 Bug 1651745 - Memoize the max channel count in AudioSegment::MaxChannelCount(). r=padenot
When an AudioCallbackDriver starts a fallback SystemClockDriver is running in
its stead. The AudioTrack getting fed data from the input stream of the driver
will get real data while the AudioCallbackDriver is running, and silence while
the fallback driver is running.

If the MediaStreamTrack representing the microphone source is part of a
MediaStream being played by an HTMLMediaElement; and another MediaStreamTrack
representing another source with a lower channel count than the microphone is
part of another MediaStream being played by another HTMLMediaElement; then:
1. We start the graph with the other source's output channel count, and a
   fallback driver.
2. Once the audio driver has started, it adds data at a higher channel count
   than the graph's to its MediaTrack. The driver switches audio driver to
   match the new channel count.
3. The new driver starts with a fallback driver, which adds silence to the
   track. Silence has no channel count, so the graph sees only the channel
   count of the other source and switches audio driver to match this.
4. Go to 1.

This patch fixes makes us memoize a previously returned max channel count for an
AudioSegment for use when there is only null data (e.g., silence) present in the
segment. This applies to step 3 above, where no audio driver would be switched
because the graph still sees the mic's channel count.

Differential Revision: https://phabricator.services.mozilla.com/D95931
2020-11-05 15:34:04 +00:00
Niklas Baumgardner ce9cac5aae Bug 1578985 - Saving the last location and size of Picture in Picture window and opening there the next time. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D90813
2020-11-05 17:24:57 +00:00
Byron Campen [:bwc] 483e62e592 Bug 1674140: Don't crash when we cannot dispatch to STS, since that can happen during shutdown. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D95565
2020-11-02 19:22:55 +00:00
Cosmin Sabou e280184fdb Backed out 3 changesets (bug 1660336) for bustages on wcontext_vaapi.h.
Backed out changeset bc879f517930 (bug 1660336)
Backed out changeset a1fce14ac3a8 (bug 1660336)
Backed out changeset 1d4f4423422a (bug 1660336)
2020-11-05 17:30:26 +02:00
Martin Stransky 1f6e564a5a Bug 1660336 Implement FFmpegLibWrapper::LinkVAAPILibs() to link VAAPI libraries and use at at FFmpegRuntimeLinker/FFVPXRuntimeLinker, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D90556
2020-11-05 14:42:55 +00:00
Martin Stransky f8229605f3 Bug 1660336 Implement DMABufSurfaceWrapper and VAAPIDisplayHolder as templates, r=jya
Implemented DMABufSurfaceWrapper and VAAPIDisplayHolder as a versioned class templates
as they are going to be used by both system ffmpeg and bundled ffvpx decoders.

Differential Revision: https://phabricator.services.mozilla.com/D90555
2020-11-05 14:42:17 +00:00
Paul Adenot f4d10e9a1d Bug 1669503 - Add various test cases for mp3 trimming. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D94470
2020-11-04 23:20:05 +00:00
Jean-Yves Avenard f8210c4ae7 Bug 1669503 - Handle mp3 encoder padding when the padding duration spans more than one packet. r=jya
We can't handle this at the decoder level, because the decoder doesn't know that
a particular packet it's seeing is the second to last packet and it should start
trimming the end of this packet because the encoder padding spans multiple
packet.

Differential Revision: https://phabricator.services.mozilla.com/D92645
2020-11-05 14:24:37 +00:00
smolnar c784367df9 Backed out 3 changesets (bug 1660336) for causing build bustages in vaapi. CLOSED TREE
Backed out changeset f53408903b5e (bug 1660336)
Backed out changeset 450b4f240ff5 (bug 1660336)
Backed out changeset 7694d9e2424b (bug 1660336)
2020-11-05 10:25:11 +02:00
Martin Stransky 84655dbdb1 Bug 1660336 Implement FFmpegLibWrapper::LinkVAAPILibs() to link VAAPI libraries and use at at FFmpegRuntimeLinker/FFVPXRuntimeLinker, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D90556
2020-11-05 07:38:26 +00:00
Martin Stransky 78ed8d65db Bug 1660336 Implement DMABufSurfaceWrapper and VAAPIDisplayHolder as templates, r=jya
Implemented DMABufSurfaceWrapper and VAAPIDisplayHolder as a versioned class templates
as they are going to be used by both system ffmpeg and bundled ffvpx decoders.

Differential Revision: https://phabricator.services.mozilla.com/D90555
2020-11-05 07:36:35 +00:00
alwu 0c0c2f3994 Bug 1674845 - part4 : add 'browser' subfolder for autoplay browser tests. r=bryce
subsuite media for browser tests.

Differential Revision: https://phabricator.services.mozilla.com/D95881
2020-11-05 06:15:07 +00:00
alwu 31f03aa534 Bug 1674845 - part3 : create 'mochitest' subfolder for autoplay related plain mochitests. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95880
2020-11-05 04:50:13 +00:00
alwu 35d0af6eef Bug 1674845 - part2 : create 'autoplay' subfolder and move related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95879
2020-11-05 04:50:11 +00:00
alwu 9fe8b678ad Bug 1674845 - part1 : use media utils's method to get shutdown barrier. r=bryce
We've already had a same method in media utils, so no need to keep this one. In addition, doing that can prevent the build ambiguous error when removing autoplay related files from `dom/media`.

Differential Revision: https://phabricator.services.mozilla.com/D95878
2020-11-05 04:50:16 +00:00
Dorel Luca d1d71a8e1a Backed out 4 changesets (bug 1674845) for Browser-chrome failures in toolkit/content/tests/browser/browser_findbar.js. CLOSED TREE
Backed out changeset 8f20a34998c6 (bug 1674845)
Backed out changeset 98b99d2dd52f (bug 1674845)
Backed out changeset 804d23738709 (bug 1674845)
Backed out changeset 64ca82a10039 (bug 1674845)
2020-11-05 06:47:47 +02:00
alwu af08036437 Bug 1674845 - part4 : add 'browser' subfolder for autoplay browser tests. r=bryce
subsuite media for browser tests.

Differential Revision: https://phabricator.services.mozilla.com/D95881
2020-11-05 02:44:39 +00:00
alwu 89a2733812 Bug 1674845 - part3 : create 'mochitest' subfolder for autoplay related plain mochitests. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95880
2020-11-04 21:31:04 +00:00
alwu 635563771a Bug 1674845 - part2 : create 'autoplay' subfolder and move related files. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D95879
2020-11-04 21:29:32 +00:00
alwu 0b3de2de6b Bug 1674845 - part1 : use media utils's method to get shutdown barrier. r=bryce
We've already had a same method in media utils, so no need to keep this one. In addition, doing that can prevent the build ambiguous error when removing autoplay related files from `dom/media`.

Differential Revision: https://phabricator.services.mozilla.com/D95878
2020-11-04 21:27:56 +00:00
John Lin 197e95a345 Bug 1640416 - p5: run WebrtcMediaDataEncoder and the platform encoder in different thread pools/task queues. r=alwu
Some WebrtcMediaDataEncoder methods are blocking and wait for platform encoder
operations to complete. Running them in one thread pool/task queue will lead
to dead lock.

Differential Revision: https://phabricator.services.mozilla.com/D94464
2020-11-04 21:57:40 +00:00
John Lin 8df836d803 Bug 1640416 - p4: use assignment operator rather than Maybe::emplace(). r=alwu
Calling emplace() on instance with existing value will cause assertion.
Since Error() can be called multiple times, assignment operator is the correct way.

Differential Revision: https://phabricator.services.mozilla.com/D94463
2020-11-04 21:57:38 +00:00
John Lin 5a219579ad Bug 1640416 - p3: add test cases for video encoder config size. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D94462
2020-11-05 01:30:31 +00:00
John Lin 242224eb4b Bug 1640416 - p2: sanity-check video encoder config size arguements. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D94510
2020-11-04 21:57:41 +00:00
Bryce Seager van Dyk 7ff2156750 Bug 1674153 - Remove MacOS snow leopard specific checking from test_can_play_type_mpeg.html. r=jbauman
Differential Revision: https://phabricator.services.mozilla.com/D95173
2020-10-30 23:17:22 +00:00
Sylvestre Ledru fde06f6d21 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Paul Adenot d28e2502ea Bug 1675042 - Put IR camera last in the device selection list, so that they are never the default. r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D95764
2020-11-04 13:03:51 +00:00
Butkovits Atila 964cca3198 Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE 2020-11-04 10:54:36 +02:00
Sylvestre Ledru 5f29324f60 Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
Also add some missing namespace qualifications

Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')

Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Jean-Yves Avenard c938c7416c Bug 1674043 - P6. Remove sync PDecoderMananger::Supports API. r=mattwoodrow,bryce,mjf,ipc-reviewers,nika
In bug 1595994 we attempted to streamline the ability to determine which decoder was available regardless of the process they would be running in. This was subsequently done via the PDMFactory.

As there are several JS API that can query which codec are supported, it requires a synchronous mechanism.
This allowed to make a determination during the PlatformDecoderModule::Supports call, depending on which process it was going to be called frome.

Having a synchronous IPC call to the RemoteDecoderManagerParent has too many caveats to be workable.
So what we do instead is first determine at launch if the required external framework are available and pass this information to each content process.

When checking if a decoder is available, we make a best guess at determining if the PDM would support such codec, without actually loading such framework when running in the content process.

Supports can no longer make a decision based on the process currently running and as such PDM::CreateAudio/VideoDecoder using an optional system framework now need to further check the validity of the CreateDecoderParam argument.

Differential Revision: https://phabricator.services.mozilla.com/D95245
2020-11-04 02:22:33 +00:00
Jean-Yves Avenard 4f1c319c0f Bug 1674043 - P3. Early reject AV1 in mp4 decoding if decoder is turned off. r=bryce
There's no need to start the whole PDMFactory machinery if we know it's already disabled.

Additionally, fix tests making assumptions on the changes above.
Flyby fix for flac tests.

Differential Revision: https://phabricator.services.mozilla.com/D95242
2020-11-02 15:46:57 +00:00
Jean-Yves Avenard c3e5ef4c00 Bug 1674043 - P1. Call PDMFactory::Support off the main thread. r=bryce
In a coming change, when called on the main thread Supports will be made to return a true/false based on only the codec mimetype. We need a greater level of details with MediaCapabilities.

Differential Revision: https://phabricator.services.mozilla.com/D95240
2020-10-30 16:57:50 +00:00
Matt Woodrow 726340ba67 Bug 1674878 - Expose more detailed WR backend information to TextureFactoryIdentifier. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D95588
2020-11-03 18:24:43 +00:00
Narcis Beleuzu 2b1c46b35c Backed out 3 changesets (bug 1673007) for MinGW bustages on WMFDecoderModule.cpp
Backed out changeset 707208ad26de (bug 1673007)
Backed out changeset 3e4e0172f644 (bug 1673007)
Backed out changeset 31531b427014 (bug 1673007)
2020-11-02 19:40:50 +02:00
Bryce Seager van Dyk 5df76a7a34 Bug 1673007 - Add profiler markers for events that may lead to decoder recreation. r=alwu
This patch adds profiler markers to surface when
- The MediaFormatReader detects a change in stream id.
- The MediaChangeMonitor classes for h264 and/or vpx detect a stream change.

These scenarios typically take place before a decoder is recreated.

Because recreating a decoder is a non-trivial process that can fail and/or
result in performance issues, having these markers helps us relate such issues
to decoder recreation in profiles.

Differential Revision: https://phabricator.services.mozilla.com/D94621
2020-10-29 15:15:46 +00:00
Bryce Seager van Dyk e4f760ebed Bug 1673007 - Add markers and logs for when we Init the WMFDecoderModule. r=alwu
We aggressively log and mark here to help diagnose hard to nail down problems
with hardware decoding.

Differential Revision: https://phabricator.services.mozilla.com/D94619
2020-10-30 16:19:16 +00:00
Bryce Seager van Dyk 513b26f115 Bug 1673007 - Undef WMFAudioMFTManager's LOG macro at end of file. r=alwu
This stops the log leaking into other files during the unified build this is
desirable to avoid
- Other files relying on this log macro and then breaking when unified build
  boundaries shift.
- Other files getting this LOG definition unexpectedly and logging incorrectly
  and/or emitting warnings due to macro redefinitions.

Differential Revision: https://phabricator.services.mozilla.com/D94743
2020-10-30 13:33:28 +00:00
Michael Froman 14eb66956d Bug 1674463 - allow HD simulcast stream to start a bit earlier. r=ng
Changing the min bitrate from 600k to 200k to allow the HD stream to stay
on more consistently.

Differential Revision: https://phabricator.services.mozilla.com/D95378
2020-10-30 21:44:54 +00:00
alwu d87f6fb19c Bug 1673521 - move all browser tests into browser folder in order to adopt browser-test eslint setting automatically. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D94872
2020-10-29 19:32:26 +00:00
Razvan Maries 30f21fe657 Backed out changeset f1c833a3cffb (bug 1673521) for Gecko Decision Task bustage. CLOSED TREE 2020-10-29 21:25:52 +02:00
alwu d4db5c9d04 Bug 1673521 - move all browser tests into browser folder in order to adopt browser-test eslint setting automatically. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D94872
2020-10-29 19:06:44 +00:00
Andi-Bogdan Postelnicu adc9f3324c Bug 1626555 - Add `dom/media/` to the list of non-unified-build-compatible directories. r=sg
Depends on D95056

Differential Revision: https://phabricator.services.mozilla.com/D95057
2020-10-29 08:56:37 +00:00
Andi-Bogdan Postelnicu bbf4de2003 Bug 1671641 - Make `dom/media/webspeech` buildable outside of `unified-build` environment. r=sg
Depends on D95054

Differential Revision: https://phabricator.services.mozilla.com/D95055
2020-10-29 08:55:58 +00:00
Andi-Bogdan Postelnicu 2873f0158b Bug 1671641 - Make `dom/media/webrtc` buildable outside of `unified-build` environment. r=sg
Depends on D95041

Differential Revision: https://phabricator.services.mozilla.com/D95054
2020-10-29 08:55:41 +00:00
Andi-Bogdan Postelnicu ea26376de0 Bug 1671641 - Make `dom/media/webm` buildable outside of `unified-build` environment. r=sg
Depends on D95040

Differential Revision: https://phabricator.services.mozilla.com/D95041
2020-10-29 08:54:14 +00:00
Andi-Bogdan Postelnicu fbd830522f Bug 1671641 - Make `dom/media/webaudio` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D95040
2020-10-29 11:05:41 +00:00
Christian Holler af22893a9b Bug 1672869 - Disable WebAudio OOM test for sanitizers. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D95052
2020-10-29 09:48:09 +00:00
Andi-Bogdan Postelnicu f159f49029 Bug 1671641 - Make `dom/media/systemservices` buildable outside of `unified-build` environment. r=sg
Depends on D95028

Differential Revision: https://phabricator.services.mozilla.com/D95038
2020-10-29 08:51:44 +00:00