Summary: | Add support for parsing FairPlayStreaming PSSH boxes. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jer Noble <jer.noble> | ||||||||
Component: | New Bugs | Assignee: | Jer Noble <jer.noble> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, eric.carlson, ews-watchlist, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Jer Noble
2019-04-18 11:08:44 PDT
Created attachment 367737 [details]
Patch
Comment on attachment 367737 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367737&action=review Here are a couple of minor nits to consider while you redo the parts we talked about in person. > Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:189 > + SchemeAndKeyResult result; Minor nit: you can define this just before the loop so it isn't allocated if the array buffer allocation fails. > Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.cpp:64 > + if (m_size - (localOffset - offset) < 16) > + return false; > + > + auto buffer = view.possiblySharedBuffer(); > + if (!buffer) > + return false; > + > + auto keyID = buffer->slice(localOffset, localOffset + 16); > + localOffset += 16; > + > + m_keyID.resize(16); > + memcpy(m_keyID.data(), keyID->data(), 16); Nit: "16" should be a named constant. Created attachment 367744 [details]
Patch
Attachment 367744 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:35: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:37: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:47: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:50: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:60: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:61: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:71: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:72: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:82: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:83: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:93: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:95: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:96: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:97: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:98: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:111: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:113: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:114: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:127: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
Total errors found: 19 in 13 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 367745 [details]
Patch
Attachment 367745 [details] did not pass style-queue:
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:35: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:37: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:47: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:50: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:60: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:61: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:71: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:72: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:82: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:83: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:93: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:95: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:96: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:97: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:98: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:111: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:113: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:114: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
ERROR: Source/WebCore/platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:127: Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line. [build/webcore_export] [4]
Total errors found: 19 in 13 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 367745 [details] Patch Clearing flags on attachment: 367745 Committed r244439: <https://trac.webkit.org/changeset/244439> All reviewed patches have been landed. Closing bug. |