Changeset 194745 in webkit


Ignore:
Timestamp:
Jan 7, 2016, 5:05:47 PM (10 years ago)
Author:
jer.noble@apple.com
Message:

[EME] Secure stop information not written to disk
https://bugs.webkit.org/show_bug.cgi?id=152855

Reviewed by Eric Carlson.

Two separate bugs for the two APIs provided by AVFoundation. For the AVStreamSession path,
we were not calling the lazy-creation function which creates the AVStreamSession, and were
rather accessing the ivar directly. For the AVContentKeySession, we were not creating the
intermediate paths containing the secure stop database.

  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:

(WebCore::CDMSessionAVContentKeySession::contentKeySession):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r194736 r194745  
     12016-01-07  Jer Noble  <jer.noble@apple.com>
     2
     3        [EME] Secure stop information not written to disk
     4        https://bugs.webkit.org/show_bug.cgi?id=152855
     5
     6        Reviewed by Eric Carlson.
     7
     8        Two separate bugs for the two APIs provided by AVFoundation. For the AVStreamSession path,
     9        we were not calling the lazy-creation function which creates the AVStreamSession, and were
     10        rather accessing the ivar directly. For the AVContentKeySession, we were not creating the
     11        intermediate paths containing the secure stop database.
     12
     13        * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
     14        (WebCore::CDMSessionAVContentKeySession::contentKeySession):
     15        * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
     16        (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
     17
    1182016-01-07  Zalan Bujtas  <zalan@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm

    r193999 r194745  
    344344{
    345345    if (!m_contentKeySession) {
    346         m_contentKeySession = adoptNS([[getAVContentKeySessionClass() alloc] initWithStorageDirectoryAtURL:[NSURL fileURLWithPath:storagePath()]]);
     346
     347        String storagePath = this->storagePath();
     348        if (storagePath.isEmpty())
     349            return nil;
     350
     351        String storageDirectory = directoryName(storagePath);
     352
     353        if (!fileExists(storageDirectory)) {
     354            if (!makeAllDirectories(storageDirectory))
     355                return nil;
     356        }
     357
     358        m_contentKeySession = adoptNS([[getAVContentKeySessionClass() alloc] initWithStorageDirectoryAtURL:[NSURL fileURLWithPath:storagePath]]);
    347359        m_contentKeySession.get().delegate = m_contentKeySessionDelegate.get();
    348360    }
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm

    r194496 r194745  
    711711
    712712    if (CDMSessionAVStreamSession* cdmStreamSession = toCDMSessionAVStreamSession(m_session))
    713         cdmStreamSession->setStreamSession(m_streamSession.get());
     713        cdmStreamSession->setStreamSession(streamSession());
    714714    for (auto& sourceBuffer : m_mediaSourcePrivate->sourceBuffers())
    715715        sourceBuffer->setCDMSession(m_session);
Note: See TracChangeset for help on using the changeset viewer.