[EME] support update() for FairPlayStreaming in Modern EME API
Created attachment 328730 [details] Patch
<rdar://problem/35917563>
Comment on attachment 328730 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=328730&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:968 > + for (auto& sourceBuffer : m_mediaSourcePrivate->sourceBuffers()) > + sourceBuffer->setCDMInstance(&instance); > + > + m_cdmInstance = &instance; Nit: would it be safer to set m_cdmInstance first in case the source buffer callbacks have side effects?
Created attachment 328739 [details] Patch for landing
Created attachment 328749 [details] Patch for landing
Comment on attachment 328749 [details] Patch for landing Clearing flags on attachment: 328749 Committed r225766: <https://trac.webkit.org/changeset/225766>
All reviewed patches have been landed. Closing bug.
This appears to have broken the High Sierra build: https://build.webkit.org/builders/Apple%20High%20Sierra%20Debug%20%28Build%29/builds/2072/steps/compile-webkit/logs/errors > Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:770:71: error: cannot initialize a parameter of type 'id<AVContentKeyRecipient> _Nonnull' with an rvalue of type 'PtrType' (aka 'AVStreamDataParser *') It looks like the AVFoundationSPI definition of AVStreamDataParser wasn't set up to conform to the AVContentKeyRecipient @protocol. This should be fixed with something like: + #import <AVFoundation/AVContentKeySession.h> ... + #if GUARD + @interface AVStreamDataParser () <AVContentKeyRecipient> + @end + #endif But since AVContentKeyRecipient was only conditionally available: API_AVAILABLE(macos(10.12.4), ios(10.3), tvos(10.2), watchos(3.3)) @protocol AVContentKeyRecipient ... @end There will likely need to be some version GUARD above that makes sense.
> But since AVContentKeyRecipient was only conditionally available: > > API_AVAILABLE(macos(10.12.4), ios(10.3), tvos(10.2), watchos(3.3)) > @protocol AVContentKeyRecipient > ... > @end > > There will likely need to be some version GUARD above that makes sense. I guess HAVE(AVCONTENTKEYSESSION) might be an appropriate guard: #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300) #define HAVE_AVCONTENTKEYSESSION 1 #endif
I attempted a build fix: <https://trac.webkit.org/r225777> Lets see what the bots do!