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

19354 Коммитов

Автор SHA1 Сообщение Дата
Jeff Gilbert 5c14187731 Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-24 23:43:31 +00:00
Alexandre Lissy bedf0db47d Bug 1054621 - Add GMPlugin Sandbox Tests r=handyman,bryce
Differential Revision: https://phabricator.services.mozilla.com/D117533
2021-06-24 06:51:24 +00:00
Alexandre Lissy 426e10f0e2 Bug 1652156 - Add RDD Process Testing to the Sandbox Testing Framework. r=handyman,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D116894
2021-06-24 06:51:24 +00:00
alwu c58e38d420 Bug 1716474 - remove the assertion for checking whether `aTimeThreshold` is zero or positive. r=bryce
Reader proxy will adjust the time threshold [1] based on the media's start time that is retrieved from metadata, which is possible to be negative. Eg. [2]

Therefore, we should remove that assetion.

[1] https://searchfox.org/mozilla-central/rev/308ea44d0d60b391b031ccee695920bd543f7d2f/dom/media/ReaderProxy.cpp#75-77

[2] https://searchfox.org/mozilla-central/rev/308ea44d0d60b391b031ccee695920bd543f7d2f/dom/media/autoplay/test/mochitest/AutoplayTestUtils.js#7

Differential Revision: https://phabricator.services.mozilla.com/D118403
2021-06-23 20:31:13 +00:00
alwu c88ed9264e Bug 1717119 - part2 - only store more video frames than usual for 4k+ video. r=bryce
For lower resolution videos, we should be able to decode them well without storing too many video frames. So let's keep this mechanism for 4k+ video only.

Differential Revision: https://phabricator.services.mozilla.com/D118402
2021-06-23 20:31:13 +00:00
alwu d84fa5b7ab Bug 1717119 - part1 : improve the readability of the check. r=bryce
Improve the readability of the check and remove the next key frame check for the internal seek target because it's not related.

Differential Revision: https://phabricator.services.mozilla.com/D118401
2021-06-23 20:31:12 +00:00
Chun-Min Chang 54e5af0ed9 Bug 1716248 - Change AppendAndConsumeChunk's input parameter type r=padenot
It's better to change the input parameter's type of
`AppendAndConsumeChunk` from `AudioChunk*` to `AudioChunk&&` since the
`AudioChunk` will be consumed once it's fed to this function.

One benefit for doing so is to prevent the consumed `AudioChunk` from
being used again after it's moved/consumed. Gecko has a clang-tidy
check, bugprone-use-after-move [1], to avoid this kind of error. We
should utilize this check instead of catching used-after-move error by
human eyes.

[1]: https://searchfox.org/mozilla-central/rev/f351e19360729b351bfc7c1386d6e4ca4ea676e2/tools/clang-tidy/config.yaml#70

Differential Revision: https://phabricator.services.mozilla.com/D117714
2021-06-23 00:24:16 +00:00
Nika Layzell 7802bbb486 Bug 1706374 - Part 12b: Use NodeController for primary process channels, r=handyman
This extends on the changes in part 12a and consumes the new PortRef-based API
in all existing process types other than the fork server. The IPDL C++ unit
tests were already broken before this change, and were not updated.

Differential Revision: https://phabricator.services.mozilla.com/D112777
2021-06-22 18:17:23 +00:00
Mike Hommey 744db845c6 Bug 1700534 - Coalesce RLBox wasmboxed libraries. r=firefox-build-system-reviewers,shravanrn,bholley,andi,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D116440
2021-06-22 05:31:33 +00:00
Butkovits Atila 83f57b5c69 Backed out 22 changesets (bug 1714226, bug 1706374, bug 1713148) for causing build bustages on MessageChannel.cpp. CLOSED TREE
Backed out changeset ea469eaa54ca (bug 1713148)
Backed out changeset fd8523d5126e (bug 1713148)
Backed out changeset f2e5309c914c (bug 1713148)
Backed out changeset 2da57973ed55 (bug 1713148)
Backed out changeset 677e1ee99bb2 (bug 1713148)
Backed out changeset b4c0619e79bf (bug 1706374)
Backed out changeset c02fa459e77d (bug 1706374)
Backed out changeset 72dc6537cf0b (bug 1706374)
Backed out changeset 48088463c656 (bug 1706374)
Backed out changeset b09ae4c3a94b (bug 1706374)
Backed out changeset 04422175004b (bug 1706374)
Backed out changeset 110b2384e7d1 (bug 1706374)
Backed out changeset ab2b086abbd4 (bug 1706374)
Backed out changeset ffde07f73249 (bug 1706374)
Backed out changeset c6303af17ff4 (bug 1706374)
Backed out changeset 02249671c2f9 (bug 1706374)
Backed out changeset a6a5d05b5636 (bug 1706374)
Backed out changeset e21b6defb805 (bug 1706374)
Backed out changeset c72c5be9ddb1 (bug 1706374)
Backed out changeset 23cd961575a6 (bug 1706374)
Backed out changeset b412d6e9e145 (bug 1706374)
Backed out changeset a8ec285d6472 (bug 1714226)
2021-06-22 04:03:56 +03:00
Butkovits Atila 7f57e645d9 Backed out changeset da97faf315ee (bug 1716248) for causing Gtest failures. CLOSED TREE 2021-06-22 01:46:58 +03:00
Nika Layzell 1d4aba6770 Bug 1706374 - Part 12b: Use NodeController for primary process channels, r=handyman
This extends on the changes in part 12a and consumes the new PortRef-based API
in all existing process types other than the fork server. The IPDL C++ unit
tests were already broken before this change, and were not updated.

Differential Revision: https://phabricator.services.mozilla.com/D112777
2021-06-21 21:53:11 +00:00
Chun-Min Chang 757215321c Bug 1716248 - Change AppendAndConsumeChunk's input parameter type r=padenot
It's better to change the input parameter's type of
`AppendAndConsumeChunk` from `AudioChunk*` to `AudioChunk&&` since the
`AudioChunk` will be consumed once it's fed to this function.

One benefit for doing so is to prevent the consumed `AudioChunk` from
being used again after it's moved/consumed. Gecko has a clang-tidy
check, bugprone-use-after-move [1], to avoid this kind of error. We
should utilize this check instead of catching used-after-move error by
human eyes.

Differential Revision: https://phabricator.services.mozilla.com/D117714
2021-06-21 21:50:45 +00:00
Paul Adenot a07a3b3977 Bug 1714303 - Remove WEBRTC_DTLS_PROTOCOL_VERSION. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D117435
2021-06-21 15:36:24 +00:00
Paul Adenot d063060526 Bug 1714303 - Remove the probe about chained ogg. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D116698
2021-06-21 15:36:23 +00:00
Alexandru Michis 3477ca89c8 Backed out changeset f7016db57a2e (bug 1459526) for causing reftest failures.
CLOSED TREE
2021-06-18 07:49:06 +03:00
Jeff Gilbert 920429087b Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-17 23:43:34 +00:00
Byron Campen [:bwc] 9b0a5b2020 Bug 1713300: Extend this timeout even more to give Windows aarch64 more time. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D117697
2021-06-17 07:18:18 +00:00
Butkovits Atila 367d829107 Backed out changeset 318f32313091 (bug 1459526) for causing wrench bustages. CLOSED TREE 2021-06-17 04:45:11 +03:00
Jeff Gilbert 72024fcc23 Bug 1459526 - Handle full-range video in Webrender. r=gw,lsalzman
+ Begin to add video tests to ensure we ratchet towards correctness.
+ Test rec709 x (yuv420p, yuv420p10, gbrp) x (tv, pc) x codecs.
+ Just mark fuzziness for now. Better would be e.g. 16_127_233 'bad
  references'.

Differential Revision: https://phabricator.services.mozilla.com/D115298
2021-06-17 01:12:18 +00:00
R. Martinho Fernandes 60eca13626 Bug 1714630 - Fix broken call to rememberValidityOverride in exceptionDialog r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D117300
2021-06-16 22:11:03 +00:00
stransky 4ea1126264 Bug 1715365 [Linux] Move DMABuf video frames allocation from FFmpegVideoFramePool to FFmpegDataDecoder, r=alwu
- Replace DMABufSurfaceWrapper array by FFmpegVideoFramePool and create it only when DMABuf/VA-API is used.
- Use FFmpegVideoFramePool to allocate/recycle video frames backed by DMABuf surfaces.
- Enable SW decoding to DMABuf surfaces only when VA-API is enabled to avoid potential breakage (keep recent state).
- Disable VA-API / DMABuf decoding when WebRender is not used.
- Remove DMABufSurfaceWrapper class.

Depends on D117222

Differential Revision: https://phabricator.services.mozilla.com/D117223
2021-06-16 20:14:26 +00:00
stransky 900c23dd13 Bug 1715365 [Linux] Implement FFmpegVideoFramePool class to allocate and recycle DMABuf video frames, r=alwu
- Implement abstract class for video frames named VideoFrameSurface
- Implement VideoFrameSurfaceDMABuf class for video frames uploaded to DMABuf memory from SW decoding.
- Implement VideoFrameSurfaceVAAPI class for video frames decoded by VA-API.
- Implement VideoFramePool to create and recycle video frames.

Depends on D117221

Differential Revision: https://phabricator.services.mozilla.com/D117222
2021-06-16 20:14:25 +00:00
stransky 0f4a2660f0 Bug 1715365 [Linux] Polish FFmpegVideoDecoder VA-API code, r=alwu
- Split VA-API / DMABuf video images decoding to CreateImageDMABuf() and CreateImageVAAPI(). CreateImageVAAPI() is used for VA-API only and CreateImageDMABuf() for images decoded by SW and uploaded to DMABuf.
- Implement FFmpegVideoDecoder::InitHWDecodingPrefs() where VA-API related prefereces are processed.
- Change mDisableHardwareDecoding to mEnableHardwareDecoding for better readability.
- Implement nsDMABufDevice::IsDMABufVideoEnabled() to explicitly configure dmabuf texture setup.
- Remove unused AllocateYUV420PVideoBuffer() prototype.

Differential Revision: https://phabricator.services.mozilla.com/D117220
2021-06-16 20:14:25 +00:00
Landry Breuil 1eab017fb6 Bug 1713745 - Sandbox the RDD process on OpenBSD r=gcp
As it's done on windows, preload libmozavcodec.so and libmozavutil.so
before sandboxing, this way this allows for a tighter sandboxing
(no filesystem access but /tmp for shm files, no prot_exec pledge..)

Depends on D116634

Differential Revision: https://phabricator.services.mozilla.com/D116635
2021-06-16 09:26:11 +00:00
Sebastian Hengst c6d5e82a83 Backed out 4 changesets (bug 1715365) for cpp(non-unified) bustage in FFmpegVideoFramePool.h. CLOSED TREE
Backed out changeset d6f7f2c7a16c (bug 1715365)
Backed out changeset ce4482aedcfc (bug 1715365)
Backed out changeset b98c57e8a5b5 (bug 1715365)
Backed out changeset 9cca273b243a (bug 1715365)
2021-06-15 11:22:05 +02:00
stransky 8af94c89dd Bug 1715365 [Linux] Move DMABuf video frames allocation from FFmpegVideoFramePool to FFmpegDataDecoder, r=alwu
- Replace DMABufSurfaceWrapper array by FFmpegVideoFramePool and create it only when DMABuf/VA-API is used.
- Use FFmpegVideoFramePool to allocate/recycle video frames backed by DMABuf surfaces.
- Enable SW decoding to DMABuf surfaces only when VA-API is enabled to avoid potential breakage (keep recent state).
- Disable VA-API / DMABuf decoding when WebRender is not used.
- Remove DMABufSurfaceWrapper class.

Differential Revision: https://phabricator.services.mozilla.com/D117223
2021-06-15 06:08:48 +00:00
stransky 2d8912ada7 Bug 1715365 [Linux] Implement FFmpegVideoFramePool class to allocate and recycle DMABuf video frames, r=alwu
- Implement abstract class for video frames named VideoFrameSurface
- Implement VideoFrameSurfaceDMABuf class for video frames uploaded to DMABuf memory from SW decoding.
- Implement VideoFrameSurfaceVAAPI class for video frames decoded by VA-API.
- Implement VideoFramePool to create and recycle video frames.

Depends on D117221

Differential Revision: https://phabricator.services.mozilla.com/D117222
2021-06-15 06:08:48 +00:00
stransky 45203bce39 Bug 1715365 [Linux] Polish FFmpegVideoDecoder VA-API code, r=alwu
- Split VA-API / DMABuf video images decoding to CreateImageDMABuf() and CreateImageVAAPI(). CreateImageVAAPI() is used for VA-API only and CreateImageDMABuf() for images decoded by SW and uploaded to DMABuf.
- Implement FFmpegVideoDecoder::InitHWDecodingPrefs() where VA-API related prefereces are processed.
- Change mDisableHardwareDecoding to mEnableHardwareDecoding for better readability.
- Implement nsDMABufDevice::IsDMABufVideoEnabled() to explicitly configure dmabuf texture setup.
- Remove unused AllocateYUV420PVideoBuffer() prototype.

Differential Revision: https://phabricator.services.mozilla.com/D117220
2021-06-15 06:08:47 +00:00
alwu 97b2a661fb Bug 1692881 - part2 : keep decoded video has at least same amount of duration as decoded audio data. r=bryce
MDSM will stop decoding video when it reaches the certain amount of frames, but that will not work well if the video decoding is way too slow than the audio decoding.

In that situation, video should keep decoding as much as possible, in order to catch up with the audio decoding.

But we also don't need to decode video without any constraint, set the duration of decoded video to at least as the same as the decoded audio seems fair and enough.

Differential Revision: https://phabricator.services.mozilla.com/D117243
2021-06-14 22:31:51 +00:00
alwu a342363d48 Bug 1692881 - part1 : let MDSM detect whether the video decoding is too slow and force to request the next key frame. r=bryce
If the decoded video MDSM received is already late, then it indicates that video decoding is too slow.

If we keep decoding but in the same speed, it's very likely all following decoded videos would still be behind the clock and need to be discarded.

The reader has its own mechanism to seek to the next keyframe, but that will only happen when the time of next keyframe is behind the given time threshold, which is the current time.

When the video has pretty long keyframe interval (eg. 5s), then that mechanism won't be triggered because the even if the decoded video frames are late, the next keyframe still far exceeds the current time, so the reader doesn't think it's necessary to skip.

Therefore, MDSM should force the reader to seek to the next keyframe directly, because it know both the decoded time of video frames and the current playback time.

Differential Revision: https://phabricator.services.mozilla.com/D117242
2021-06-14 22:31:50 +00:00
Aaron Klotz bacaa5246b Bug 1707954: Part 4 - Build fixes to reflect EnsureMTA changes; r=Jamie
Now that we always have an MTA active, we don't need to explicitly try to
start it anymore. These locations in our source were doing so, which is now
not only redundant, but fails (since `EnsureMTA`'s default constructor is now
`private`).

We also fix a spot in `JumpListBuilder` where we need a lambda to capture by
reference to fix a static analysis issue.

Differential Revision: https://phabricator.services.mozilla.com/D113563
2021-06-14 21:53:19 +00:00
Bryce Seager van Dyk f4617e8f88 Bug 1715617 - Remove TestParser.cpp:TestFileData::mHeader. r=jbauman,kinetik
As far a I can tell, mValidMoof does the same job as mHeader and has a clearer
name. Let's just remove mHeader and make the tests a little simpler. Longer
discussion below about why we may want to separate the flags, but I'm fairly
confident that it does not apply to our current tests.

Hypothetically it may make sense to separate these flags. mValidMoof is checked
against RebuildFragmentedIndex, while mHeader is checking if the moof parser has
at least one moof. If we RebuildFragmentedIndex once and it returns true, that
implies we have a least one moof. That is the state of all our current tests
IIUC. So there is no need to have separate flags. However, if we call
RebuildFragmentedIndex multiple times, and it succeeds, then fails, and we don't
evict moofs, then we could have times where the parser still has moofs stored
internally, even if we have a failed Rebuild. But we're not doing that as far as
I can tell in these tests.

Differential Revision: https://phabricator.services.mozilla.com/D117351
2021-06-14 17:09:41 +00:00
Marian-Vasile Laza 5c483b46df Backed out 4 changesets (bug 1707954) for causing bc failures in ClearOnShutdown.cpp.
CLOSED TREE

Backed out changeset 7cb0db27236c (bug 1707954)
Backed out changeset fd52d202d10b (bug 1707954)
Backed out changeset 55586d8f7bf4 (bug 1707954)
Backed out changeset 49406bdac5ec (bug 1707954)
2021-06-10 09:13:45 +03:00
Aaron Klotz ab34bfc22f Bug 1707954: Part 4 - Build fixes to reflect EnsureMTA changes; r=Jamie
Now that we always have an MTA active, we don't need to explicitly try to
start it anymore. These locations in our source were doing so, which is now
not only redundant, but fails (since `EnsureMTA`'s default constructor is now
`private`).

We also fix a spot in `JumpListBuilder` where we need a lambda to capture by
reference to fix a static analysis issue.

Differential Revision: https://phabricator.services.mozilla.com/D113563
2021-06-09 21:38:15 +00:00
Noemi Erli 90b8bc9a03 Backed out 4 changesets (bug 1707954) for causing bustages in rules.mk CLOSED TREE
Backed out changeset fa23f9293250 (bug 1707954)
Backed out changeset e1b37839487b (bug 1707954)
Backed out changeset f72b810472fd (bug 1707954)
Backed out changeset fb4829011104 (bug 1707954)
2021-06-10 00:29:29 +03:00
Aaron Klotz 3dccb2d4b4 Bug 1707954: Part 4 - Build fixes to reflect EnsureMTA changes; r=Jamie
Now that we always have an MTA active, we don't need to explicitly try to
start it anymore. These locations in our source were doing so, which is now
not only redundant, but fails (since `EnsureMTA`'s default constructor is now
`private`).

We also fix a spot in `JumpListBuilder` where we need a lambda to capture by
reference to fix a static analysis issue.

Differential Revision: https://phabricator.services.mozilla.com/D113563
2021-06-09 20:28:06 +00:00
Bryce Seager van Dyk 1e01a194c0 Bug 1714125 - Use an int count instead of bools to detect multiple crypto entries. r=jbauman
Also add a TODO to rework telemetry gathering as part of broader mp4 parsing
reworks.

Differential Revision: https://phabricator.services.mozilla.com/D117165
2021-06-09 18:04:54 +00:00
Bryce Seager van Dyk 8ef323feff Bug 1714125 - Don't reject mp4s that have more than one sample description entry with crypto. r=jbauman
We don't need to explicitly reject such files, we can try to play them, and
provided the sample description entires specify the same crypto data, we should
be fine. However, if different entries use different crypto, we will likely run
into problems.

This patch fixes the blanket rejecting and lets us handle cases where the crypto
in each entry matches. Bug 1714626 tracks handling different crypto data. FWIW I
have never seen different crypto per sample description entry, and handling that
is a much bigger task, so this patch doesn't seek to do so.

Differential Revision: https://phabricator.services.mozilla.com/D116873
2021-06-09 18:04:53 +00:00
Bryce Seager van Dyk 68e04f7648 Bug 1714125 - Add multiple sample descriptions with crypto testcase to mp4 parser gtests. r=jbauman
Add an init segment with 2 sample description entries, each with crypto data, to
the mp4 parser gtests.

3 test cases are updated:
- We ensure the init data parses with expected results as part of our general
  'does this header parse, and with what result' style test.
- We ensure expected telemetry data is gather as part of our specialized
  telemetry tests. Specifically, this adds coverage to the previously uncovered
  multiple sample description entries with crypto case.
- We relax the expectation that encrypted files we parse with the MoofParser
  will only have one encrypted sample description entry. We now expect these
  files to have at least one encrypted entry.

Note the test case has the same crypto info in both entires, so these tests do
not cover the case where we need to handle different crypto info per sample
description.

Differential Revision: https://phabricator.services.mozilla.com/D117052
2021-06-09 18:04:53 +00:00
Paul Adenot 2d34adb510 Bug 1714577 - Part 9 - Video capture code also has tracing macros. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D116846
2021-06-09 15:43:40 +00:00
Nika Layzell 1aaeb179e2 Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Dorel Luca b453edf851 Backed out 3 changesets (bug 1714125) for Gtest failures in MoofParser.test_case_mp4. CLOSED TREE
Backed out changeset 33fe5ea6200d (bug 1714125)
Backed out changeset 07c910af0750 (bug 1714125)
Backed out changeset 0ed3355e9f7d (bug 1714125)
2021-06-09 00:15:54 +03:00
Bryce Seager van Dyk eee0d36dc7 Bug 1714125 - Use an int count instead of bools to detect multiple crypto entries. r=jbauman
Also add a TODO to rework telemetry gathering as part of broader mp4 parsing
reworks.

Differential Revision: https://phabricator.services.mozilla.com/D117165
2021-06-08 20:05:16 +00:00
Bryce Seager van Dyk 2a458d9200 Bug 1714125 - Don't reject mp4s that have more than one sample description entry with crypto. r=jbauman
We don't need to explicitly reject such files, we can try to play them, and
provided the sample description entires specify the same crypto data, we should
be fine. However, if different entries use different crypto, we will likely run
into problems.

This patch fixes the blanket rejecting and lets us handle cases where the crypto
in each entry matches. Bug 1714626 tracks handling different crypto data. FWIW I
have never seen different crypto per sample description entry, and handling that
is a much bigger task, so this patch doesn't seek to do so.

Differential Revision: https://phabricator.services.mozilla.com/D116873
2021-06-08 20:05:15 +00:00
Bryce Seager van Dyk 8e01323510 Bug 1714125 - Add multiple sample descriptions with crypto testcase to mp4 parser gtests. r=jbauman
Add an init segment with 2 sample description entries, each with crypto data, to
the mp4 parser gtests.

2 test cases are updated:
- We ensure the init data parses with expected results as part of our general
  'does this header parse, and with what result' style test.
- We ensure expected telemetry data is gather as part of our specialized
  telemetry tests. Specifically, this adds coverage to the previously uncovered
  multiple sample description entries with crypto case.

Note the test case has the same crypto info in both entires, so these tests do
not cover the case where we need to handle different crypto info per sample
description.

Differential Revision: https://phabricator.services.mozilla.com/D117052
2021-06-08 20:05:15 +00:00
Karl Tomlinson 3659b7feb2 Bug 1712898 detect selectAudioOutput() NotFoundError case in content process r=jib
Differential Revision: https://phabricator.services.mozilla.com/D116794
2021-06-08 01:24:37 +00:00
Chun-Min Chang 0a9065018a Bug 1702646 - Add an util-function to append interleaved buffer in AudioSegment r=padenot
Add an utility function named AppendFromInterleavedBuffer in
AudioSegment to append data from the given interleaved buffer. This
function does the same job as what AudioInputProcessing::InsertInGraph
and NativeInputTrack::ProcessInput were used to do. As a result, these
two functions can be eliminated or simplified.

Depends on D116673

Differential Revision: https://phabricator.services.mozilla.com/D116674
2021-06-08 00:48:21 +00:00
Chun-Min Chang d2f2ea20bb Bug 1702646 - Fix TestAudioInputProcessing tests r=padenot
The AudioInputProcessing now needs to call ProcessInput to process the
given input data instead of processing them in NotifyInputData

Differential Revision: https://phabricator.services.mozilla.com/D116673
2021-06-08 00:48:20 +00:00
Chun-Min Chang c95e8979b6 Bug 1702646 - Share AudioSegments among AudioInputTrack r=padenot
Each AudioInputTrack has its own AudioSegments storing the input audio
data. When the AudioInputTrack is in pass-through mode, the AudioSegment
is just the data de-interleaved from its raw data, without any audio
processing magic applied on it. If there are multiple AudioInputTracks
in pass-through mode exist in the same graph, then all of their
AudioSegments are same.

Before this patch, each of these AudioInputTracks allocates its own
space to store its own AudioSegments even those data are same. This
patch makes it possible for these AudioInputTracks to share the same
AudioSegment data they need. By creating the AudioSegment in the
NativeInputTrack, which is mapped to one specific device and is
connected to the AudioInputTrack, the AudioInputTrack can fetch the
AudioSegment data when they need and then append shared-references of
the AudioChunk, inside the fetched AudioSegment, into their own
AudioSegment. Therefore, we can have some AudioChunks created by the
NativeInputTrack and shared among the AudioInputTracks in pass-through
mode.

Differential Revision: https://phabricator.services.mozilla.com/D114801
2021-06-08 00:48:20 +00:00
Chun-Min Chang 1f72372ece Bug 1702646 - Process audio input in ProcessInput r=padenot
Instead of receiving and processing audio input data in
AudioInputProcessing::NotifyInputData, we can get the audio input data
from the connected source via the MediaInputPort and process it in
AudioInputTrack::ProcessInput

Differential Revision: https://phabricator.services.mozilla.com/D114807
2021-06-08 00:48:19 +00:00
Chun-Min Chang 81d623f7fc Bug 1702646 - Use NativeInputTrack to deliver audio data r=padenot
- Create a NativeInputTrack that is managed by main-thread in MTG
- Replace mInputDeviceUsers by a <device-id, NativeInputTrack> map

Differential Revision: https://phabricator.services.mozilla.com/D113680
2021-06-08 00:48:19 +00:00
Byron Campen [:bwc] 6c04a617e5 Bug 1713300: Extend this timeout to give Windows aarch64 more time. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D116835
2021-06-07 23:12:53 +00:00
Byron Campen [:bwc] 3c72164705 Bug 1713239: Disable the tests that use the ICE server on test-verify. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D116717
2021-06-04 13:12:34 +00:00
Andreea Pavel 895d0d41a3 Bug 1634684 - disable test_peerConnection_videoRenegotiationInactiveAnswer.html on linux-qr debug r=intermittent-reviewers,bhearsum DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D116540
2021-06-04 05:59:36 +00:00
alwu 85a74c965b Bug 1517199 - part6 : add A/V sync test case for changing playback rate dynamically. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D116285
2021-06-02 16:39:03 +00:00
alwu 1ecb5dfaf2 Bug 1517199 - part5 : handle the playback rate change on video track and add crash test. r=padenot
When we adjust the playback rate on the audio track, the audio clock time would be no longer align with the graph time.

Eg. playback rate=2, when the graph time passes 10s, the audio clock time actually already goes forward 20s.

After audio track ended, the video track would start to drive the clock time but the video clock time is align with the graph time, which means it would be smaller than the audio clock in that situation.

Therefore, we have to ignore the video clock time in that case. In addition, this patch also address the duration change on video frames based on the playback rate.

Differential Revision: https://phabricator.services.mozilla.com/D115035
2021-06-02 16:39:02 +00:00
alwu b9d1fb014e Bug 1517199 - part4 : add gtest. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D114922
2021-06-02 16:39:02 +00:00
alwu b1e6b39bc3 Bug 1517199 - part3 : add more logs. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D114921
2021-06-02 16:39:02 +00:00
alwu f18229c7fc Bug 1517199 - part1 : time stretching samples in AudioDecoderInputTrack. r=padenot
By using the soundtouch library, this patch implements the time stretching on the samples in AudioDecoderInputTrack when its playback rate is not 1.0f, in order to support changing playback rate on the captured media stream.

As the time stretcher has to be initialized by a fixed channel count, we would perform a realtime up-mix/down-mix for those audio chunks which have different channel count thant AudioDecoderInputTrack's initial channel count.

Differential Revision: https://phabricator.services.mozilla.com/D114560
2021-06-02 16:39:01 +00:00
Paul Adenot 80b6805757 Bug 1703603 - Add a mochitest for bug 1703603. r=bryce
This tests two things: whether `mozCaptureStreamUntilEnded` is handled correctly
when the media element source is a `MediaSource`, and whether all objects have
references to each other as to not garbage collect any part of the system.

Differential Revision: https://phabricator.services.mozilla.com/D116397
2021-06-02 14:20:40 +00:00
Noemi Erli 3fe08775d6 Backed out 3 changesets (bug 1702646) for causing gtest failures CLOSED TREE
Backed out changeset 2b5f35e21e84 (bug 1702646)
Backed out changeset 13dc1577b2a0 (bug 1702646)
Backed out changeset f87a905f445a (bug 1702646)
2021-06-02 12:11:51 +03:00
Karl Tomlinson 2bdfb957c6 Bug 1712898 return empty string for mediaSource of audiooutput MediaDevice r=jib
Depends on D115990

Differential Revision: https://phabricator.services.mozilla.com/D115991
2021-06-02 05:54:08 +00:00
Chun-Min Chang 92125abae4 Bug 1702646 - Share AudioSegments among AudioInputTrack r=padenot
Each AudioInputTrack has its own AudioSegments storing the input audio
data. When the AudioInputTrack is in pass-through mode, the AudioSegment
is just the data de-interleaved from its raw data, without any audio
processing magic applied on it. If there are multiple AudioInputTracks
in pass-through mode exist in the same graph, then all of their
AudioSegments are same.

Before this patch, each of these AudioInputTracks allocates its own
space to store its own AudioSegments even those data are same. This
patch makes it possible for these AudioInputTracks to share the same
AudioSegment data they need. By creating the AudioSegment in the
NativeInputTrack, which is mapped to one specific device and is
connected to the AudioInputTrack, the AudioInputTrack can fetch the
AudioSegment data when they need and then append shared-references of
the AudioChunk, inside the fetched AudioSegment, into their own
AudioSegment. Therefore, we can have some AudioChunks created by the
NativeInputTrack and shared among the AudioInputTracks in pass-through
mode.

Differential Revision: https://phabricator.services.mozilla.com/D114801
2021-06-02 01:05:20 +00:00
Chun-Min Chang dda7fa04e2 Bug 1702646 - Process audio input in ProcessInput r=padenot
Instead of receiving and processing audio input data in
AudioInputProcessing::NotifyInputData, we can get the audio input data
from the connected source via the MediaInputPort and process it in
AudioInputTrack::ProcessInput

Differential Revision: https://phabricator.services.mozilla.com/D114807
2021-06-02 01:05:20 +00:00
Chun-Min Chang ed6a1d76b5 Bug 1702646 - Use NativeInputTrack to deliver audio data r=padenot
- Create a NativeInputTrack that is managed by main-thread in MTG
- Replace mInputDeviceUsers by a <device-id, NativeInputTrack> map

Differential Revision: https://phabricator.services.mozilla.com/D113680
2021-06-02 01:05:20 +00:00
alwu 62edce905d Bug 1712598 - part2 : add a test for A/V sync. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D116055
2021-05-28 19:11:19 +00:00
alwu 88ff5a6b27 Bug 1712598 - part1 : fill silence if detecting a gap in audio. r=padenot
If there is a gap bewteen the audio that is going to be appended next and the amount of frames that we've appended, then we need to fill silence data in order to keep A/V sync correct.

We did that for the DecodedStream [1] before, but that got removed during the refactoring.

[1] https://searchfox.org/mozilla-central/rev/36181d2c169bafd5e13c534851c8b25d1567cfc3/dom/media/mediasink/DecodedStream.cpp#660-667

Differential Revision: https://phabricator.services.mozilla.com/D115857
2021-05-28 19:11:19 +00:00
alwu 07724ed21f Bug 1712595 - ensure AudioSink won't discard frames that are not played yet. r=padenot
When we switch to the DecodedStream from AudioSink. AudioSink would store some frames in its own media queue before those audio frames get played. After AudioSink got shutdown, it doesn't push those frames back to the original audio queue.

Therefore, when DecodedStream starts, it try to retrieve audio data from the audio queue, but it doesn't know that there is already a gap between "the audio DecodedStream is going to play" and "the audio that AudioSink had played".

Differential Revision: https://phabricator.services.mozilla.com/D115749
2021-05-28 19:11:18 +00:00
Byron Campen [:bwc] 92a4b12566 Bug 857668: Close these RTCPeerConnections. r=jib
This avoids shutdown leaks in cases where these tests are run in isolation.

Differential Revision: https://phabricator.services.mozilla.com/D116030
2021-05-27 21:08:46 +00:00
Byron Campen [:bwc] fa69b037b0 Bug 857668: Remove this check; sockets are sometimes closed without nICEr knowing about it. r=mjf
Depends on D115829

Differential Revision: https://phabricator.services.mozilla.com/D116029
2021-05-27 21:08:45 +00:00
Byron Campen [:bwc] 07652477a9 Bug 857668: Use IPPROTO_TCP here. r=mjf
We only use this with TCP sockets.

Depends on D115293

Differential Revision: https://phabricator.services.mozilla.com/D115829
2021-05-27 21:08:45 +00:00
Byron Campen [:bwc] 7551178c11 Bug 857668: Remove this extra retry_ct field. r=mjf
Nothing used this function before this bug, so this field has never been used
anyway. We handle challenge loops with nr_turn_stun_ctx.retry_ct.

Differential Revision: https://phabricator.services.mozilla.com/D115293
2021-05-27 21:08:44 +00:00
Byron Campen [:bwc] f5ea2b3c6b Bug 857668: Implement redirect loop detection. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115292
2021-05-27 21:08:44 +00:00
Byron Campen [:bwc] 4d9d9e6af0 Bug 857668: Open a new TCP socket when we receive a redirect in the TCP case. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115291
2021-05-27 21:08:44 +00:00
Byron Campen [:bwc] 1a8639d3c2 Bug 857668: Stop ignoring error responses from STUN/TURN servers. r=mjf
Also some indentation fixup.

Differential Revision: https://phabricator.services.mozilla.com/D115290
2021-05-27 21:08:43 +00:00
Byron Campen [:bwc] dfbc737f54 Bug 857668: Let Allocate/300 without MESSAGE-INTEGRITY slide. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115289
2021-05-27 21:08:43 +00:00
Byron Campen [:bwc] 3dfed73b5f Bug 857668: Fix a leak that the previous patch uncovered. r=mjf
Leaking test-case was dom/media/webrtc/tests/mochitests/test_peerConnection_bug825703.html

Differential Revision: https://phabricator.services.mozilla.com/D115288
2021-05-27 21:08:43 +00:00
Byron Campen [:bwc] ecf120cb2b Bug 857668: Fix handling of IPv6 literals. r=mjf
Also some logging that was useful in debugging this.

Differential Revision: https://phabricator.services.mozilla.com/D115287
2021-05-27 21:08:42 +00:00
Byron Campen [:bwc] cb2d4c897a Bug 857668: Handle Allocate/300 with ALTERNATE-SERVER. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115286
2021-05-27 21:08:42 +00:00
Byron Campen [:bwc] 5d8017d259 Bug 857668: Remove existing STUN/300 handling. r=mjf
STUN/300 is only meaningful for specific STUN method types, and the handling
depends on the spec that those methods are defined in. Doing any handling in
the base stun client code is not appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D115285
2021-05-27 21:08:41 +00:00
Byron Campen [:bwc] afceb4752f Bug 857668: Add function for getting STUN multi-attributes. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115284
2021-05-27 21:08:40 +00:00
Byron Campen [:bwc] 991c55fc64 Bug 857668: Remove some fields that serve no purpose besides making this code harder to maintain. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115283
2021-05-27 21:08:40 +00:00
Byron Campen [:bwc] 4197f6eb19 Bug 1170299: Fix const-correctness on some functions. r=mjf
Making this part of the stack for bug 857668, since it avoids adding even more
const casting there.

Differential Revision: https://phabricator.services.mozilla.com/D115282
2021-05-27 21:08:40 +00:00
Byron Campen [:bwc] 11bc292b6d Bug 857668: Remove some unneeded non-owning references to nr_socket. r=mjf
This substantially simplifies the task of replacing the nr_socket a TURN
context is using.

Differential Revision: https://phabricator.services.mozilla.com/D115281
2021-05-27 21:08:39 +00:00
Byron Campen [:bwc] 3b03c12639 Bug 857668: Test cases for bug. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D115280
2021-05-27 21:08:39 +00:00
Byron Campen [:bwc] b96e7b6e01 Bug 857668: Work a little harder to make sure we start tests with a reasonable pref environment. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D115279
2021-05-27 21:08:38 +00:00
Byron Campen [:bwc] 4e5a5a673c Bug 857668: Teach NAT simulator to do STUN redirects, configured by prefs. r=mjf
We need this because the test TURN server does not support stun redirects where
the address changes. Even if we were to add this support to the test STUN
server, it would not be helpful in CI since it would require having additional
IP addresses, which we cannot count on since we do not control the network
configuration of those machines.

Also, the fact that the code in this patch does not support MESSAGE-INTEGRITY
allows us to test the case where it is not present in a STUN redirect. Some
deployments rely on this.

Lastly, this code supports adding multiple (or 0) ALTERNATE-SERVER fields,
which is something that the test TURN server does not support.

Differential Revision: https://phabricator.services.mozilla.com/D115277
2021-05-27 21:08:38 +00:00
Bryce Seager van Dyk a38a1616b0 Bug 1713116 - Replace "mediakeys-request" literal with MediaKeys::kMediaKeysRequestTopic in C++ code. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D116106
2021-05-27 17:48:06 +00:00
Joel Maher 2e841d22cb Bug 1704640 - Move mochitest browser-chrome / media from osx 10.14 to osx 10.15. r=ahal,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D115951
2021-05-27 16:06:03 +00:00
Peter Van der Beken f206ae96e4 Bug 1712725 - Stop clearing JS things when calling mozilla::DropJSObjects. r=mccr8
There's a pattern of clearing JS things when calling mozilla::DropJSObjects,
but mozilla::DropJSObjects already clears the JS things itself by calling
CycleCollectedJSRuntime::RemoveJSHolder.

Differential Revision: https://phabricator.services.mozilla.com/D115885
2021-05-27 08:35:40 +00:00
Peter Van der Beken af93c19a09 Bug 1712725 - Pass the correct object to mozilla::DropJSObjects. r=mccr8
Various code was passing 'this' to mozilla::DropJSObjects in unlink, but that's
the CC participant. The right object to pass is 'tmp'. I also added static
asserts in mozilla::Hold/DropJSObjects to block this in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115884
2021-05-27 08:35:40 +00:00
Bryce Seager van Dyk 5a43938f9b Bug 1712346 - Use MOZ_ASSERT to enforce and document ChromiumCDMParent threading model. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D116016
2021-05-26 18:21:45 +00:00
Emilio Cobos Álvarez 3f1ed5cd9c Bug 1629381 - CanvasRenderingContext2D.drawImage shouldn't throw for e.g <video> if there's no valid surface to draw. r=sotaro
As per spec see comment.

Differential Revision: https://phabricator.services.mozilla.com/D103157
2021-05-25 10:39:51 +00:00
Kris Wright 5e37146c9f Bug 1692068 - Disable broken crashtests on tsan. r=necko-reviewers,decoder,dragana
These tests either cause frequent or permanent failures on TSan.

Differential Revision: https://phabricator.services.mozilla.com/D110371
2021-05-25 01:15:49 +00:00
Mike Hommey d4ae277433 Bug 1712031 - Adjust the type of fallbackIterations to match that of IterationCount(). r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D115564
2021-05-24 21:40:27 +00:00
Dorel Luca d139ef646e Backed out changeset 32ad092ecb38 (bug 1711564) for MDA failures in dom/media/webrtc/tests/mochitests/test_getUserMedia_trackEnded.html. CLOSED TREE 2021-05-25 00:31:59 +03:00
Joel Maher 3ad9f06697 Bug 1710923 - migrate windows 7x32 debug tests to windows 10x32. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D115017
2021-05-24 20:06:43 +00:00
Olli Pettay 9138dbca37 Bug 1711564, MediaStreamTrack should pass owner global to the DOMEventTargetHelper, r=jib
Differential Revision: https://phabricator.services.mozilla.com/D115427
2021-05-24 18:27:21 +00:00
Bryce Seager van Dyk a4dbbb7a9c Bug 1706164 - Make MediaKeys interact with EncryptedMediaChild to check output protection status. r=alwu
This changes the MediaKeys to actually service output protection status queries
by sending those queries to the EncryptedMediaChild actor and handling responses
from the actor. These interactions are done via the observer service.

Differential Revision: https://phabricator.services.mozilla.com/D115418
2021-05-24 16:50:20 +00:00
Bryce Seager van Dyk acbeaeeb24 Bug 1706164 - Plumb QueryOutputProtectionStatus requests from the CDM to MediaKeys. r=alwu
This patch plumbs the QueryOutputProtectionStatus call from the CDM up to the
MediaKeys. This is plumbing is done to get the request to an endpoint of Gecko
C++ code, and future patches will do further plumbing in order to complete the
query.

After the first query is complete, we cache the result in a CDM's
ChromiumCDMParent and update the value only when notified of changes from the
MediaKeys. This has the benefit of that checks after the first don't need to
touch the main thread. This avoids adding more main thread work, and means we
can still complete checks in a timely fashion even if the main thread is running
hot.

We cache in the parent rather than the child so that the parent can make
decisions on how to handle requests even if the CDM machinery is not yet fully
initialized. In future it may make sense to move the caching to the child, but
I'd prefer to do this only after other refactoring of the machinery which I
consider out of scope for this bug.

Future patches will ensure listeners are in place such that the cached data is
updated when updates are received further up the stack.

Differential Revision: https://phabricator.services.mozilla.com/D115415
2021-05-24 16:50:18 +00:00
Michelle Goossens f5a803b567 Bug 1711500 - Remove checks for gProton and gProtonDoorhangers smart pref getters from tests r=Gijs,robwu
Differential Revision: https://phabricator.services.mozilla.com/D115748
2021-05-24 13:46:39 +00:00
Sandor Molnar 2ef849fd1c Backed out 4 changesets (bug 1706164) for causing build bustages in media/eme/MediaKeys. CLOSED TREE
Backed out changeset 5d3f67175482 (bug 1706164)
Backed out changeset 4630540c3717 (bug 1706164)
Backed out changeset 4a2463270858 (bug 1706164)
Backed out changeset a2b896ddc631 (bug 1706164)
2021-05-21 23:21:58 +03:00
Bryce Seager van Dyk 42b8b8599e Bug 1706164 - Make MediaKeys interact with EncryptedMediaChild to check output protection status. r=alwu
This changes the MediaKeys to actually service output protection status queries
by sending those queries to the EncryptedMediaChild actor and handling responses
from the actor. These interactions are done via the observer service.

Differential Revision: https://phabricator.services.mozilla.com/D115418
2021-05-21 19:59:54 +00:00
Bryce Seager van Dyk 243f6d23d0 Bug 1706164 - Plumb QueryOutputProtectionStatus requests from the CDM to MediaKeys. r=alwu
This patch plumbs the QueryOutputProtectionStatus call from the CDM up to the
MediaKeys. This is plumbing is done to get the request to an endpoint of Gecko
C++ code, and future patches will do further plumbing in order to complete the
query.

After the first query is complete, we cache the result in a CDM's
ChromiumCDMParent and update the value only when notified of changes from the
MediaKeys. This has the benefit of that checks after the first don't need to
touch the main thread. This avoids adding more main thread work, and means we
can still complete checks in a timely fashion even if the main thread is running
hot.

We cache in the parent rather than the child so that the parent can make
decisions on how to handle requests even if the CDM machinery is not yet fully
initialized. In future it may make sense to move the caching to the child, but
I'd prefer to do this only after other refactoring of the machinery which I
consider out of scope for this bug.

Future patches will ensure listeners are in place such that the cached data is
updated when updates are received further up the stack.

