Commit graph

1484 commits

Author SHA1 Message Date
Paul Adenot
dfa27d2b44 Bug 1860492 - Remove theora usage from dom/media and dom/canvas. r=media-playback-reviewers,jgilbert,alwu
Differential Revision: https://phabricator.services.mozilla.com/D204053
2024-04-04 15:02:31 +00:00
Narcis Beleuzu
e3df66c4e8 Backed out 14 changesets (bug 1860492) for mda failure on test_closing_connections
Backed out changeset 9b8435c1c982 (bug 1860492)
Backed out changeset 08603e5ea8a0 (bug 1860492)
Backed out changeset 93086bc64d37 (bug 1860492)
Backed out changeset f8cbb9933469 (bug 1860492)
Backed out changeset f5e2a92235f1 (bug 1860492)
Backed out changeset 0038d6d54690 (bug 1860492)
Backed out changeset 24a1fb93d4a8 (bug 1860492)
Backed out changeset c2c11ee3f79f (bug 1860492)
Backed out changeset 9983c1ddee85 (bug 1860492)
Backed out changeset b9286e049dea (bug 1860492)
Backed out changeset d1d98783c88d (bug 1860492)
Backed out changeset 22dd17861e80 (bug 1860492)
Backed out changeset 7d823668fba7 (bug 1860492)
Backed out changeset 024863677345 (bug 1860492)
2024-04-04 01:43:26 +03:00
Paul Adenot
08ff38dc21 Bug 1860492 - Remove theora usage from dom/media and dom/canvas. r=media-playback-reviewers,jgilbert,alwu
Differential Revision: https://phabricator.services.mozilla.com/D204053
2024-04-03 11:11:39 +00:00
alwu
1c5ae984f3 Bug 1888265 - part5 : do not request debug info if shutdown has begun. r=media-playback-reviewers,padenot
Also, downgrade the assertion because this is just for debugging and
probe reporting usage, which is not something important enough to use a
diagnostic assertion.

Differential Revision: https://phabricator.services.mozilla.com/D206293
2024-04-02 20:25:08 +00:00
alwu
30616cf9ca Bug 1888265 - part4 : add a buffering time attribute. r=media-playback-reviewers,webidl,padenot,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D206087
2024-04-02 20:25:08 +00:00
Stanca Serban
3274be9ff2 Backed out 13 changesets (bug 1860492) for causing multiple failures.
Backed out changeset 1b6bef229ce4 (bug 1860492)
Backed out changeset 22a3235fe2dc (bug 1860492)
Backed out changeset a5b2e4d12e44 (bug 1860492)
Backed out changeset cbcb811ca382 (bug 1860492)
Backed out changeset d6a999866f19 (bug 1860492)
Backed out changeset 40cee82fa090 (bug 1860492)
Backed out changeset eeec1917ab49 (bug 1860492)
Backed out changeset cf1230802d5c (bug 1860492)
Backed out changeset b34aacf0e966 (bug 1860492)
Backed out changeset 45d137c795f1 (bug 1860492)
Backed out changeset fb667be5932d (bug 1860492)
Backed out changeset a6d22d73c8a5 (bug 1860492)
Backed out changeset c8b6c53698f5 (bug 1860492)
2024-03-22 18:18:12 +02:00
Paul Adenot
3308b725d6 Bug 1860492 - Remove theora usage from dom/media. r=media-playback-reviewers,jgilbert,alwu
Differential Revision: https://phabricator.services.mozilla.com/D204053
2024-03-22 14:16:30 +00:00
alwu
670ba7b802 Bug 1847286 - make the interval start time to audio's base. r=media-playback-reviewers,azebrowski
The base of seek target is 1,000,000 us (set from JS, in second)
but the audio base is usually 44100 or 48000 (or other). I'm guessing
there probably are rounding errors which cause incorrect frame
conversion then hit the assertion [1].

So we should make the interval in the audio base in the beginning before
doing any calculation.

[1] https://hg.mozilla.org/mozilla-central/file/58d067f89f59472dc1a89d573ccebb4850863efa/dom/media/MediaData.cpp#l111

