RESOLVED FIXED 225910
VP9 detection in Media Capabilities is broken in STP124
https://bugs.webkit.org/show_bug.cgi?id=225910
Summary VP9 detection in Media Capabilities is broken in STP124
youenn fablet
Reported 2021-05-18 01:16:40 PDT
Use https://jsfiddle.net/grdman/4n89ejzo/13 on BigSur with a Vp9 HW capable device.
Attachments
Patch (7.28 KB, patch)
2021-05-19 22:25 PDT, Jean-Yves Avenard [:jya]
no flags
Patch (7.28 KB, patch)
2021-05-19 23:09 PDT, Jean-Yves Avenard [:jya]
no flags
Radar WebKit Bug Importer
Comment 1 2021-05-18 01:16:55 PDT
Jean-Yves Avenard [:jya]
Comment 2 2021-05-19 22:25:04 PDT
Darin Adler
Comment 3 2021-05-19 22:51:55 PDT
Comment on attachment 429136 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429136&action=review > Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.h:66 > + static void EnsureCodecsRegistered(); WebKit coding style uses a lowercase "E" for this kind of function name. > Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm:67 > + static bool sInitDone = []() { We don’t normally use the "s" prefix for local variables. This idiom seems pretty nice for one time code; we should probably adopt it.
Jean-Yves Avenard [:jya]
Comment 4 2021-05-19 23:09:26 PDT
Jean-Yves Avenard [:jya]
Comment 5 2021-05-19 23:17:34 PDT
It's not just the detection of VP9 powerEfficient that is currently broken. If any Media Capabilities query is run before playing a video, it will state that the codec isn't supported. As shown with this fiddle; which will return: https://jsfiddle.net/pukj8ayo/2/ vp9 720p: not supported, not smooth and not power efficient. vp9 1080p: not supported, not smooth and not power efficient. vp9 4k: not supported, not smooth and not power efficient. vp9 8k: not supported, not smooth and not power efficient. h264 720p: supported, smooth and power efficient. h264 1080p: supported, smooth and power efficient. h264 4k: supported, smooth and power efficient. But will return: vp9 720p: supported, smooth and power efficient. vp9 1080p: supported, smooth and power efficient. vp9 4k: supported, smooth and power efficient. vp9 8k: supported, smooth and power efficient. h264 720p: supported, smooth and power efficient. h264 1080p: supported, smooth and power efficient. h264 4k: supported, smooth and power efficient. once you've played a file or add a <video/> element in the fidle.
EWS
Comment 6 2021-05-19 23:46:51 PDT
Committed r277776 (237937@main): <https://commits.webkit.org/237937@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429139 [details].
Eric Carlson
Comment 7 2021-05-20 09:34:13 PDT
Comment on attachment 429139 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429139&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:282 > + MediaSessionManagerCocoa::ensureCodecsRegistered(); You could call this from just MediaPlayer::buildMediaEnginesVector() instead of from every player factory.
Note You need to log in before you can comment on or make changes to this bug.