Differential Revision: https://phabricator.services.mozilla.com/D115415
2021-05-21 19:59:53 +00:00
Csoregi Natalia d4f1ea2fe5 Bug 1509951 - Fix linting. r=fix CLOSED TREE 2021-05-21 04:08:41 +03:00
John Lin 74fac80bac Bug 1509951 - HW video encoder implementation for Windows. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D100437
2021-05-20 22:55:03 +00:00
Csoregi Natalia 814d52a59c Backed out changeset 7ed8d739fe9a (bug 1710923) for causing cppunit failures. CLOSED TREE 2021-05-20 20:48:22 +03:00
Joel Maher 359e6f6227 Bug 1710923 - migrate windows 7x32 debug tests to windows 10x32. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D115017
2021-05-20 16:31:20 +00:00
Mike Hommey 92740a219c Bug 1711846 - Followup: also disable stringop-overflow warnings in nrappkit code.
Differential Revision: https://phabricator.services.mozilla.com/D115565
2021-05-20 02:59:18 +00:00
Mike Hommey a3e4e3c969 Bug 1711846 - Disable stringop-overflow and stringop-truncation warnings in third party nICEr and nrappkit code. r=mjf,firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D115462
2021-05-19 22:28:44 +00:00
Mike Hommey bc43c7fdb0 Bug 1711833 - Fix GCC warning about the use of strncpy in WebRtcIcePrioritizerTest::AddInterface. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D115459
2021-05-19 22:14:37 +00:00
Mike Hommey ffcbe768ca Bug 1711830 - Change MOZ_ASSERT to MOZ_RELEASE_ASSERT in OmxPlatformLayer::Config. r=bryce
The assertion check likely doesn't have a performance impact, and allows
compilers to know the dereference that follows is not going to apply to
a NULL pointer.

Differential Revision: https://phabricator.services.mozilla.com/D115447
2021-05-19 22:02:16 +00:00
Mike Hommey 550026c727 Bug 1711820 - Avoid errors about unused `reserved` local variable. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D115445
2021-05-19 21:35:47 +00:00
Sandor Molnar 4e346690ad Backed out changeset 7fb52bd0c5b6 (bug 1710923) for causing win10 reftest failures. CLOSED TREE 2021-05-19 17:11:39 +03:00
Joel Maher ce8b9ba202 Bug 1710923 - migrate windows 7x32 debug tests to windows 10x32. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D115017
2021-05-19 12:47:29 +00:00
Nika Layzell 461b98ded0 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 20:45:17 +00:00
Alexandru Michis 08e0f3cf36 Backed out 4 changesets (bug 1711090) for causing bustages in nsTimerImpl.cpp
CLOSED TREE

Backed out changeset 5c6f0950714d (bug 1711090)
Backed out changeset 0b6a886eea8a (bug 1711090)
Backed out changeset fc9c788ff41d (bug 1711090)
Backed out changeset ecc51d9ad027 (bug 1711090)
2021-05-18 20:25:56 +03:00
Nika Layzell 2eead824d8 Bug 1711090 - Part 3: Add some missing nsITimerCallback queryinterface targets, r=KrisWright,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D115108
2021-05-18 16:24:48 +00:00
Olli Pettay b01c8b4aff Bug 1705080, make MediaStreams behave as normal EventTargets, r=jib
Differential Revision: https://phabricator.services.mozilla.com/D115269
2021-05-18 16:21:27 +00:00
Iulian Moraru a2a59b7c80 Backed out changeset bdc93c5c667f (bug 1710923) for causing reftest failures on scrollbar-marks-overlay.html. CLOSED TREE 2021-05-14 01:51:04 +03:00
Joel Maher bd3999c92b Bug 1710923 - migrate windows 7x32 debug tests to windows 10x32. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D115017
2021-05-13 15:07:48 +00:00
Byron Campen [:bwc] 46a55692d7 Bug 1709481: Make sure to update AudioConduit when going null -> non-null and vice-versa. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D114626
2021-05-11 15:12:53 +00:00
Byron Campen [:bwc] 2a7c533a92 Bug 1709481: Add equivalent test for the audio case. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D114625
2021-05-11 15:12:53 +00:00
Byron Campen [:bwc] d4799ecaaa Bug 1709481: Don't treat null video send tracks as type Camera. r=mjf
Also, don't avoid configuring the video send codec if there is no
send track.

Differential Revision: https://phabricator.services.mozilla.com/D114289
2021-05-11 15:12:52 +00:00
Byron Campen [:bwc] ea71cfb5ce Bug 1709481: Test-case for bug. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D114624
2021-05-11 15:12:52 +00:00
alwu 749abc0457 Bug 1709899 - batch all data together when appending data to 'AudioDecoderInputTrack' to further ensure the free spaces in SPSC queue. r=padenot.
Differential Revision: https://phabricator.services.mozilla.com/D114559
2021-05-10 22:18:26 +00:00
Bryce Seager van Dyk a5fac76104 Bug 1706453 - Reword mediaCaptureWindowState docstring to make clear it's not recursive. r=jib DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D114536
2021-05-10 17:25:12 +00:00
Butkovits Atila 4eab64aa86 Bug 1634684 - disable test_setSinkId.html on Linux_qr_debug r=intermittent-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D114713
2021-05-10 16:23:33 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Matt Woodrow a6d0dff2b5 Bug 1707513 - Add 'drawSnapshot' mode to reftest harness, and annotate all current failures. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D114188
2021-05-10 00:28:01 +00:00
Bryce Seager van Dyk 77362299ee Bug 1709664 - Add a reftest to cover bug 1576990. r=alwu
This adds a test case that ensures we get expected durations out of the Windows
h264 decoder. Bug 1576990 changed how we handle durations to avoid the decoder
incorrectly estimating durations. In some cases this could result in frames
appearing stuck. This reftest covers that.

Differential Revision: https://phabricator.services.mozilla.com/D114510
2021-05-06 22:05:04 +00:00
Karl Tomlinson e90ae55216 Bug 1694791 Test enumerateDevices() calls either side of browsing context discard r=jib DONTBUILD
Depends on D114317

Differential Revision: https://phabricator.services.mozilla.com/D114318
2021-05-06 20:21:42 +00:00
Karl Tomlinson 354ec81af7 Bug 1694791 check placeholderListener instead of window listener for enumerateDevices() abort r=jib DONTBUILD
An enumerateDevices() call before a navigation possibly should sometimes
resolve its promise even after the navigation, but that shouldn't depend on
whether another enumerateDevices() call is made with the same Window after the
navigation but before the first would resolve.

The current behavior is that listeners are removed on Document navigation, but
listeners can be added after navigation.  Testing the window listener is
checking for any listener but testing the placeholderListener checks the
listener associated with this particular operation.

Differential Revision: https://phabricator.services.mozilla.com/D114317
2021-05-06 20:21:41 +00:00
alwu 1ca34837b1 Bug 1709684 - disable test on OSX. r=padenot
I acutally discovered that during testing the bug1709130, but I forgot to update that in D114150.

We would get an decoding error during testing, which is a different issue from what bug1709130 encountered.

That error only happens on testing, directly playing that video on Firefox works. So disabling the test on OSX for now, we can dig into that later if that really causes a problem.

Differential Revision: https://phabricator.services.mozilla.com/D114400
2021-05-06 16:23:23 +00:00
Karl Tomlinson fd16b4ad67 Bug 1709474 send selectAudioOutput requests to app r=jib
Differential Revision: https://phabricator.services.mozilla.com/D108385
2021-05-06 08:02:39 +00:00
Karl Tomlinson bd3b9693bd Bug 1709474 add a helper method for bypassing permission prompt r=jib
Differential Revision: https://phabricator.services.mozilla.com/D108384
2021-05-06 08:02:38 +00:00
Karl Tomlinson 9f60769705 Bug 1709474 move mozGetUserMediaDevices from Navigator to GetUserMediaRequest r=jib,webidl,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D111565
2021-05-06 05:16:49 +00:00
Paul Bone 6191ca4916 Bug 1709526 - Fix all the lint errors for .ini files in dom/ r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D114321
2021-05-06 01:29:31 +00:00
Csoregi Natalia 8cad1a2512 Backed out 2 changesets (bug 1709484, bug 1709474) for geckoview fails on testDeviceRecordingEventAudioAndVideo. CLOSED TREE
Backed out changeset 069415280f6d (bug 1709474)
Backed out changeset 3853186911c9 (bug 1709484)
2021-05-06 03:38:52 +03:00
Karl Tomlinson 10fe97e403 Bug 1709474 move mozGetUserMediaDevices from Navigator to GetUserMediaRequest r=jib,webidl,geckoview-reviewers,smaug,agi
Differential Revision: https://phabricator.services.mozilla.com/D111565
2021-05-05 23:04:13 +00:00
Csoregi Natalia d1bbd6e368 Backed out 2 changesets (bug 1693250) for failures on test_recreate_media_sink_audible_change.html. CLOSED TREE
Backed out changeset 0e0f90271853 (bug 1693250)
Backed out changeset 45cd86944c9f (bug 1693250)
2021-05-06 01:14:51 +03:00
alwu 429bd59056 Bug 1693250 - part2 : reset the audible state when the audio sink get shutdown. r=bryce
When the audio sink shutdown, we should also reset the audible state for the listeners. Otherwise, MediaDecoderStateMachine would possibly rely on the incorrect audible state that is produced by previous sink, which would cause showing the sound indicator even if no sound is being playing.

Eg.
Considering following case without the reset of the audible state
1. Sink A is audible -> MDSM set `mIsAudioDataAudible=true`
2. Stop sink
3. Recreate sink B and it's playing silence -> MDSM's `mIsAudioDataAudible=true` is still true, this is wrong!

Differential Revision: https://phabricator.services.mozilla.com/D113550
2021-05-05 20:07:07 +00:00
alwu 5812a14721 Bug 1693250 - part1 : keep clock time being monotonically increased even if the media sink has been changed. r=bryce
The purpose of this patch is to create a consistent clock timeline among different media sinks.

Having a consistent clock timeline can help the newly created media sink to understand audio data's "adjusted" time, which can prevent the sink from inserting silence if the sink incorrectly think there is a gap between data and sink start time.

However, once seeking completed, we should use the media time that indicates to the new position, instead of using the previous clock time.

Eg.
Audio duration = 10, and has seamlessly looped 5 times. Then the start time of the sample in 2s in the 6th looping would be 2 + 5*10 = 52.
If we switch to the new sink, and use media time (which is 2s) as a start time to start a new sink, then the new sink would think there is a gap between 2s and 52s and push a lot of silence into the data. [1]


[1] https://searchfox.org/mozilla-central/rev/9b430bb1a11d7152cab2af4574f451ffb906b052/dom/media/mediasink/AudioSink.cpp#390-426

Differential Revision: https://phabricator.services.mozilla.com/D113548
2021-05-05 20:07:06 +00:00
alwu 1299cfd31c Bug 1709130 - part2 : shutdown sink when seeking to next frame. r=bryce
For normal seeking operation, we would stop the sink first and restart sink if needed when MDSM enters `DecodingState` later.

