Title: [175331] trunk/Source/WebCore
- Revision
- 175331
- Author
- [email protected]
- Date
- 2014-10-29 10:53:22 -0700 (Wed, 29 Oct 2014)
Log Message
[EME][Mac] MediaKeySession type "keyrelease" is ignored.
https://bugs.webkit.org/show_bug.cgi?id=138175
Reviewed by Eric Carlson.
To indicate that they would like to recevie expired session confirmation messages, clients
will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
this type needs to be updated to recognize "keyrelease" as a valid type.
Also, the code which validates update() requests needs to allow updates containing the string
"acknowledged", so that clients can request the confirmation messages be discarded.
* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::update):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (175330 => 175331)
--- trunk/Source/WebCore/ChangeLog 2014-10-29 17:41:10 UTC (rev 175330)
+++ trunk/Source/WebCore/ChangeLog 2014-10-29 17:53:22 UTC (rev 175331)
@@ -1,3 +1,22 @@
+2014-10-29 Jer Noble <[email protected]>
+
+ [EME][Mac] MediaKeySession type "keyrelease" is ignored.
+ https://bugs.webkit.org/show_bug.cgi?id=138175
+
+ Reviewed by Eric Carlson.
+
+ To indicate that they would like to recevie expired session confirmation messages, clients
+ will create a MediaKeySession with a type parameter of "keyrelease". The code which validates
+ this type needs to be updated to recognize "keyrelease" as a valid type.
+
+ Also, the code which validates update() requests needs to allow updates containing the string
+ "acknowledged", so that clients can request the confirmation messages be discarded.
+
+ * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
+ (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType):
+ * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
+ (WebCore::CDMSessionMediaSourceAVFObjC::update):
+
2014-10-28 Ada Chan <[email protected]>
Remove MediaSessionClient::hasMediaCharacteristics() and MediaSessionClient::mediaStateDidChange().
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm (175330 => 175331)
--- trunk/Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm 2014-10-29 17:41:10 UTC (rev 175330)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm 2014-10-29 17:53:22 UTC (rev 175331)
@@ -69,6 +69,9 @@
bool CDMPrivateMediaSourceAVFObjC::supportsMIMEType(const String& mimeType)
{
+ if (mimeType == "keyrelease")
+ return true;
+
MediaEngineSupportParameters parameters;
parameters.isMediaSource = true;
parameters.type = mimeType;
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm (175330 => 175331)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-10-29 17:41:10 UTC (rev 175330)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm 2014-10-29 17:53:22 UTC (rev 175331)
@@ -176,9 +176,6 @@
bool CDMSessionMediaSourceAVFObjC::update(Uint8Array* key, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode)
{
- if (m_mode == KeyRelease)
- return false;
-
bool shouldGenerateKeyRequest = !m_certificate || isEqual(key, "renew");
if (!m_certificate) {
LOG(Media, "CDMSessionMediaSourceAVFObjC::update(%p) - certificate data", this);
@@ -200,6 +197,9 @@
return true;
}
+ if (m_mode == KeyRelease)
+ return false;
+
RefPtr<SourceBufferPrivateAVFObjC> protectedSourceBuffer;
for (auto& sourceBuffer : m_sourceBuffers) {
if (sourceBuffer->protectedTrackID() != -1) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes