Commit graph

124 commits

Author SHA1 Message Date
Iulian Moraru
8869ba4cf1 Backed out 25 changesets (bug 1858958, bug 1859536, bug 1749044) for causing multiple build bustages on GleanMetricsBinding.cpp. CLOSED TREE
Backed out changeset ef3fdc0aff0b (bug 1749044)
Backed out changeset 1a7064c0b046 (bug 1749044)
Backed out changeset cfeaef572769 (bug 1749044)
Backed out changeset 3c961124ae96 (bug 1749044)
Backed out changeset 9fc353b8689f (bug 1749044)
Backed out changeset b8ef52c64b38 (bug 1749044)
Backed out changeset 4a4df823adf4 (bug 1749044)
Backed out changeset 6236dad2f515 (bug 1749044)
Backed out changeset fb81fa706f77 (bug 1858958)
Backed out changeset 82415829c98e (bug 1749044)
Backed out changeset 604de77ebdb0 (bug 1749044)
Backed out changeset 2766ff1803eb (bug 1749044)
Backed out changeset 51a9560dca83 (bug 1749044)
Backed out changeset 2cc1feaa4278 (bug 1749044)
Backed out changeset c41a5aac3192 (bug 1858958)
Backed out changeset db5ccbbdbbee (bug 1859536)
Backed out changeset 8b9076bc479a (bug 1859536)
Backed out changeset 27b465fe92a3 (bug 1858958)
Backed out changeset 9aa8c8ed1ff7 (bug 1858958)
Backed out changeset 94c203600f2c (bug 1858958)
Backed out changeset 8f0d8d45d132 (bug 1858958)
Backed out changeset eb8c734baad4 (bug 1858958)
Backed out changeset c5b578de93bc (bug 1858958)
Backed out changeset 5e6e4e89d29f (bug 1858958)
Backed out changeset b76bd797f69d (bug 1858958)
2024-03-06 14:15:50 +02:00
Paul Adenot
abc1708397 Bug 1749044 - Improve some error messages. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D192355
2024-03-06 11:14:22 +00:00
Paul Adenot
55b24f4803 Bug 1749044 - Move GetExtraData from VideoDecoder.cpp to WebCodecsUtils.cpp. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D192352
2024-03-06 11:14:21 +00:00
Norisz Fay
f21db3bc57 Backed out 25 changesets (bug 1858958, bug 1749044, bug 1859536) for causing bustages on AppleATDecoder.cpp and AudioData related failures CLOSED TREE
Backed out changeset 21402b00cc81 (bug 1749044)
Backed out changeset 20d58a991964 (bug 1749044)
Backed out changeset 6e7ee116c90e (bug 1749044)
Backed out changeset 7a3cd601c7a1 (bug 1749044)
Backed out changeset 2ec9140f8724 (bug 1749044)
Backed out changeset a33714bc62c4 (bug 1749044)
Backed out changeset 583617a9e949 (bug 1749044)
Backed out changeset 145a8190f6fc (bug 1749044)
Backed out changeset e67de77033d2 (bug 1858958)
Backed out changeset e8a916a76c18 (bug 1749044)
Backed out changeset dec9ce7a61a0 (bug 1749044)
Backed out changeset 961feba09c71 (bug 1749044)
Backed out changeset 7badb720d24b (bug 1749044)
Backed out changeset fd71b745d729 (bug 1749044)
Backed out changeset 874f792bb36f (bug 1858958)
Backed out changeset 22ff6bc3cb95 (bug 1859536)
Backed out changeset a04a238d1688 (bug 1859536)
Backed out changeset ac3bb1773f97 (bug 1858958)
Backed out changeset 886b419887c8 (bug 1858958)
Backed out changeset ea637545c497 (bug 1858958)
Backed out changeset fdc20c3b80d6 (bug 1858958)
Backed out changeset 5fec5cbf2af7 (bug 1858958)
Backed out changeset 73fffa240ac4 (bug 1858958)
Backed out changeset 25477e671dc0 (bug 1858958)
Backed out changeset 745df1a31541 (bug 1858958)
2024-03-05 19:06:31 +02:00
Paul Adenot
49771414ca Bug 1749044 - Improve some error messages. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D192355
2024-03-05 15:52:18 +00:00
Paul Adenot
72201eb898 Bug 1749044 - Move GetExtraData from VideoDecoder.cpp to WebCodecsUtils.cpp. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D192352
2024-03-05 15:52:17 +00:00
Peter Van der Beken
62bdf442eb Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-02 07:50:25 +00:00
Peter Van der Beken
5362ae6501 Bug 1640839 - Stop using ImageBitmapFormat::EndGuard_. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D201340
2024-03-02 07:50:23 +00:00
Peter Van der Beken
6d4c6fde36 Bug 1640839 - Make WebIDL enum helper function to convert to string return an actual string. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201337
2024-03-02 07:50:21 +00:00
Natalia Csoregi
8c2521e9d5 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
763356e4fb Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-01 14:31:15 +00:00
Peter Van der Beken
1ef8b9be11 Bug 1640839 - Stop using ImageBitmapFormat::EndGuard_. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D201340
2024-03-01 14:31:13 +00:00
Peter Van der Beken
a1122e9bfc Bug 1640839 - Make WebIDL enum helper function to convert to string return an actual string. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201337
2024-03-01 14:31:11 +00:00
John Lin
d5e06859a5 Bug 1846796 - re-enable H.264 decoder on macOS for WebCodecs. r=chunmin
Also revert bug 1870346 to remove the pref that forces H.264 decoding on
macOS for testing.