We should also do that for seek-to-next-frame. After seeking completes, MDSM would reset the media time by the video keyframe's time, but the audio clock time might still behind because it doesn't skip to next keyframe (audio also doesn't have that concept).

We hit this issue in the `1709130.html` in the previous patch. After seeking completed, the media time (video next keyframe time) is updated but the audio clock time is still behind, so we hit the assertion in the `GetClock()` [1]

[1] https://searchfox.org/mozilla-central/rev/54097530955a98c768f2aaf56925578ec886ec77/dom/media/MediaDecoderStateMachine.cpp#3585

Depends on D114150

Differential Revision: https://phabricator.services.mozilla.com/D114151
2021-05-05 16:50:34 +00:00
alwu f73f4cee55 Bug 1709130 - part1 : extend the SPSC queue's capacity for AudioDecoderInputTrack. r=padenot
In the initial implementation, we only used 20 capacity for SPSC queue and added some mechanisms (batched data to save the free space of SPSC queue/clean SPSC queue in each graph iteration) to prevent it from being full.

But that seems not working in some extreme cases where decoding is too fast and the graph thread can't catch up the speef of processing the input. So extend the queue size to 40 that should allow SPSC to work without being full again.

Differential Revision: https://phabricator.services.mozilla.com/D114150
2021-05-05 16:50:33 +00:00
Bryce Seager van Dyk e3c10d26b5 Bug 1692582 - Fix incorrect format specifier for negative duration log. r=alwu
My last patch used the incorrect format specifier (%d) when logging the seconds
for a negative timestamp. This should be a %f as the value is a double.

Differential Revision: https://phabricator.services.mozilla.com/D114299
2021-05-05 15:54:30 +00:00
Paul Adenot 9f5459ee57 Bug 1685503 - Wait for "timeupdate", or one second (when paused) when testing the telemetry probes for visible and invisible media elements, to not depend on high-resolution clock. r=alwu
This patch moves to a lower-resolution clock on Windows, so this was failing.

Differential Revision: https://phabricator.services.mozilla.com/D114073
2021-05-05 09:24:51 +00:00
Paul Adenot c59e733060 Bug 1685503 - Use AwakeTimeStamp to count time for media telemetry. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D112797
2021-05-05 09:24:51 +00:00
Karl Tomlinson 4fa3851cb4 Bug 1708123 test MediaRecorder constructor error messages r=jib
Differential Revision: https://phabricator.services.mozilla.com/D113917
2021-05-04 23:11:24 +00:00
Karl Tomlinson 4d5c5a7af6 Bug 1708123 choose the better message on lack of MIME type support in MediaRecorder constructor r=jib
Differential Revision: https://phabricator.services.mozilla.com/D113916
2021-05-04 23:11:23 +00:00
Karl Tomlinson 75943ec6c2 Bug 1709474 - rename nsIDOMNavigatorUserMedia.idl to nsIMediaDevice.idl r=jib
This is more appropriate since
https://hg.mozilla.org/mozilla-central/rev/db29f053e54ef83da3e313de6e85f3b850faa543#l5.12
and helps generated webidl bindings find the right header.

Differential Revision: https://phabricator.services.mozilla.com/D111564
2021-05-04 22:03:01 +00:00
Bryce Seager van Dyk a5f0265053 Bug 1692582 - Handle non-ok error codes + zero and negative values when getting duration for IMFSamples. r=alwu
This patch changes our handling of durations in the WMF video MFT manager.
Prior to this patch we had some handling for if VP9 samples were returned with
zero duration. However, this patch extends this to the general case so that we
will try and estimate the duration using Gecko data in the following cases
- If Windows returns an error code when getting the duration. This can be
  because the duration is unknown, but the API also specifies it can fail due to
  other, unstated reasons (we handle these too).
- If Windows returns a 0 duration. This is also used to indicate an unknown
  duration. We now handle this for arbitrary codecs, not just VP9.
- If Windows returns a negative duration. It's unclear if Windows will do this,
  and if it does, under what cases. However, since the API returns the duration
  as an signed int it's possible, so we cover this too.

In all cases above, we will use the duration we record from our last input
sample as the output sample duration.

Differential Revision: https://phabricator.services.mozilla.com/D114247
2021-05-04 21:56:48 +00:00
Karl Tomlinson 1f6f4224c8 Bug 1708179 throw when PannerNode param value a not in the range of float r=padenot
This is similar to what WebIDL bindings would do for us when the AudioParam setters are called.

setPosition() "is equivalent to setting positionX.value, positionY.value, and positionZ.value
attribute directly with the x, y and z parameters, respectively."
https://webaudio.github.io/web-audio-api/#dom-pannernode-setposition

Differential Revision: https://phabricator.services.mozilla.com/D113943
2021-05-04 03:48:34 +00:00
Karl Tomlinson ccc0c7cae2 Bug 1708179 switch from PannerNode.setPosition() parameters close to DBL_MAX to FLT_MAX r=padenot
The large numbers were to test
https://hg.mozilla.org/integration/mozilla-inbound/rev/084b01d1b6b3
but were ignored after
https://hg.mozilla.org/integration/mozilla-inbound/rev/8799895ca858

Depends on D113941

Differential Revision: https://phabricator.services.mozilla.com/D113942
2021-05-04 03:48:33 +00:00
Karl Tomlinson a6be19d968 Bug 1708179 throw when attempting to set AudioParam value during setValueCurveAtTime() interval r=padenot,emilio
Depends on D113938

Differential Revision: https://phabricator.services.mozilla.com/D113939
2021-05-04 03:48:32 +00:00
Karl Tomlinson f2c39b5980 Bug 1708179 add AudioParam::SetInitialValue() for use in AudioNode creation r=padenot
when the setter should not throw because there are no events in the timeline
and the time is known valid.

This will allow us to make SetValue() throw when it conflicts with a
setValueCurveAtTime() curve.

Depends on D113937

Differential Revision: https://phabricator.services.mozilla.com/D113938
2021-05-04 03:48:32 +00:00
Karl Tomlinson 2b6889435f Bug 1708179 clarify that AudioEventTimeline::ValidateEvent() has no side effects r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D113937
2021-05-04 03:48:32 +00:00
alwu 49eb472b16 Bug 1707242 - part2 : add test. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D114006
2021-05-03 21:12:02 +00:00
alwu 46b9e4daeb Bug 1707242 - part1 : use empty image in null video data. r=bryce
Using a non-null image can prevent element from changing its ready state incorrectly to `HAVE_METADATA`. See more detailed analysis in [1].

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1707242#c9

Differential Revision: https://phabricator.services.mozilla.com/D114005
2021-05-03 21:12:01 +00:00
Byron Campen [:bwc] bc0f8757c0 Bug 1708813: Remember remote side's payload type on recv tracks when we were the offerer. r=mjf
Depends on D114039

Differential Revision: https://phabricator.services.mozilla.com/D114040
2021-05-03 18:53:17 +00:00
alwu 35f3dc0dc8 Bug 1708700 - only access 'mData' when it's not null. r=padenot
Depends on D114015

Differential Revision: https://phabricator.services.mozilla.com/D114018
2021-05-03 16:30:45 +00:00
alwu acb23b0563 Bug 1708790 - add crash test for bug1708536. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D114015
2021-05-03 16:30:44 +00:00
alwu b59c5d9bff Bug 1708536 - prevent accessing null 'mData'. r=padenot
Depends on D113823

Differential Revision: https://phabricator.services.mozilla.com/D113855
2021-04-30 12:38:06 +00:00
alwu 8059f71c85 Bug 1708433 - add 'unused' for the result used for assertion. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D113823
2021-04-30 12:38:05 +00:00
alwu 8c05db26df Bug 1708454 - add missing include header. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D113822
2021-04-30 12:38:05 +00:00
Cosmin Sabou 799b5200ae Backed out changeset bc141a334421 (bug 1685503) for windows browser chrome failures on browser_tab_visibility_and_play_time.js CLOSED TREE 2021-04-29 18:35:43 +03:00
Paul Adenot 2f3c1253f9 Bug 1685503 - Use AwakeTimeStamp to count time for media telemetry. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D112797
2021-04-29 11:45:42 +00:00
alwu e9feafd386 Bug 1695265 - part3 : add gtest for 'AudioDecoderInputTrack'. r=pehrsons,padenot
Differential Revision: https://phabricator.services.mozilla.com/D110503
2021-04-29 01:37:21 +00:00
alwu 2a0a994112 Bug 1695265 - part2 : use `AudioDecoderInputTrack` for audio in `DecodedStream`. r=pehrsons
Change the audio track from `SourceMediaTrack` to `AudioDecoderInputTrack`, which allows us to use a pull-based stream track in DecodedStream.

Also a pre-requirement before we start implementing supporting playback rate change on a track captured from the media element.

Differential Revision: https://phabricator.services.mozilla.com/D106042
2021-04-29 01:37:20 +00:00
alwu 36181d2c16 Bug 1695265 - part1 : implement AudioDecoderInputTrack. r=pehrsons
This patch implements a new track `AudioDecoderInputTrack` which inherits from `ProcessedMediaTrack` and is a pull-based media stream track.

This track would be used for receiving audio decoded data and will support changing playback rate in the future (not yet, will be done in Bug 1517199).

Differential Revision: https://phabricator.services.mozilla.com/D106040
2021-04-29 01:37:20 +00:00
Karl Tomlinson f6cc0e39ab Bug 1706772 use size_t for RevebAccumulationBuffer read index r=padenot
The accumulate() return value and updateReadIndex() were unused.

Depends on D113624

Differential Revision: https://phabricator.services.mozilla.com/D113625
2021-04-28 22:00:58 +00:00
Karl Tomlinson a773a03d90 Bug 1706772 throw on ReverbAccumulationBuffer allocation failure r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D113624
2021-04-28 22:00:58 +00:00
Chun-Min Chang 6ee4485293 Bug 1706524 - Track AudioDeviceID in AudioInputTrack r=padenot
This patch adds an `AudioDeviceID` member in `AudioInputTrack`. This
aims to simplify `AudioInputTrack::CloseAudioInput`.

Before this patch, the `AudioDeviceID` is tracked by
`MediaEngineWebRTCMicrophoneSource` only instead so `AudioInputTrack`
has no idea of what device it pairs with. One main drawback is that
`MediaTrackGraphImpl` needs to search all the `AudioDataListener`
inside it to infer what device is closed when
`AudioInputTrack::Destroy()` is called, since `AudioInputTrack`
doesn't know what is its paired device, which gives an O(N) time
complexity, where N is the number of `AudioDataListener` in
`MediaTrackGraphImpl`

A simple way to reduce the time complexity from O(N) to O(1) is to track
the paired device when `AudioInputTrack::OpenAudioInput` is called. This
also enables the possibility to remove `mInputDeviceUsers` in Bug
1702646.

Differential Revision: https://phabricator.services.mozilla.com/D113040
2021-04-28 18:33:58 +00:00
Brindusan Cristian 2c692937aa Backed out 3 changesets (bug 1695265) for causing crashtest assertion failures. CLOSED TREE
Backed out changeset 7d2f645a1dc4 (bug 1695265)
Backed out changeset 35cb5f5e17b7 (bug 1695265)
Backed out changeset 52861f76787f (bug 1695265)
2021-04-28 22:29:29 +03:00
alwu d056a883d6 Bug 1695265 - part3 : add gtest for 'AudioDecoderInputTrack'. r=pehrsons,padenot
Differential Revision: https://phabricator.services.mozilla.com/D110503
2021-04-28 16:50:50 +00:00
alwu ae294b8a9e Bug 1695265 - part2 : use `AudioDecoderInputTrack` for audio in `DecodedStream`. r=pehrsons
Change the audio track from `SourceMediaTrack` to `AudioDecoderInputTrack`, which allows us to use a pull-based stream track in DecodedStream.

Also a pre-requirement before we start implementing supporting playback rate change on a track captured from the media element.

Differential Revision: https://phabricator.services.mozilla.com/D106042
2021-04-28 16:50:49 +00:00
alwu 43009c717f Bug 1695265 - part1 : implement AudioDecoderInputTrack. r=pehrsons
This patch implements a new track `AudioDecoderInputTrack` which inherits from `ProcessedMediaTrack` and is a pull-based media stream track.

This track would be used for receiving audio decoded data and will support changing playback rate in the future (not yet, will be done in Bug 1517199).

Differential Revision: https://phabricator.services.mozilla.com/D106040
2021-04-28 16:50:49 +00:00
Andreea Pavel b8e71e2d7e Bug 1637248 - update disabling condition for test_setSinkId_preMutedElement r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D113262
2021-04-27 16:56:36 +00:00
Bryce Seager van Dyk 15e028a5fa Bug 1707559 - Stub out QueryOutputProtectionStatus. r=jbauman
Differential Revision: https://phabricator.services.mozilla.com/D113361
2021-04-26 20:52:47 +00:00
alwu d54e623362 Bug 1706811 - explicitly restart the media sink in 'UpdateOutputCaptured()' if it was playing before. r=bryce.
When updating the output capture in MDSM, we didn't restart the sink after recreating it. The sink would actually get started later by `MaybeStartPlayback()` that would be checked periodly in the decoding and completed state.

However, we should make it explicitly start if the sink was playing before we recreate it, like what we did for `SetSink()` [1]

[1] https://searchfox.org/mozilla-central/rev/08013752b4638f01d41d2a38ca7bd741bc572c86/dom/media/MediaDecoderStateMachine.cpp#3803-3814

Differential Revision: https://phabricator.services.mozilla.com/D113046
2021-04-26 18:45:01 +00:00
alwu 18962da886 Bug 1706747 - make AudioSink's start time exactly same as the start time of AudioSinkWrapper. r=bryce.
AudioSink's`mStartTime` [1] represents the time when the MediaSink starts.

Currently that is initialized by calling `GetMediaTime()` [2], but we should better let the time explicitly equal to the start time of the media sink [3] (they're currently equal, but not easy to notice that by just looking the code).

So we should let AudioSinkWrapper to pass the start time to AudioSink in order to make the invariant clearer, which is that AudioSinkWrapper and AudioSink should be guaranteed having the same start time.

[1] https://searchfox.org/mozilla-central/rev/08013752b4638f01d41d2a38ca7bd741bc572c86/dom/media/mediasink/AudioSink.h#93
[2] https://searchfox.org/mozilla-central/rev/08013752b4638f01d41d2a38ca7bd741bc572c86/dom/media/MediaDecoderStateMachine.cpp#2831
[3] https://searchfox.org/mozilla-central/rev/08013752b4638f01d41d2a38ca7bd741bc572c86/dom/media/MediaDecoderStateMachine.cpp#3388

Differential Revision: https://phabricator.services.mozilla.com/D113016
2021-04-26 18:44:30 +00:00
Joel Maher 8a9f37b534 Bug 1706716 green up mda, xpcshell, browser-chrome, reftest for apple silicon. r=necko-reviewers,extension-reviewers,preferences-reviewers,application-update-reviewers,zombie,ahal,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D113001
2021-04-22 18:39:40 +00:00
smolnar 66bc0de987 Backed out changeset 36427e64399a (bug 1685503) for causing build bustages. CLOSED TREE 2021-04-21 16:11:09 +03:00
Paul Adenot f3aa75b833 Bug 1685503 - Use AwakeTimeStamp to count time for media telemetry. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D112797
2021-04-21 12:55:54 +00:00
alwu e85f95af66 Bug 1705267 - part5 : use `NS_NewRunnableFunction` to replace `UpdateEvent`. r=bryce
In addition, the comment seems out-of-date, which was added for running the runnable on the main thread and our code is totally different from that time. So we can remove that as well.

Differential Revision: https://phabricator.services.mozilla.com/D112139
2021-04-20 21:35:32 +00:00
alwu 76dba2f042 Bug 1705267 - part4 : wrap the part of determining actions for streams into a new function. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D112138
2021-04-20 21:35:31 +00:00
alwu 663b783e34 Bug 1705267 - part3 : add 'const' for those variables which should be const and remove unnecessary local variables. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D112137
2021-04-20 21:35:31 +00:00
alwu 3918092b17 Bug 1705267 - part2 : modify incorrect comments. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D112136
2021-04-20 21:35:31 +00:00
alwu b7f7f12698 Bug 1705267 - part1 : wrap the part of trimming cache into a new function. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D112135
2021-04-20 21:35:30 +00:00
alwu 99f8004819 Bug 1705194 - use 'inline' on static members to remove the out-of-class definition. r=bryce
See `Static data members` part in [1], `inline` is able to be used on static member since C++17.

[1] https://en.cppreference.com/w/cpp/language/static

Differential Revision: https://phabricator.services.mozilla.com/D112081
2021-04-20 21:35:30 +00:00
Agi Sferro a5972b2933 Bug 1696145 - Add Array::From(nsTArray) r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111923
2021-04-20 18:35:36 +00:00
Jan-Ivar Bruaroey 73296ccfd8 Bug 1706409 - Fix MediaManager log statement to not crash when starting media. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D112791
2021-04-20 18:26:55 +00:00
Csoregi Natalia cd658de8c3 Backed out 2 changesets (bug 1696145) for causing build bustage on notifications. CLOSED TREE
Backed out changeset 2e18b65dd133 (bug 1696145)
Backed out changeset 6d302afe732f (bug 1696145)
2021-04-20 20:13:56 +03:00
alwu ebd128cde0 Bug 1689741 - not controlling the real-time media via the media control. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D112668
2021-04-20 16:47:41 +00:00
Agi Sferro f50a49c5cf Bug 1696145 - Add Array::From(nsTArray) r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111923
2021-04-20 16:38:45 +00:00
Andreea Pavel 80bb444d43 Bug 1634684 - disable test_setSinkId_default_addTrack on linux-qr debug r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D112690
2021-04-20 12:50:37 +00:00
Florian Quèze c7da51d612 Bug 1703583 - fix tests that keep waitForEvent or topicObserved promises pending, r=Gijs,zombie.
Differential Revision: https://phabricator.services.mozilla.com/D111116
2021-04-19 21:56:05 +00:00
Cosmin Sabou b2ba954d3b Bug 1703887 - Disable bipbop_300_215kbps.mp4.lastframe.html on mac for perma failures. r=jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D112535
2021-04-19 15:25:16 +00:00
Brendan Early 92dd73d18c Bug 1120222 - Part 2 - Add tests r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D102797
2021-04-19 15:17:27 +00:00
Brendan Early 11d4046786 Bug 1120222 - Set AudioSink name to title of MediaElement's parent r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D93462
2021-04-19 15:17:26 +00:00
Peter Van der Beken 164f59d833 Bug 1696158 - Move CanSavePresentation to the parent process. Keep track of various flags for deciding whether to put a page in BFCache. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110231
2021-04-19 14:50:54 +00:00
smolnar 84a0543987 Backed out 8 changesets (bug 1696158) for causing multiple failures. CLOSED TREE
Backed out changeset 09c598c8fd29 (bug 1696158)
Backed out changeset 02f956c26901 (bug 1696158)
Backed out changeset b61a3a324cce (bug 1696158)
Backed out changeset 95810ed7f1e5 (bug 1696158)
Backed out changeset 4f93a7b61496 (bug 1696158)
Backed out changeset c80c55b56f2a (bug 1696158)
Backed out changeset 11627c409882 (bug 1696158)
Backed out changeset b98b4316a510 (bug 1696158)
2021-04-19 17:04:08 +03:00
Peter Van der Beken a1306f8324 Bug 1696158 - Move CanSavePresentation to the parent process. Keep track of various flags for deciding whether to put a page in BFCache. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D110231
2021-04-19 12:39:19 +00:00
Matt Woodrow 0405a7b508 Bug 1653902 - Allocate a buffer for BuildSurfaceDescriptorBuffer using the computed destination layout. r=jbauman
Differential Revision: https://phabricator.services.mozilla.com/D111595
2021-04-19 04:24:43 +00:00
Karl Tomlinson 59451b4c80 Bug 1704278 revert from transient to sticky activation requirement for getDisplayMedia() r=jib
Interim measure for the sake of postMessage() to cross-origin iframe with
allow="display-capture".

This reverts the behavioral change of
https://hg.mozilla.org/mozilla-central/rev/3faff9d75a5d#l1.35

Differential Revision: https://phabricator.services.mozilla.com/D112152
2021-04-17 00:00:26 +00:00
owlishDeveloper 618690bc1f WIP: Bug 1703707 - Replace cross-process OMXClient call with IPC to enable isolated process in Android r=geckoview-reviewers,aklotz,agi,jolin
Differential Revision: https://phabricator.services.mozilla.com/D111200
2021-04-16 23:34:35 +00:00
Cosmin Sabou 97cb55c97a Backed out changeset 80745715b204 (bug 1509951) for build bustages on MFTEncoder.cpp and linting opt failures. CLOSED TREE 2021-04-16 23:12:35 +03:00
John Lin 4d1c01d79d Bug 1509951 - HW video encoder implementation for Windows. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D100437
2021-04-16 19:29:33 +00:00
Kris Maglione 62019b1fab Bug 1704686: Rename Document::GetTopLevelContentDocument. r=nika
It's deprecated, and returns null if the top document isn't in-process, so its
name should be clear on that point.

Differential Revision: https://phabricator.services.mozilla.com/D111771
2021-04-15 21:19:28 +00:00
Karl Tomlinson c91d7ab856 Bug 1698238 replace bool aIsChrome parameters with CallerType r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D111568
2021-04-15 06:40:03 +00:00
alwu 9d73a09ded Bug 1700830 - remove probe expiring in Firefox 90: MEDIA_CONTROL_HANDLE_PLAY_PAUSE_STOP_ACTIONS. r=bryce
Depends on D111657

Differential Revision: https://phabricator.services.mozilla.com/D111658
2021-04-14 16:56:58 +00:00
alwu e7caa49b23 Bug 1703444 - part2 : add more debug log. r=jbauman
Differential Revision: https://phabricator.services.mozilla.com/D111301
2021-04-13 04:41:31 +00:00
alwu c53d7b0160 Bug 1703444 - part1 : comment block should be preceded by a blank line. r=jbauman
Differential Revision: https://phabricator.services.mozilla.com/D111300
2021-04-13 04:41:30 +00:00
Karl Tomlinson 088d1e6ddd Bug 1698238 rename DevicesPromise to DeviceSetPromise r=pehrsons
for better distinction from DevicePromise.

Differential Revision: https://phabricator.services.mozilla.com/D111567
2021-04-13 01:32:56 +00:00
Karl Tomlinson 0d2acea096 Bug 1698238 document some GetUserMediaTask member variables r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D111563
2021-04-13 01:32:55 +00:00
Karl Tomlinson 8c33e16a46 Bug 1698238 clarify GetUserMediaStreamTask::mManager doc r=pehrsons
See also https://bugzilla.mozilla.org/show_bug.cgi?id=820978#c6

Depends on D108382

Differential Revision: https://phabricator.services.mozilla.com/D111562
2021-04-13 01:32:54 +00:00
Karl Tomlinson 70ab80c671 Bug 1698238 Add SelectAudioOutputTask r=jib,pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D108382
2021-04-13 01:32:54 +00:00
Karl Tomlinson 28bad219b2 Bug 1698238 remove obsolete null device comment r=pehrsons
This was added in
https://hg.mozilla.org/mozilla-central/rev/b80e81edc9f15fe93c4bdd4f4d0e93103c51400a#l3.486
but became obsolete and superseded by another comment as of
https://hg.mozilla.org/mozilla-central/rev/faa37c5e350819707f92e2f1f7860305bb413458#l1.43

Depends on D108381

Differential Revision: https://phabricator.services.mozilla.com/D111561
2021-04-13 01:32:54 +00:00
Bryce Seager van Dyk 4437e99191 Bug 1697641 - Gracefully handle webms with bogus timecodes that conflict other metadata. r=kinetik
This expands on existing checks when getting a webms buffered intervals. The
additional check ensures we don't end up with end < start due to our code that
clamps end at duration.

This patch moves those checks into their own helper function so as to reduce
clutter in GetBuffered.

Differential Revision: https://phabricator.services.mozilla.com/D111152
2021-04-12 16:07:07 +00:00
Karl Tomlinson d3c26012dd Bug 1698238 extract a GetUserMediaTask base class r=jib,pehrsons
in preparation for SelectAudioOutputTask.

Differential Revision: https://phabricator.services.mozilla.com/D108381
2021-04-11 22:58:38 +00:00
Mark Striemer 909ff1f4d9 Bug 1702330 - Graduate infobars to main proton pref r=jaws,marionette-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D110638
2021-04-10 19:56:10 +00:00
Dorel Luca 26ac39c8d5 Backed out 9 changesets (bug 1702330) for Mochitest failures in toolkit/components/url-classifier/tests/mochitest/test_reporturl.html. CLOSED TREE
Backed out changeset f84605e6fc8b (bug 1702330)
Backed out changeset 79c63bf11b29 (bug 1702330)
Backed out changeset 5425a2312f6e (bug 1702330)
Backed out changeset d76516e0d07d (bug 1702330)
Backed out changeset 3b75ffae171a (bug 1702330)
Backed out changeset 4bb6ceb6adb3 (bug 1702330)
Backed out changeset 607be325b4e8 (bug 1702330)
Backed out changeset 4b345ea924cc (bug 1702330)
Backed out changeset c7f0de372b21 (bug 1702330)
2021-04-10 07:48:08 +03:00
Mark Striemer 4119d385db Bug 1702330 - Graduate infobars to main proton pref r=jaws,marionette-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D110638
2021-04-10 00:30:39 +00:00
alwu 361e570777 Bug 1703938 - remove dead attribute `mMetadataInPartialBlockBuffer` in `MediaCacheStream`. r=bryce
mMetadataInPartialBlockBuffer never turns true [1] in our current code, it's always false so the related check is always useless. So we should remove this and modify related codes.

[1] https://searchfox.org/mozilla-central/search?q=symbol:F_%3CT_mozilla%3A%3AMediaCacheStream%3E_mMetadataInPartialBlockBuffer&redirect=false

Differential Revision: https://phabricator.services.mozilla.com/D111322
2021-04-09 16:03:44 +00:00
Dorel Luca 7c6d9844e5 Backed out 8 changesets (bug 1702330)for Browser-chrome failures in est/popups/browser_popup_blocker.js. CLOSED TREE
Backed out changeset b81511f8e157 (bug 1702330)
Backed out changeset 15f60f1d3f14 (bug 1702330)
Backed out changeset 809af1f94b4b (bug 1702330)
Backed out changeset 63cec3eadb4f (bug 1702330)
Backed out changeset b9964fb4dd70 (bug 1702330)
Backed out changeset 1e5ccb47056e (bug 1702330)
Backed out changeset 65faaeeb2339 (bug 1702330)
Backed out changeset e72fb8b52609 (bug 1702330)
2021-04-09 20:21:35 +03:00
Mark Striemer 71680c44e5 Bug 1702330 - Graduate infobars to main proton pref r=jaws,marionette-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D110638
2021-04-09 15:26:24 +00:00
Alexandru Michis b40e464292 Backed out 5 changesets (bug 1702330) for causing failures in browser_aboutNewTab_defaultBrowserNotification.js
CLOSED TREE

Backed out changeset 365fd1bb6dde (bug 1702330)
Backed out changeset eba73c72be18 (bug 1702330)
Backed out changeset e1277c21543f (bug 1702330)
Backed out changeset 907e4fcda266 (bug 1702330)
Backed out changeset eb2a8569ed02 (bug 1702330)
2021-04-09 03:34:23 +03:00
Mark Striemer 0201d62878 Bug 1702330 - Graduate infobars to main proton pref r=jaws,marionette-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D110638
2021-04-08 22:25:04 +00:00
Brindusan Cristian bb90b740d2 Backed out 2 changesets (bug 1703444) for causing xpcshell failures at test_parser.js. CLOSED TREE
Backed out changeset 200e93289ab1 (bug 1703444)
Backed out changeset b5a9076a78b5 (bug 1703444)
2021-04-09 01:46:04 +03:00
alwu 1f84d7f77f Bug 1703444 - part2 : add more debug log. r=jbauman
Differential Revision: https://phabricator.services.mozilla.com/D111301
2021-04-08 19:44:50 +00:00
alwu 38a3d53a58 Bug 1703444 - part1 : comment block should be preceded by a blank line. r=jbauman
Differential Revision: https://phabricator.services.mozilla.com/D111300
2021-04-08 19:44:49 +00:00
Jeff Muizelaar d91b3ee754 Bug 1703724 - Don't set the color space on macOS HW decoded video. r=mattwoodrow
It is already set by VideoCore to a profile with 1.9 gamma.  This causes
hw decoded video to have a different color profile than software decoded
video which isn't ideal but matches what happens in Chrome.

Differential Revision: https://phabricator.services.mozilla.com/D111218
2021-04-08 11:00:12 +00:00
alwu 9e3660de0c Bug 1694634 - part4 : correct the comment for LoopingDecodingState. r=bryce
At the time I worked on this state, it was only used for audio. There were some problems blocking the implementation for video, but the comment wasn't updated.

So we should correct the comment to make it reflect the real situation.

Differential Revision: https://phabricator.services.mozilla.com/D110881
2021-04-08 00:54:25 +00:00
alwu c9ea85809b Bug 1694634 - part2 : should preroll data to reopen the audio queue before starting the playback. r=bryce
When audio has reaches to EOS, we will call its `Finish()` to make it ended, and the audio queue can be reopen again by pushing new data.

Before we reopen the audio queue again, we should not start playback. Otherwise, `AudioSinkWrapper` would resolve end promise immediately [1]. The concept of reopening audio queue doesn't exist for other classes that access to the audio queue.

Therefore, we should set `mIsPrerolling=true` in order to wait for new data that can reopen the queue again.


[1] https://searchfox.org/mozilla-central/rev/166dfa51ee50207a253fc577b9a596e64f24258c/dom/media/mediasink/AudioSinkWrapper.cpp#156-165

Differential Revision: https://phabricator.services.mozilla.com/D110879
2021-04-08 00:54:24 +00:00
alwu 98639d646c Bug 1694634 - part1 : add debug log for media decoder. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D110878
2021-04-08 00:54:23 +00:00
Robert Bryer dbe52bb6dc Bug 1698401 - don't give PositionUpdate::ePeriodicUpdate when seeking, stopping timeMarchesOn() happening for a seek; add wpt for checking correct onenter fires on seek r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D108987
2021-04-07 20:18:30 +00:00
Andreas Pehrson 0250db43f1 Bug 1395819 - Remove unused method MediaEngineSource::Shutdown. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D109944
2021-04-07 12:39:55 +00:00
Andreas Pehrson 57605900f2 Bug 1395819 - Make SourceListeners per-device and rename them DeviceListener to reflect this. r=jib
This patch makes MediaManager notify of recording-device-events as soon as any
gUM-track has ended, as opposed to when all tracks in a gUM-request have ended.

This effectively makes temporary permissions per-track rather than per-request.

Differential Revision: https://phabricator.services.mozilla.com/D109943
2021-04-07 12:39:54 +00:00
alwu 73ec85076f Bug 1699772 - add profiler markers and labels in 'DecodedStream'. r=pehrsons,gerald
Differential Revision: https://phabricator.services.mozilla.com/D109099
2021-04-07 06:15:22 +00:00
alwu b63b46f586 Bug 1702530 - do not launch RDD process if XPCOM has started shutdown. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D110982
2021-04-07 04:42:35 +00:00
Andreas Pehrson a901c0f50a Bug 1695580 - Break out DelayedRunnable into its own files. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109778
2021-04-06 20:15:09 +00:00
David Parks cd6fd9bfe5 Bug 1682030 - Remove more dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,emilio
This is the second of two patches in this series that removes a large amount of now dead code from dom/plugins as part of removing all NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107150
2021-04-06 19:28:15 +00:00
Byron Campen [:bwc] 0049349e84 Bug 1702512: Add 53 to the list of allowed ports for webrtc. r=mjf
This is sometimes used by deployments that want to work around NATs that
block UDP.

Depends on D110948

Differential Revision: https://phabricator.services.mozilla.com/D110949
2021-04-06 18:49:48 +00:00
Byron Campen [:bwc] b686a3669d Bug 1702512: Test cases for bug. r=mjf
Differential Revision: https://phabricator.services.mozilla.com/D110948
2021-04-06 18:49:48 +00:00
Alexandru Michis 6cc119870c Backed out 3 changesets (bug 1395819) for causing cpp failures in MediaManager.cpp
CLOSED TREE

Backed out changeset 813c7ce3607b (bug 1395819)
Backed out changeset 46083fddeb0d (bug 1395819)
Backed out changeset 990441f04a86 (bug 1395819)
2021-04-06 19:13:45 +03:00
Andreas Pehrson 91a2eec7e9 Bug 1395819 - Remove unused method MediaEngineSource::Shutdown. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D109944
2021-04-06 14:54:02 +00:00
Andreas Pehrson 5af8f11c55 Bug 1395819 - Make SourceListeners per-device and rename them DeviceListener to reflect this. r=jib
This patch makes MediaManager notify of recording-device-events as soon as any
gUM-track has ended, as opposed to when all tracks in a gUM-request have ended.

This effectively makes temporary permissions per-track rather than per-request.

Differential Revision: https://phabricator.services.mozilla.com/D109943
2021-04-06 14:54:01 +00:00
Brindusan Cristian f78d18d827 Backed out 8 changesets (bug 1695580) for causing build bustages on DataMutex.h. CLOSED TREE
Backed out changeset ec0b0fcc8d88 (bug 1695580)
Backed out changeset 982a46056fcb (bug 1695580)
Backed out changeset e38e8b90f119 (bug 1695580)
Backed out changeset 6fdd154aa151 (bug 1695580)
Backed out changeset d04f7a7ec375 (bug 1695580)
Backed out changeset 2103cd9e58b7 (bug 1695580)
Backed out changeset de9a7dd7fc79 (bug 1695580)
Backed out changeset ae16f09be41b (bug 1695580)
2021-04-06 17:41:19 +03:00
Andreas Pehrson 25d202a7f3 Bug 1695580 - Break out DelayedRunnable into its own files. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109778
2021-04-06 12:16:10 +00:00