Differential Revision: https://phabricator.services.mozilla.com/D187513
2023-09-06 20:28:29 +00:00
Paul Adenot
6478a3d66b Bug 1847754 - Make the precision of current position in the state machine always use the same precision. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D185667
2023-08-09 07:51:58 +00:00
alwu
854f3f2304 Bug 1844772 - part6 : don't request data while MDSM still waiting the data. r=padenot
This help avoid hitting the assertions [1].

[1] https://searchfox.org/mozilla-central/rev/50588a0b728b365afdd298debd35e8302efe7850/dom/media/MediaDecoderStateMachine.cpp#3874,3931

Differential Revision: https://phabricator.services.mozilla.com/D184784
2023-08-02 00:19:07 +00:00
alwu
65a656a0b7 Bug 1844772 - part4 : split audio into smaller chunks otherwise it might not be able to be pused into SPSC queue. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D184539
2023-08-02 00:19:06 +00:00
alwu
10c386cb00 Bug 1844772 - part3 : revert the audio sink underrun change. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D184513
2023-08-02 00:19:06 +00:00
alwu
a5bbb6a8fe Bug 1844772 - part1 : add silence audio data to fill the gap. r=padenot
As the audio clock would only move forward when it consumes real sample,
if we don't keep sending data when there is a gap between audio and
video, then the audio clock would stall.

Therefore, we need to create fake audio data to cover the gap between
audio and video if the audio track is shorter. But we don't need to
worry about the opposite situation, where the video track is shorter
than the audio track. Because the video sink would simply display the
last video frame to cover the gap.

Differential Revision: https://phabricator.services.mozilla.com/D184272
2023-08-02 00:19:05 +00:00
Iulian Moraru
2e7f9cbe0a Backed out 14 changesets (bug 1844772, bug 1845213) for causing mochitest-media failures on test_seamless_looping_shorter_audio_than_video.html. CLOSED TREE
Backed out changeset 2fab9105e443 (bug 1845213)
Backed out changeset b0ad2b902d38 (bug 1845213)
Backed out changeset b09469b6a769 (bug 1845213)
Backed out changeset 72e93e8c1a79 (bug 1845213)
Backed out changeset 32d708d3ccd6 (bug 1845213)
Backed out changeset 11d2d1f6205c (bug 1845213)
Backed out changeset de21e15f438f (bug 1845213)
Backed out changeset 3241b87d217e (bug 1845213)
Backed out changeset 960446a8f00d (bug 1844772)
Backed out changeset fa188d2eb292 (bug 1844772)
Backed out changeset 73fb70e5442e (bug 1844772)
Backed out changeset 2ebfc1c87f37 (bug 1844772)
Backed out changeset 84fcb0eb9da4 (bug 1844772)
Backed out changeset 692a25f62da9 (bug 1844772)
2023-08-01 07:54:39 +03:00
alwu
855734d2a9 Bug 1844772 - part6 : don't request data while MDSM still waiting the data. r=padenot
This help avoid hitting the assertions [1].

[1] https://searchfox.org/mozilla-central/rev/50588a0b728b365afdd298debd35e8302efe7850/dom/media/MediaDecoderStateMachine.cpp#3874,3931

Differential Revision: https://phabricator.services.mozilla.com/D184784
2023-08-01 00:02:38 +00:00
alwu
e75b4fc13d Bug 1844772 - part4 : split audio into smaller chunks otherwise it might not be able to be pused into SPSC queue. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D184539
2023-08-01 00:02:38 +00:00
alwu
2bf8437867 Bug 1844772 - part3 : revert the audio sink underrun change. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D184513
2023-08-01 00:02:38 +00:00
alwu
975b178ed0 Bug 1844772 - part1 : add silence audio data to fill the gap. r=padenot
As the audio clock would only move forward when it consumes real sample,
if we don't keep sending data when there is a gap between audio and
video, then the audio clock would stall.

