[webkit-changes] [WebKit/WebKit] c748ef: [Cocoa] Read protected sample key requrements from...

Jer Noble noreply at github.com
Fri Apr 21 11:26:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c748ef5450bde560ea8741cc04c15266865bc7b1
      https://github.com/WebKit/WebKit/commit/c748ef5450bde560ea8741cc04c15266865bc7b1
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-04-21 (Fri, 21 Apr 2023)

  Changed paths:
    M Source/WebCore/platform/MediaSample.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h
    M Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
    M Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
    M Source/WebCore/platform/graphics/iso/ISOBox.cpp
    M Source/WebCore/platform/graphics/iso/ISOBox.h
    M Source/WebCore/platform/graphics/iso/ISOTrackEncryptionBox.cpp
    M Source/WebCore/platform/graphics/iso/ISOTrackEncryptionBox.h

  Log Message:
  -----------
  [Cocoa] Read protected sample key requrements from sample's CMFormatDescription
https://bugs.webkit.org/show_bug.cgi?id=255553
rdar://108162777

Reviewed by Eric Carlson.

Rather than extract keyIDs from the track in the initialization segment, extract the
keyIDs from the CMFormatDescription associated with each sample. The parser has already
done the association already at the point where it created the CMFormatDescription.

Modify the ISO box parsing methods to allow their parsers to operate on just the payload
portion of the relevent boxes, as the CMFormatDescription just stores the payload rather
than the full box.

* Source/WebCore/platform/MediaSample.h:
(WebCore::MediaSample::isProtected const):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
(WebCore::MediaSampleAVFObjC::commonInit):
(WebCore::MediaSampleAVFObjC::flags const):
(WebCore::MediaSampleAVFObjC::initializeTimes): Deleted.
* Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::canEnqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
* Source/WebCore/platform/graphics/iso/ISOBox.cpp:
(WebCore::ISOFullBox::parse):
(WebCore::ISOFullBox::parseVersionAndFlags):
* Source/WebCore/platform/graphics/iso/ISOBox.h:
* Source/WebCore/platform/graphics/iso/ISOTrackEncryptionBox.cpp:
(WebCore::ISOTrackEncryptionBox::parseWithoutTypeAndSize):
(WebCore::ISOTrackEncryptionBox::parse):
(WebCore::ISOTrackEncryptionBox::parsePayload):
* Source/WebCore/platform/graphics/iso/ISOTrackEncryptionBox.h:

Canonical link: https://commits.webkit.org/263254@main




More information about the webkit-changes mailing list