Differential Revision: https://phabricator.services.mozilla.com/D202543
2024-02-26 18:43:14 +00:00
Chun-Min Chang
478aa64b7e Bug 1871768 - Add a log in VideoDecoder dtor r=padenot
Depends on D199179

Differential Revision: https://phabricator.services.mozilla.com/D199180
2024-02-01 01:23:51 +00:00
Andrew Osmond
f1d4ad4811 Bug 1872311 - Prefer to use frame size as display size with WebCodecs. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D198734
2024-01-25 01:15:08 +00:00
Iulian Moraru
db1abf5bed Backed out changeset d2c0a33fe505 (bug 1872311) for causing wpt failures related to webcodecs. 2024-01-18 22:13:36 +02:00
Andrew Osmond
d5083c74fc Bug 1872311 - Prefer to use frame size as display size with WebCodecs. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D198734
2024-01-18 16:36:03 +00:00
Cristian Tuns
c2b842bcc6 Backed out changeset 03d1aa84a0fa (bug 1872311) for causing wpt failures in videoFrame-createImageBitmap.https.any.worker.html CLOSED TREE 2024-01-18 02:02:13 -05:00
Andrew Osmond
bfafb36f66 Bug 1872311 - Prefer to use frame size as display size with WebCodecs. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D198734
2024-01-18 01:15:12 +00:00
Chun-Min Chang
12dc755f3c Bug 1873100 - Replace Append(nsPrintfCString) by AppendPrintf in VideoDecoder r=media-playback-reviewers,alwu
Depends on D197736

Differential Revision: https://phabricator.services.mozilla.com/D197737
2024-01-05 04:39:59 +00:00
Chun-Min Chang
8d8cc1edd7 Bug 1863009 - Return error if AppendTypedArrayDataTo fails r=padenot
Bug 1690111 makes GetExtraData's memory allocation falliable. When the
allocation fails, GetExtraData should return an error instead of a null
nsTArray pointer.

Differential Revision: https://phabricator.services.mozilla.com/D192699
2023-12-27 22:04:27 +00:00
Paul Adenot
3ee9531433 Bug 1749047 - Set colorspace information on VideoFrame constructed from a GPUImage. r=pehrsons
There is a bit of a guess there as well, but a lot less than before.

https://bugzilla.mozilla.org/show_bug.cgi?id=1869825 has been filed to
investigate this, but there's various bits to it, in gfx and media.

Differential Revision: https://phabricator.services.mozilla.com/D196339
2023-12-22 21:39:17 +00:00
Paul Adenot
870313cab7 Bug 1749047 - Add the ability to print a VideoInfo and a VideoDecoderConfigInternal. r=chunmin,media-playback-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D196336
2023-12-22 21:39:16 +00:00
Paul Adenot
8b6c506211 Bug 1749047 - Guess more colorspace information when missing, based on the information present. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D196470
2023-12-22 21:39:16 +00:00
Paul Adenot
38371bdfaf Bug 1749047 - Allow some decoder to take their color info from the codec string. r=chunmin
https://searchfox.org/mozilla-central/rev/da48f565f70a57ac28862090828fbaa7fd8556f6/dom/media/VideoUtils.cpp#294
is one example of this.