Therefore, we need to create fake audio data to cover the gap between
audio and video if the audio track is shorter. But we don't need to
worry about the opposite situation, where the video track is shorter
than the audio track. Because the video sink would simply display the
last video frame to cover the gap.

Differential Revision: https://phabricator.services.mozilla.com/D184272
2023-08-01 00:02:37 +00:00
Iulian Moraru
ff3089f991 Backed out 14 changesets (bug 1845213, bug 1844772) for causing build bustages on MediaSourceDemuxer.cpp. CLOSED TREE
Backed out changeset c8559eff750d (bug 1845213)
Backed out changeset 0489f3e6696b (bug 1845213)
Backed out changeset 869cd7982fca (bug 1845213)
Backed out changeset a2b6728d47c6 (bug 1845213)
Backed out changeset 2e2468c5c300 (bug 1845213)
Backed out changeset 4c4bf3ad44a8 (bug 1845213)
Backed out changeset 2d3d0f6297de (bug 1845213)
Backed out changeset 3d24fe88db0d (bug 1845213)
Backed out changeset fb9eb5400943 (bug 1844772)
Backed out changeset a3407577bf02 (bug 1844772)
Backed out changeset 8d9acbf64797 (bug 1844772)
Backed out changeset 24a9921b9493 (bug 1844772)
Backed out changeset e94039a48a3a (bug 1844772)
Backed out changeset 36a12ece43ec (bug 1844772)
2023-08-01 01:57:34 +03:00
alwu
37bd805dc0 Bug 1844772 - part6 : don't request data while MDSM still waiting the data. r=padenot
This help avoid hitting the assertions [1].

[1] https://searchfox.org/mozilla-central/rev/50588a0b728b365afdd298debd35e8302efe7850/dom/media/MediaDecoderStateMachine.cpp#3874,3931

Differential Revision: https://phabricator.services.mozilla.com/D184784
2023-07-31 19:45:49 +00:00
alwu
f0ac1d6c7a Bug 1844772 - part4 : split audio into smaller chunks otherwise it might not be able to be pused into SPSC queue. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D184539
2023-07-31 19:45:49 +00:00
alwu
c5720b43a0 Bug 1844772 - part3 : revert the audio sink underrun change. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D184513
2023-07-31 19:45:49 +00:00
alwu
1418b654fb Bug 1844772 - part1 : add silence audio data to fill the gap. r=padenot
As the audio clock would only move forward when it consumes real sample,
if we don't keep sending data when there is a gap between audio and
video, then the audio clock would stall.

Therefore, we need to create fake audio data to cover the gap between
audio and video if the audio track is shorter. But we don't need to
worry about the opposite situation, where the video track is shorter
than the audio track. Because the video sink would simply display the
last video frame to cover the gap.

Differential Revision: https://phabricator.services.mozilla.com/D184272
2023-07-31 19:45:48 +00:00
Natalia Csoregi
cf366b2840 Backed out 3 changesets (bug 1693250) for causing high frequency failures on test_recreate_audio_sink_clock_time.html. CLOSED TREE
Backed out changeset 7a2f57793a3b (bug 1693250)
Backed out changeset f869096a85f2 (bug 1693250)
Backed out changeset 54b9fbe63086 (bug 1693250)
2023-07-18 06:01:09 +03:00
alwu
1a1007ed4f Bug 1693250 - part3 : add another test to check whether audio sink incorrectly inserts silence. r=media-playback-reviewers,webidl,saschanaz,padenot
Differential Revision: https://phabricator.services.mozilla.com/D183435
2023-07-17 19:54:24 +00:00
alwu
115342d93b Bug 1693250 - part2 : reset the audible state when the audio sink get shutdown. r=bryce,karlt
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
2023-07-17 19:54:24 +00:00
alwu
bca9c3708f Bug 1693250 - part1 : keep clock time being monotonically increased even if the media sink has been changed. r=bryce
This patch is used 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, then push a lot of silence. [1]

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

