Einzelnen Beitrag anzeigen

CHackbart

Registriert seit: 22. Okt 2012
260 Beiträge
 
#2

AW: Fairplay Apple

  Alt 5. Aug 2021, 12:27
Hallo,

ich glaube das geht so nicht. Hier ist etwas dazu geschrieben:
https://medium.com/@burak.oguz/ios-f...s-8aff3d4248dd

Im Prinzip müsstest so etwas machen:

Delphi-Quellcode:
 
type
  TContentKeyDelegate = class(TOCLocal, AVContentKeySessionDelegate)
  public
    procedure contentKeySession(session: AVContentKeySession;
      persistableContentKey: NSData; keyIdentifier: Pointer); overload; cdecl;
    procedure contentKeySession(session: AVContentKeySession;
      keyRequest: AVContentKeyRequest; err: NSError); overload; cdecl;
    function contentKeySession(session: AVContentKeySession;
      keyRequest: AVContentKeyRequest;
      retryReason: AVContentKeyRequestRetryReason): Boolean; overload; cdecl;
    procedure contentKeySession(session: AVContentKeySession;
      keyRequest: AVContentKeyRequest); overload; cdecl;
    procedure contentKeySession(session: AVContentKeySession;
      keyRequest: AVPersistableContentKeyRequest); overload; cdecl;
    procedure contentKeySessionContentKeyRequestDidSucceed
      (session: AVContentKeySession; keyRequest: AVContentKeyRequest); cdecl;
    procedure contentKeySessionContentProtectionSessionIdentifierDidChange
      (session: AVContentKeySession); cdecl;
    procedure contentKeySessionDidGenerateExpiredSessionReport
      (session: AVContentKeySession); cdecl;
    procedure contentKeySessionDidProvideRenewingContentKeyRequest
      (session: AVContentKeySession; keyRequest: AVContentKeyRequest); cdecl;
  end;

  TContentKeyManager = class
  private
    FContentKeySession: AVContentKeySession;
    FContentKeyDelegate: TContentKeyDelegate;
    FContentKeyDelegateQueue: dispatch_queue_t;
  public
    constructor Create;
    destructor Destroy; override;

    function IsAvailable: Boolean;

    property ContentKeySession: AVContentKeySession read FContentKeySession;
  end;
...

  constructor TContentKeyManager.Create;
begin
  FContentKeySession := TAVContentKeySession.Wrap
    (TAVContentKeySession.OCClass.contentKeySessionWithKeySystem
    (AVContentKeySystemFairPlayStreaming));

  FContentKeyDelegate := TContentKeyDelegate.Create;
  FContentKeyDelegateQueue := dispatch_queue_create('fairplay.ContentKeyDelegateQueue',
    dispatch_queue_t(DISPATCH_QUEUE_SERIAL));

  FContentKeySession.setDelegate(FContentKeyDelegate.GetObjectID,
    FContentKeyDelegateQueue);
end;
Unter IOS geht das glaube ich auch, aber erst wenn du die Fehlenden Interfaces aus der MacApi.AVFoundation kopiert hast.
  Mit Zitat antworten Zitat