Overhaul PlatformEncoderModules to prepare for Web Codecs
Categories
(Core :: Audio/Video: Web Codecs, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: padenot, Assigned: padenot)
References
Details
Attachments
(21 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
Depends on D195133
Assignee | ||
Comment 3•1 year ago
|
||
This change the configuration interface, simplifying it. It moves hardware codec
preference to config, move the task queue outside of the config, adds a source
pixel format config, removes usage of TrackInfo (that is really a playback side
thing), adds a bitrate mode configuration option (variable, constant,
quantizer).
This patch is not intended to contain any functional changes.
Depends on D195134
Assignee | ||
Comment 4•1 year ago
|
||
Depends on D195135
Assignee | ||
Comment 5•1 year ago
|
||
There contains lots of changes but no functional changes is intended.
Depends on D195136
Assignee | ||
Comment 6•1 year ago
|
||
Depends on D195137
Assignee | ||
Comment 7•1 year ago
|
||
Depends on D195138
Assignee | ||
Comment 8•1 year ago
|
||
Depends on D195139
Assignee | ||
Comment 9•1 year ago
|
||
Depends on D195140
Assignee | ||
Comment 10•1 year ago
|
||
Depends on D195141
Assignee | ||
Comment 11•1 year ago
|
||
The intent is that this doesn't not change the defaults, but allows configuring
more aspects of the encoding.
Depends on D195142
Assignee | ||
Comment 12•1 year ago
|
||
This is essential to encode e.g. <canvas> readbacks.
Depends on D195143
Assignee | ||
Comment 13•1 year ago
|
||
A configuration change is an array of sum types that each describe a
configuration change. Sometimes the configuration can be the empty type, in
which case the PEMs should attempt to set the value to a default that is
maybe platform-specific.
We will add to this list of possible changes over time but this is a good first
set.
Depends on D195145
Assignee | ||
Comment 14•1 year ago
|
||
Depends on D195146
Assignee | ||
Comment 15•1 year ago
|
||
Depends on D195147
Assignee | ||
Comment 16•1 year ago
|
||
No functional changes intended, it should behave the same.
Depends on D195148
Assignee | ||
Comment 17•1 year ago
|
||
Depends on D195149
Assignee | ||
Comment 18•1 year ago
|
||
Depends on D195150
Assignee | ||
Comment 19•1 year ago
|
||
A change: attempting to create an H264 encoder without specifying the profile is
expected to fail.
Depends on D195151
Assignee | ||
Comment 20•1 year ago
|
||
Comment 21•1 year ago
|
||
Comment 22•1 year ago
|
||
Backed out for causing build bustages on WMFEncoderModule.h.
This affected only Windows 2012 platforms.
[task 2023-12-07T14:21:16.817Z] 14:21:16 INFO - gmake[4]: Entering directory '/builds/worker/workspace/obj-build/dom/media/platforms'
[task 2023-12-07T14:21:16.818Z] 14:21:16 INFO - /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -fms-compatibility-version=19.29 -Xclang -std=c++17 -m32 -Xclang -ivfsoverlay -Xclang /builds/worker/fetches/vs/overlay.yaml -FoUnified_cpp_dom_media_platforms0.obj -c -I/builds/worker/workspace/obj-build/dist/stl_wrappers -guard:cf -DNDEBUG=1 -DTRIMMED=1 -DUNICODE -D_UNICODE -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -D_SECURE_ATL -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DWIN32 -D_WIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -DWINAPI_NO_BUNDLED_LIBRARIES -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/dom/media/platforms -I/builds/worker/workspace/obj-build/dom/media/platforms -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -FI /builds/worker/workspace/obj-build/mozilla-config.h -DMOZILLA_CLIENT -fcrash-diagnostics-dir=/builds/worker/artifacts -TP -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -Gy -Zc:inline -arch:SSE2 -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -Werror -W3 -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wenum-compare-conditional -Wenum-float-conversion -Wvolatile -Wno-error=deprecated -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-pragma -Wno-error=deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -Xclang -ffp-contract=off -Xclang -MP -Xclang -dependency-file -Xclang .deps/Unified_cpp_dom_media_platforms0.obj.pp -Xclang -MT -Xclang Unified_cpp_dom_media_platforms0.obj Unified_cpp_dom_media_platforms0.cpp
[task 2023-12-07T14:21:16.819Z] 14:21:16 INFO - In file included from Unified_cpp_dom_media_platforms0.cpp:29:
[task 2023-12-07T14:21:16.819Z] 14:21:16 INFO - In file included from /builds/worker/checkouts/gecko/dom/media/platforms/PEMFactory.cpp:20:
[task 2023-12-07T14:21:16.820Z] 14:21:16 ERROR - /builds/worker/workspace/obj-build/dist/include/WMFEncoderModule.h(15,60): error: only virtual member functions can be marked 'override'
[task 2023-12-07T14:21:16.820Z] 14:21:16 INFO - 15 | bool SupportsMimeType(const nsACString& aMimeType) const override;
[task 2023-12-07T14:21:16.821Z] 14:21:16 INFO - | ^~~~~~~~
[task 2023-12-07T14:21:16.821Z] 14:21:16 ERROR - /builds/worker/workspace/obj-build/dist/include/WMFEncoderModule.h(18,13): error: unknown type name 'CreateEncoderParams'; did you mean 'CreateDecoderParams'?
[task 2023-12-07T14:21:16.821Z] 14:21:16 INFO - 18 | const CreateEncoderParams& aParams,
[task 2023-12-07T14:21:16.822Z] 14:21:16 INFO - | ^~~~~~~~~~~~~~~~~~~
[task 2023-12-07T14:21:16.822Z] 14:21:16 INFO - | CreateDecoderParams
[task 2023-12-07T14:21:16.822Z] 14:21:16 INFO - /builds/worker/checkouts/gecko/dom/media/platforms/PDMFactory.h(29,8): note: 'CreateDecoderParams' declared here
[task 2023-12-07T14:21:16.823Z] 14:21:16 INFO - 29 | struct CreateDecoderParams;
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - | ^
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - In file included from Unified_cpp_dom_media_platforms0.cpp:29:
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - In file included from /builds/worker/checkouts/gecko/dom/media/platforms/PEMFactory.cpp:20:
[task 2023-12-07T14:21:16.826Z] 14:21:16 ERROR - /builds/worker/workspace/obj-build/dist/include/WMFEncoderModule.h(19,45): error: non-virtual member function marked 'override' hides virtual member function
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - 19 | const bool aHardwareNotAllowed) const override;
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - | ^
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - /builds/worker/checkouts/gecko/dom/media/platforms/PlatformEncoderModule.h(104,46): note: hidden overloaded virtual function 'mozilla::PlatformEncoderModule::CreateVideoEncoder' declared here: type mismatch at 1st parameter ('const EncoderConfig &' vs 'const CreateDecoderParams &')
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - 104 | virtual already_AddRefed<MediaDataEncoder> CreateVideoEncoder(
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - | ^
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - In file included from Unified_cpp_dom_media_platforms0.cpp:29:
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - In file included from /builds/worker/checkouts/gecko/dom/media/platforms/PEMFactory.cpp:20:
[task 2023-12-07T14:21:16.826Z] 14:21:16 ERROR - /builds/worker/workspace/obj-build/dist/include/WMFEncoderModule.h(13,7): error: abstract class is marked 'final' [-Werror,-Wabstract-final-class]
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - 13 | class WMFEncoderModule final : public PlatformEncoderModule {
[task 2023-12-07T14:21:16.826Z] 14:21:16 INFO - | ^
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - /builds/worker/checkouts/gecko/dom/media/platforms/PlatformEncoderModule.h(118,16): note: unimplemented pure virtual method 'Supports' in 'WMFEncoderModule'
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - 118 | virtual bool Supports(const EncoderConfig& aConfig) const = 0;
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - | ^
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - /builds/worker/checkouts/gecko/dom/media/platforms/PlatformEncoderModule.h(119,16): note: unimplemented pure virtual method 'SupportsCodec' in 'WMFEncoderModule'
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - 119 | virtual bool SupportsCodec(CodecType aCodecType) const = 0;
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - | ^
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - /builds/worker/checkouts/gecko/dom/media/platforms/PlatformEncoderModule.h(122,23): note: unimplemented pure virtual method 'GetName' in 'WMFEncoderModule'
[task 2023-12-07T14:21:16.827Z] 14:21:16 INFO - 122 | virtual const char* GetName() const = 0;
[task 2023-12-07T14:21:16.828Z] 14:21:16 INFO - | ^
[task 2023-12-07T14:21:16.828Z] 14:21:16 INFO - In file included from Unified_cpp_dom_media_platforms0.cpp:29:
[task 2023-12-07T14:21:16.828Z] 14:21:16 ERROR - /builds/worker/checkouts/gecko/dom/media/platforms/PEMFactory.cpp(45,3): error: use of undeclared identifier 'mModules'
[task 2023-12-07T14:21:16.828Z] 14:21:16 INFO - 45 | mModules.AppendElement(new WMFEncoderModule());
<...>
Assignee | ||
Updated•1 year ago
|
Comment 23•1 year ago
|
||
Comment 24•1 year ago
|
||
Backed out for causing Gtest failures at MediaDataEncoderTest.InvalidSize
Backout link: https://hg.mozilla.org/integration/autoland/rev/a4210c42b9afe415e09a9b75d0af80046da26ee6
Comment 25•1 year ago
•
|
||
(In reply to Sandor Molnar[:smolnar] from comment #24)
From the code, it looks like AppleEncoderModule::Supports
rejects 0
width or 0
height, so PEMFactory::FindPEM
and CreateEncoder
return nullptr
, then CreateVideoEncoder
/CreateH264Encoder
got a nullptr
and EXPECT_NE(e0x0, nullptr)
failed.
Assignee | ||
Comment 26•1 year ago
|
||
arg I pushed the verison of the patch without this fix.
Assignee | ||
Comment 27•1 year ago
|
||
Updated•1 year ago
|
Comment 28•1 year ago
|
||
Comment 29•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/75a513213553
https://hg.mozilla.org/mozilla-central/rev/a18b841b42ec
https://hg.mozilla.org/mozilla-central/rev/0e46d39d417e
https://hg.mozilla.org/mozilla-central/rev/2c27edf81401
https://hg.mozilla.org/mozilla-central/rev/4e5ad412c86d
https://hg.mozilla.org/mozilla-central/rev/ddb637201de9
https://hg.mozilla.org/mozilla-central/rev/0b4ad45024d3
https://hg.mozilla.org/mozilla-central/rev/c125453bdb25
https://hg.mozilla.org/mozilla-central/rev/f22739070fe7
https://hg.mozilla.org/mozilla-central/rev/49c8a5f17da6
https://hg.mozilla.org/mozilla-central/rev/9c246a20c9f4
https://hg.mozilla.org/mozilla-central/rev/cd76148ccea6
https://hg.mozilla.org/mozilla-central/rev/509a405ae33e
https://hg.mozilla.org/mozilla-central/rev/4cc3144411cf
https://hg.mozilla.org/mozilla-central/rev/fb9c7d8765ae
https://hg.mozilla.org/mozilla-central/rev/541592e33d98
https://hg.mozilla.org/mozilla-central/rev/fc1cf5f53b1f
https://hg.mozilla.org/mozilla-central/rev/e45477257958
https://hg.mozilla.org/mozilla-central/rev/61b624916ac3
https://hg.mozilla.org/mozilla-central/rev/ced184732f69
https://hg.mozilla.org/mozilla-central/rev/d7f89f5b4970
https://hg.mozilla.org/mozilla-central/rev/19967878c4b0
Description
•