Differential Revision: https://phabricator.services.mozilla.com/D113548
2023-07-17 19:54:23 +00:00
alwu
86033f7417 Bug 1840933 - part1 : no need to set playback position to zero anymore. r=padenot
The original change was introduced when implementing seamless audio
looping, and it's no longer needed. Because now we would properly
adjust the offset of the media queue when entering the looping decoding
state to make the media time and the clock time consistent.

Differential Revision: https://phabricator.services.mozilla.com/D182526
2023-07-05 17:55:50 +00:00
alwu
31927af203 Bug 1826256 - set mOriginalDecodedDuration for single track when the track duration is known. r=padenot
If we seek directly to EOS, it's possible that we still can't know the
track duration because we don't have the last decoded data. Therefore,
we remove the assertion and make it as condition.

Differential Revision: https://phabricator.services.mozilla.com/D182417
2023-07-05 17:55:50 +00:00
Gregory Pappas
c3c4d4be10 Bug 1840980 - Rename media.resume-bkgnd-video-on-tabhover, media.suspend-bkgnd-video.delay-ms, and media.suspend-bkgnd-video.enabled prefs r=alwu
These are the only prefs that shorten background to bkgnd, this makes them very hard to find.

Differential Revision: https://phabricator.services.mozilla.com/D182430
2023-07-04 11:26:35 +00:00
Karl Tomlinson
d7940eeeb5 Bug 1829068 retain the same AudioSinkWrapper when switching output devices r=padenot
This allows video playback to continue uninterrupted.

The AudioSinkWrapper now maintains the correct playback position in the media
data.  Previously the replacement AudioSinkWrapper started its clock at the
"current playback position" from the MediaDecoderStateMachine, which did not
include additional time from looping, so silence would be played until the
missing time had passed.

The AudioSinkWrapper now continues to periodically attempt to open a new
output device if not initially available.  Previously such attempts were only
performed on state changes such as seeking or unmuting.

The promise returned from MediaDecoderStateMachine::InvokeSetSink() now
resolves regardless of whether the new device can be opened successfully.
Previously the promise could be rejected if the device was necessary for audio
output at the time of the call but no check for device availability (beyond
that of device enumeration) was performed if playback was suspended or muted
or if a subsequent device change had already been queued.  Even previously the
underlying device was changed even when the promise was rejected and could be
used if a state change occurred.

Differential Revision: https://phabricator.services.mozilla.com/D181975
2023-06-27 08:53:50 +00:00
Karl Tomlinson
7fa10acf9d Bug 1829068 don't reject for setSinkId() on media element because of MediaElementAudioSourceNode r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D181974
2023-06-27 08:53:50 +00:00
Cristian Tuns
c32f4885e4 Backed out 3 changesets (bug 1829068) for causing wpt failures in setSinkId-with-MediaElementAudioSourceNode.https.html CLOSED TREE
Backed out changeset 40cf2b588396 (bug 1829068)
Backed out changeset 1a8f8cda9b25 (bug 1829068)
Backed out changeset 5eb680967020 (bug 1829068)
2023-06-27 01:25:48 -04:00
Karl Tomlinson
b43ac02876 Bug 1829068 retain the same AudioSinkWrapper when switching output devices r=padenot
This allows video playback to continue uninterrupted.

The AudioSinkWrapper now maintains the correct playback position in the media
data.  Previously the replacement AudioSinkWrapper started its clock at the
"current playback position" from the MediaDecoderStateMachine, which did not
include additional time from looping, so silence would be played until the
missing time had passed.

The AudioSinkWrapper now continues to periodically attempt to open a new
output device if not initially available.  Previously such attempts were only
performed on state changes such as seeking or unmuting.

The promise returned from MediaDecoderStateMachine::InvokeSetSink() now
resolves regardless of whether the new device can be opened successfully.
Previously the promise could be rejected if the device was necessary for audio
output at the time of the call but no check for device availability (beyond
that of device enumeration) was performed if playback was suspended or muted
or if a subsequent device change had already been queued.  Even previously the
underlying device was changed even when the promise was rejected and could be
used if a state change occurred.

Differential Revision: https://phabricator.services.mozilla.com/D181975
2023-06-27 03:22:10 +00:00
Karl Tomlinson
ea13c5f68b Bug 1829068 don't reject for setSinkId() on media element because of MediaElementAudioSourceNode r=padenot
Depends on D181973

Differential Revision: https://phabricator.services.mozilla.com/D181974
2023-06-27 02:40:46 +00:00
Andreas Pehrson
6ce8ffae02 Bug 1839889 - In media playback move some state mirroring to (main thread) canonical-initiated connections. r=alwu
This shortens the time it takes to establish the connections for canonicals
living on the main thread, from the thread hop chain:
main thread (MediaDecoderStateMachine::Init)
  -> state machine task queue (Mirror::Connect)
  -> main thread (AbstractCanonical::AddMirror)
  -> state machine task queue (AbstractMirror::UpdateValue)

to the thread hop chain:
main thread (MediaDecoderStateMachine::Init + Canonical::ConnectMirror)
  -> state machine task queue (Mirror::AbstractUpdateValue)

No races exist here as MediaDecoderStateMachine initiates its shutdown on main
thread and continues on the task queue (where the mirrors live).

Differential Revision: https://phabricator.services.mozilla.com/D181086
2023-06-22 23:11:14 +00:00
Andreas Pehrson
9fc3480761 Bug 1837570 - Remove unused MediaDecoderStateMachine::CanonicalOutputTracks. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D181085
2023-06-22 15:00:24 +00:00
Norisz Fay
fe4144277b Backed out 9 changesets (bug 1837570) for causing failures on browser_utility_audio_shutdown.js, test_seamless_looping.html, browser_audio_telemetry_content.js CLOSED TREE
Backed out changeset 1c00f9d954b4 (bug 1837570)
Backed out changeset aeeff254fdd7 (bug 1837570)
Backed out changeset a2f55894361a (bug 1837570)
Backed out changeset e9c7a524c784 (bug 1837570)
Backed out changeset 7954e2994d72 (bug 1837570)
Backed out changeset 727f6d7e1b61 (bug 1837570)
Backed out changeset bd367313702f (bug 1837570)
Backed out changeset 462c505677cc (bug 1837570)
Backed out changeset ff50fae470fa (bug 1837570)
2023-06-22 01:14:25 +03:00
Andreas Pehrson
b482442218 Bug 1837570 - In media playback move some state mirroring to (main thread) canonical-initiated connections. r=alwu
This shortens the time it takes to establish the connections for canonicals
living on the main thread, from the thread hop chain:
main thread (MediaDecoderStateMachine::Init)
  -> state machine task queue (Mirror::Connect)
  -> main thread (AbstractCanonical::AddMirror)
  -> state machine task queue (AbstractMirror::UpdateValue)

to the thread hop chain:
main thread (MediaDecoderStateMachine::Init + Canonical::ConnectMirror)
  -> state machine task queue (Mirror::AbstractUpdateValue)

No races exist here as MediaDecoderStateMachine initiates its shutdown on main
thread and continues on the task queue (where the mirrors live).

Differential Revision: https://phabricator.services.mozilla.com/D181086
2023-06-21 20:38:42 +00:00
Andreas Pehrson
0c5f697557 Bug 1837570 - Remove unused MediaDecoderStateMachine::CanonicalOutputTracks. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D181085
2023-06-21 20:38:41 +00:00
Karl Tomlinson
c7bb5a4869 Bug 1829054 store new AudioSink in a UniquePtr immediately r=padenot
to remove risk of leak.

Depends on D180651

Differential Revision: https://phabricator.services.mozilla.com/D180652
2023-06-13 04:22:21 +00:00
Karl Tomlinson
121fecf564 Bug 1829054 use std::function to reduce templating and indirection of AudioSink creation r=padenot
Depends on D180650