Differential Revision: https://phabricator.services.mozilla.com/D196214
2023-12-22 21:39:16 +00:00
Paul Adenot
3dde641a77 Bug 1749047 - Allow printing a VideoDecoderConfig and a VideoDecoderConfigInternal. r=chunmin
This is very useful to understand in the log what config is output in what
encoder output callback, with respect to configure(...) calls.

Differential Revision: https://phabricator.services.mozilla.com/D196210
2023-12-22 21:39:14 +00:00
Paul Adenot
ed6d3e74ec Bug 1749047 - Set the color spaces in more cases on VideoFrame. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D195722
2023-12-22 21:39:12 +00:00
Paul Adenot
63356c3f30 Bug 1749047 - Move and deduplicate some utility functions to WebCodecUtils. r=chunmin
They will be reused for the encoding side.

Differential Revision: https://phabricator.services.mozilla.com/D195699
2023-12-22 21:39:05 +00:00
Andrew Osmond
d00fc5db08 Bug 1870346 - Add WebCodecs pref to force decoding of H264 on OSX for testing. r=media-playback-reviewers,chunmin
This is needed so that we can write talos tests that exercise different
codecs on Windows/OSX/Linux. We can't distinguish between platforms to
skip or gracefully fail this test for a particular platform, and since
the H264 we are testing with is able to be decoded successfully, let's
just make a pref to allow us (and others) to test with what we have
implemented even if partially broken.

Differential Revision: https://phabricator.services.mozilla.com/D196603
2023-12-15 22:18:41 +00:00
Paul Adenot
5233ff7ffc Bug 1865376 - Don't do meaningful work in VideoDecoder's dtor. r=chunmin
We can't have this happen.

Differential Revision: https://phabricator.services.mozilla.com/D194870
2023-12-07 10:21:26 +00:00
Paul Adenot
912d8f4763 Bug 1865376 - Fix warning: don't copy argument. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D194869
2023-12-07 10:21:26 +00:00
Paul Adenot
3a5dd08862 Bug 1865376 - Fix const-correctness around output callback. r=chunmin
Simple compilation fix for the previous patch, but orthogonal so I split it out.

Differential Revision: https://phabricator.services.mozilla.com/D194142
2023-12-07 10:21:24 +00:00
Chun-Min Chang
6546f1c709 Bug 1855636 - Return unsupported for H264 in WebCodecs on MacOS r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D192437
2023-11-02 15:46:31 +00:00
Chun-Min Chang
da559e7cf9 Bug 1840965 - Fix non-unified build error r=padenot
This patch moves VideoDecoderTraits and its friends from VideoDecoder
files to DecoderTypes so DecoderTemplate file can see VideoDecoderTraits
by including DecoderTypes and can declare a template with
VideoDecoderTraits as a base class for VideoDecoder

Differential Revision: https://phabricator.services.mozilla.com/D190632
2023-10-11 16:41:52 +00:00
Chun-Min Chang
2ca8228103 Bug 1840965 - Move Flush to template r=padenot
Depends on D189015

Differential Revision: https://phabricator.services.mozilla.com/D189016
2023-10-11 16:41:51 +00:00
Chun-Min Chang
b1051f95c9 Bug 1840965 - Move Decode to template r=padenot
This patches renames the OutputVideoFrames to OutputDecodedData and add
a function to convert DecodedData to the output type defined by the
template inheritance.

Depends on D188903

Differential Revision: https://phabricator.services.mozilla.com/D189015
2023-10-11 16:41:50 +00:00
Chun-Min Chang
331ece38c4 Bug 1840965 - Move Configure to template r=padenot
Depends on D188902

Differential Revision: https://phabricator.services.mozilla.com/D188903
2023-10-11 16:41:50 +00:00
Chun-Min Chang
ae1efbcdae Bug 1840965 - Log errors in Validate r=padenot
Depends on D188901

Differential Revision: https://phabricator.services.mozilla.com/D188902
2023-10-11 16:41:49 +00:00
Chun-Min Chang
39c1c44603 Bug 1840965 - Move ParseCodecString to WebCodecsUtils r=padenot
Depends on D188900

Differential Revision: https://phabricator.services.mozilla.com/D188901
2023-10-11 16:41:49 +00:00
Chun-Min Chang
5bb7975540 Bug 1840965 - Move Reset and Close to template r=padenot
Depends on D188899

