[EME][Mac] Update CDMSessionMediaSourceAVFObjC to match new API provided by AVStreamS...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Oct 2014 17:32:41 +0000 (17:32 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Oct 2014 17:32:41 +0000 (17:32 +0000)
commit20b2df624f527c8f724f1d1ff76dbebb27051631
treea0ab3fe89edeaede2cb3faee2c5ba88fdf3d0f65
parentfe7bd0156438f2d3f1989b3b05d3bff6163c5d6e
[EME][Mac] Update CDMSessionMediaSourceAVFObjC to match new API provided by AVStreamSession
https://bugs.webkit.org/show_bug.cgi?id=137469

Reviewed by Brent Fulgham.

Update our forward declaration to match the API provided by AVStreamSession.
AVStreamSession now takes an error: parameter in its initialiazer. It also provides the
sessionIdentifier used by the CDM, which CDMSessionMediaSourceAVFObjC will use as the
value of sessionId. Having this identifier allows us to fire a
secure-proof-of-key-release message after the client calls MediaKeySession.close().
Because this call will now generate messages, which have to be responded to in order
to remove those proofs from storage, do not clear the CDMSession from MediaKeySession
after calling close().

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::~MediaKeySession):
(WebCore::MediaKeySession::close):
(WebCore::MediaKeySession::setError): Deleted.
(WebCore::MediaKeySession::sessionId): Deleted.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
(WebCore::CDMSessionMediaSourceAVFObjC::setSessionId):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(-[CDMSessionMediaSourceAVFObjCListener initWithParent:]):
(-[CDMSessionMediaSourceAVFObjCObserver dealloc]):
(-[CDMSessionMediaSourceAVFObjCObserver beginObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver stopObserving:]):
(-[CDMSessionMediaSourceAVFObjCObserver invalidate]):
(-[CDMSessionMediaSourceAVFObjCListener observeValueForKeyPath:ofObject:change:context:]):
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
(WebCore::CDMSessionMediaSourceAVFObjC::update):
(WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer):
(WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm