RESOLVED FIXED 203170
Add MediaCapabilities support for DolbyVision codecs.
https://bugs.webkit.org/show_bug.cgi?id=203170
Summary Add MediaCapabilities support for DolbyVision codecs.
Jer Noble
Reported 2019-10-18 16:19:50 PDT
Add MediaCapabilities support for DolbyVision codecs.
Attachments
Patch (24.59 KB, patch)
2019-10-18 16:21 PDT, Jer Noble
no flags
Patch for landing (24.71 KB, patch)
2019-10-18 17:15 PDT, Jer Noble
no flags
Patch for landing (24.85 KB, patch)
2019-10-21 13:19 PDT, Jer Noble
no flags
Patch for landing (24.87 KB, patch)
2019-10-21 13:37 PDT, Jer Noble
no flags
Jer Noble
Comment 1 2019-10-18 16:21:45 PDT
Jer Noble
Comment 2 2019-10-18 16:22:51 PDT
Eric Carlson
Comment 3 2019-10-18 16:47:24 PDT
Comment on attachment 381343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381343&action=review > Source/WebCore/platform/graphics/HEVCUtilities.cpp:178 > + switch (profileID) { > + case 9: return codecName == "avc1" || codecName == "avc3"; > + default: return codecName == "hvc1" || codecName == "hev1"; Nit: a switch statement with one case and a default is odd, why not just use: if (profileID == 9) return codecName == "avc1" || codecName == "avc3"; return codecName == "hvc1" || codecName == "hev1"; > Source/WebCore/platform/graphics/HEVCUtilities.cpp:189 > + if (nextElement == codecSplit.end()) > + return WTF::nullopt; if (nextElement == codecSplit.end() || ++nextElement == codecSplit.end()) return WTF::nullopt; > Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:196 > + auto& map = codecStringToCodecTypeMap(); > + auto findResult = map.find(parameters.codecName); > + if (findResult == map.end()) > + return false; > + auto codecType = findResult->value; Nit: Any reason to not wrap this in a function like you did with profileIDForAlphabeticDoViProfile and codecStringForDoViCodecType?
Jer Noble
Comment 4 2019-10-18 16:59:05 PDT
Comment on attachment 381343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=381343&action=review >> Source/WebCore/platform/graphics/HEVCUtilities.cpp:178 >> + default: return codecName == "hvc1" || codecName == "hev1"; > > Nit: a switch statement with one case and a default is odd, why not just use: > > if (profileID == 9) > return codecName == "avc1" || codecName == "avc3"; > > return codecName == "hvc1" || codecName == "hev1"; Sure. >> Source/WebCore/platform/graphics/HEVCUtilities.cpp:189 >> + return WTF::nullopt; > > if (nextElement == codecSplit.end() || ++nextElement == codecSplit.end()) > return WTF::nullopt; No this would skip the codec type portion of the string. Need that later. >> Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm:196 >> + auto codecType = findResult->value; > > Nit: Any reason to not wrap this in a function like you did with profileIDForAlphabeticDoViProfile and codecStringForDoViCodecType? I only split it out before because I ended up with multiple “auto& map =...” statements. But yes, I should convert this into a static query instead.
Jer Noble
Comment 5 2019-10-18 17:15:32 PDT
Created attachment 381352 [details] Patch for landing
Jer Noble
Comment 6 2019-10-21 13:19:56 PDT
Created attachment 381435 [details] Patch for landing
Jer Noble
Comment 7 2019-10-21 13:37:46 PDT
Created attachment 381441 [details] Patch for landing
WebKit Commit Bot
Comment 8 2019-10-21 16:47:19 PDT
Comment on attachment 381441 [details] Patch for landing Clearing flags on attachment: 381441 Committed r251396: <https://trac.webkit.org/changeset/251396>
WebKit Commit Bot
Comment 9 2019-10-21 16:47:21 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.