Differential Revision: https://phabricator.services.mozilla.com/D188900
2023-10-11 16:41:49 +00:00
Chun-Min Chang
df2daa5e72 Bug 1840965 - Move State() and DecodeQueueSize() to template r=padenot
Depends on D188663

Differential Revision: https://phabricator.services.mozilla.com/D188664
2023-10-11 16:41:48 +00:00
Chun-Min Chang
a89754a092 Bug 1840965 - Add input-to-MediaRawData conversion to template r=padenot
This patch moves the input-to-MediaRawData conversion from DecodeMessage
to a template function so that the template inheritance can implement
its own conversion function.

Depends on D188538

Differential Revision: https://phabricator.services.mozilla.com/D188663
2023-10-11 16:41:47 +00:00
Chun-Min Chang
52fc080c64 Bug 1840965 - Create a decoder template r=padenot
This patch creates a C++ template that will be used as a base class of
WebCodecs' VideoDecoder and (future) AudioDecoder.

Currently, only the internal member variabls and functions are moved
into the template class. The common interfaces shared between the
VideoDecoder and the AudioDecoder will be moved to the template in the
following patches.

Note that some changes are made in this patch:
- Add a VideoDecoderTraits type to specify the types used in the decoder
  template
- Reset(const nsresult& aResult) and Close(...) for internal usages are
  renamed to ResetInternal in order to be distinguished from the
  Reset(ErrorResult& aRv) in the VideoDecoder's public interface
- ControlMessage-related classes become nested classes since they have
  member variables whose types depends on the template's typename
- DecodedDataToVideoFrame is generalized to a function named
  DecodedDataToOutputType that convert the decoded data to a specific
  type (e.g., VideoFrame for VideoDecoder)
- Rename CreateVideoInfo to CreateTrackInfo and move it to
  VideoDecoderTraits so that the decoder template can get a TrackInfo
  from the template inheritance
- Add a IsSupported method to VideoDecoderTraits so that the decoder
  template can know what codec its template ingeritance supports

Depends on D189012

Differential Revision: https://phabricator.services.mozilla.com/D188538
2023-10-11 16:41:47 +00:00
Chun-Min Chang
f0405f71fe Bug 1840965 - Rework CanDecode and its friends r=padenot
Depends on D188537

Differential Revision: https://phabricator.services.mozilla.com/D189012
2023-10-11 16:41:47 +00:00
Chun-Min Chang
df4fca62c7 Bug 1840965 - Forward declarations for helper classes r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D188537
2023-10-11 16:41:46 +00:00
Butkovits Atila
b642419c68 Backed out 14 changesets (bug 1840965) for causing bustages at DecoderTemplate.cpp. CLOSED TREE
Backed out changeset 85effc98ea3f (bug 1840965)
Backed out changeset b9d860c9e3db (bug 1840965)
Backed out changeset 1256f6ae660b (bug 1840965)
Backed out changeset de01c0a052af (bug 1840965)
Backed out changeset 63b4c6f83bc9 (bug 1840965)
Backed out changeset fa4ef4d675e3 (bug 1840965)
Backed out changeset e313ff51eaa7 (bug 1840965)
Backed out changeset 5e3e9670fc35 (bug 1840965)
Backed out changeset 2689f9277a89 (bug 1840965)
Backed out changeset 2b449894a1fc (bug 1840965)
Backed out changeset 44adca2aa7b7 (bug 1840965)
Backed out changeset 4c1d4aba133c (bug 1840965)
Backed out changeset 5a6431259f5a (bug 1840965)
Backed out changeset d93847b9a7e7 (bug 1840965)
2023-10-02 19:32:20 +03:00
Chun-Min Chang
17a6baba0e Bug 1840965 - Move Flush to template r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D189016
2023-10-02 15:54:01 +00:00
Chun-Min Chang
6c5416a4a2 Bug 1840965 - Move Decode to template r=padenot
This patches renames the OutputVideoFrames to OutputDecodedData and add
a function to convert DecodedData to the output type defined by the
template inheritance.

Differential Revision: https://phabricator.services.mozilla.com/D189015
2023-10-02 15:54:00 +00:00
Chun-Min Chang
f75a9dac7e Bug 1840965 - Move Configure to template r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D188903
2023-10-02 15:54:00 +00:00