Differential Revision: https://phabricator.services.mozilla.com/D180651
2023-06-13 04:22:21 +00:00
Sandor Molnar
205dc0d0e6 Backed out 4 changesets (bug 1829054) for causing mda failures. CLOSED TREE
Backed out changeset 2fbfefb8c6cf (bug 1829054)
Backed out changeset b7125a21f04f (bug 1829054)
Backed out changeset 1cce87bd67c5 (bug 1829054)
Backed out changeset 1638fd63ec28 (bug 1829054)
2023-06-13 05:31:29 +03:00
Karl Tomlinson
27643a8443 Bug 1829054 store new AudioSink in a UniquePtr immediately r=padenot
to remove risk of leak.

Depends on D180651

Differential Revision: https://phabricator.services.mozilla.com/D180652
2023-06-13 01:13:37 +00:00
Karl Tomlinson
8c09a2586d Bug 1829054 use std::function to reduce templating and indirection of AudioSink creation r=padenot
Depends on D180650

Differential Revision: https://phabricator.services.mozilla.com/D180651
2023-06-13 01:13:37 +00:00
Paul Adenot
45502ddf4c Bug 1817997 - When checking if a media has been seeked to the end, take into account the resolution of time values. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D173529
2023-05-24 13:18:42 +00:00
Cosmin Sabou
5fd965f028 Backed out 80 changesets (bug 1821362, bug 1703812, bug 1817997) for causing media crashes as in Bug 1833890. a=backout
Backed out changeset f2113c9b661f (bug 1817997)
Backed out changeset f1ecfbba7ed2 (bug 1703812)
Backed out changeset 011cece33b0d (bug 1817997)
Backed out changeset 4b42659090f3 (bug 1817997)
Backed out changeset 2d92f903dd66 (bug 1817997)
Backed out changeset 0ef13d357ee3 (bug 1817997)
Backed out changeset 7353f869efd2 (bug 1703812)
Backed out changeset 14b061d0f595 (bug 1817997)
Backed out changeset d29bc29397c8 (bug 1703812)
Backed out changeset 54c3294f0839 (bug 1817997)
Backed out changeset b9f2e1155bd7 (bug 1817997)
Backed out changeset d5d5d390dcbf (bug 1817997)
Backed out changeset 8fca27bd0f6b (bug 1817997)
Backed out changeset 670c599a3b99 (bug 1817997)
Backed out changeset deea3077f762 (bug 1817997)
Backed out changeset 25ecea0f3d49 (bug 1817997)
Backed out changeset 35ab3ed5e3fc (bug 1817997)
Backed out changeset f516a428ba32 (bug 1817997)
Backed out changeset e589b4d30995 (bug 1817997)
Backed out changeset d096b9cc905d (bug 1817997)
Backed out changeset 2952a6fa06e5 (bug 1817997)
Backed out changeset c1ac4c31ad9a (bug 1817997)
Backed out changeset 04c60cd83c5f (bug 1821362)
Backed out changeset 6dd80575e551 (bug 1821362)
Backed out changeset b86b569ecd46 (bug 1817997)
Backed out changeset 412e0a9ec4e8 (bug 1817997)
Backed out changeset 8e0dcf163138 (bug 1817997)
Backed out changeset 7af506896930 (bug 1817997)
Backed out changeset 29f7cd2b341c (bug 1817997)
Backed out changeset 7f64e65d9497 (bug 1817997)
Backed out changeset 89c241451a32 (bug 1817997)
Backed out changeset 66e4a26e1ebe (bug 1817997)
Backed out changeset ea1aebd4e245 (bug 1817997)
Backed out changeset 2d88a5915db9 (bug 1817997)
Backed out changeset 697ec1928f9c (bug 1817997)
Backed out changeset 41c0bd1133c5 (bug 1817997)
Backed out changeset b20cc750c020 (bug 1817997)
Backed out changeset dc5fd84a3a4c (bug 1703812)
Backed out changeset efa6d130d4eb (bug 1703812)
Backed out changeset 20d9b7cf0ddc (bug 1703812)
Backed out changeset e77c61e8fad2 (bug 1703812)
Backed out changeset 582d5c680e5a (bug 1703812)
Backed out changeset 96c9aacc6811 (bug 1703812)
Backed out changeset 56ec4a57a6a6 (bug 1703812)
Backed out changeset 8f96c8811675 (bug 1703812)
Backed out changeset a79a2f1b2b51 (bug 1703812)
Backed out changeset 07eb8b2c5b9f (bug 1703812)
Backed out changeset bae2b2fb9759 (bug 1703812)
Backed out changeset 38b0416538f3 (bug 1703812)
Backed out changeset b27b54c95cf2 (bug 1703812)
Backed out changeset cab00065d83d (bug 1703812)
Backed out changeset ab44727b2e1a (bug 1703812)
Backed out changeset b7fdcb494670 (bug 1703812)
Backed out changeset 73db43d49c6d (bug 1703812)
Backed out changeset ce754dbfb862 (bug 1703812)
Backed out changeset d694726a3ee6 (bug 1703812)
Backed out changeset 6acede55acbb (bug 1703812)
Backed out changeset 86e7d4784a20 (bug 1703812)
Backed out changeset 6b2e055d9314 (bug 1703812)
Backed out changeset b08695e5728a (bug 1703812)
Backed out changeset 3b8a0081fd10 (bug 1703812)
Backed out changeset 3a163596f982 (bug 1703812)
Backed out changeset 5be1d4b282ab (bug 1703812)
Backed out changeset 1ce012d7509e (bug 1703812)
Backed out changeset ee2fab5881c7 (bug 1703812)
Backed out changeset 62941a522893 (bug 1703812)
Backed out changeset d4f11dc33eed (bug 1703812)
Backed out changeset 781bb4c3cc02 (bug 1703812)
Backed out changeset f070e0de0566 (bug 1703812)
Backed out changeset 9f65c67ba2a6 (bug 1703812)
Backed out changeset 1e76eecb85e2 (bug 1703812)
Backed out changeset 953432408a83 (bug 1703812)
Backed out changeset fd1dc92d3911 (bug 1703812)
Backed out changeset 34d56948c6b6 (bug 1703812)
Backed out changeset 2ba7ca61ecc3 (bug 1703812)
Backed out changeset 545253c469e6 (bug 1703812)
Backed out changeset fb4a61ab1300 (bug 1703812)
Backed out changeset bf07b3cfd3d5 (bug 1703812)
Backed out changeset eaff51e7754b (bug 1703812)
Backed out changeset f5c485c41d13 (bug 1703812)
2023-05-19 14:49:57 +03:00
alwu
31afcd8587 Bug 1833266 - part1 : check whether MDSM supports given CDM proxy. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D178124
2023-05-18 23:58:20 +00:00
Paul Adenot
7cec06d1fe Bug 1817997 - When checking if a media has been seeked to the end, take into account the resolution of time values. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D173529
2023-05-17 15:47:06 +00:00
alwu
cca694c2ac Bug 1829086 - part9 : prevent non-looping state from incorrectly adjust clock time, resulting in incorrect events. r=padenot
The reason of adjusting the clock time is because the playback keeps
running during seamless looping, so we usually normalize the clock
time into [0, duration].

That assumes the duration is X s, but in the end the clock goes X+1 s,
which could be due to using the system clock for either muted audio
track or a video-only track. That X+1 won't acctually be reflected on
the media timetime because we would trim it before setting the media
time [1].

However, If we've set the `mOriginalDecodedDuration` before, and somehow
now we're not in the seamless looping state (it could be either canceling
the looping, or fallbacking to the non-seamless looping), then the clock
time would incorrectly become 1 if we use modulo to adjust the time.

That incorrect time change would trigger the seeking/seeked event [2]
which volates the spec.

[1]
https://searchfox.org/mozilla-central/rev/4a5c56f4aca291802ce27320cd9a752dd5dd955e/dom/media/MediaDecoderStateMachine.cpp#4233-4236

[2]
https://searchfox.org/mozilla-central/rev/4a5c56f4aca291802ce27320cd9a752dd5dd955e/dom/media/MediaDecoder.cpp#972-974,998-1006

Differential Revision: https://phabricator.services.mozilla.com/D177573
2023-05-15 16:49:14 +00:00