[webkit-changes] [WebKit/WebKit] b8180b: [Cocoa] sampleBufferContentKeySessionSupportEnable...

Jer Noble noreply at github.com
Tue Dec 12 11:22:33 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b8180b2e2e3d8fe4d03e502a7494117794c9467e
      https://github.com/WebKit/WebKit/commit/b8180b2e2e3d8fe4d03e502a7494117794c9467e
  Author: Jer Noble <jer.noble at apple.com>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm

  Log Message:
  -----------
  [Cocoa] sampleBufferContentKeySessionSupportEnabled: Not enqueueing frames during "pending" key state means key state never progresses beyond "pending"
https://bugs.webkit.org/show_bug.cgi?id=266284
rdar://119557042

Reviewed by Eric Carlson.

When the state of the AVContentKeyRequest/AVContentKey is "pending", the AVContentKeySession
is waiting to be connected with an AVSampleBufferDisplayLayer before updating that state to
"usable" or "restricted". The API contract when the sampleBufferContentKeySessionSupportEnabled
path is enabled is that the client will not enqueue samples for display unless it knows there
is a usable key for that sample. However, due to this behavior, the request/key is stuck in
the "pending" state.

Work around this behavior by still enqueueing samples when in the "pending" state, and in fact,
only block enqueueing samples when the key is in a known-failed state.

* Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::isAnyKeyUsable const):

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




More information about the webkit-changes mailing list