[webkit-reviews] review granted: [Bug 180081] [EME] Add the CENC initData support in ClearKey CDM : [Attachment 329713] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 22 04:20:59 PST 2017


Xabier Rodríguez Calvar <calvaris at igalia.com> has granted Yacine Bandou
<bandou.yacine at gmail.com>'s request for review:
Bug 180081: [EME] Add the CENC initData support in ClearKey CDM
https://bugs.webkit.org/show_bug.cgi?id=180081

Attachment 329713: Patch

https://bugs.webkit.org/attachment.cgi?id=329713&action=review




--- Comment #7 from Xabier Rodríguez Calvar <calvaris at igalia.com> ---
Comment on attachment 329713
  --> https://bugs.webkit.org/attachment.cgi?id=329713
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=329713&action=review

> Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:50
> +const uint8_t ClearKeyCencSystemId[] = { 0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2,
0x4d, 0x02, 0xac, 0xe3, 0x3c, 0x1e, 0x52, 0xe2, 0xfb, 0x4b };
> +const unsigned ClearKeyCencSystemIdSize = sizeof(ClearKeyCencSystemId);
> +const unsigned KIDSize = 16;

These things are variables, their names should begin with non-capital. I guess
the naming rules would require that KIDSize -> keyIdSize;

> Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:172
> +    if (initData.isEmpty() ||  initData.size() >
std::numeric_limits<unsigned>::max())

There are two spaces before initData.size().

> Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:185
> +	   if (index + 12 +  ClearKeyCencSystemIdSize >= initDataSize)

There are two spaces before ClearKeyCenc...

> Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:208
> +    keyIdsMap.first = data[index + 3]; // Read the KeyIdsCount

Missing period at the end of the comment.

> Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:220
> +// This function checks if the initData sharedBuffer is a validate CENC
initData.

...is a valid...

> Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:251
> +	   String keyID = WTF::base64URLEncode(&data[index], KIDSize);

keyId


More information about the webkit-reviews mailing list