CDMSessionAVFoundationCF.h [plain text]
#ifndef CDMSessionAVFoundationCF_h
#define CDMSessionAVFoundationCF_h
#include "CDMSession.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/RetainPtr.h>
#if ENABLE(ENCRYPTED_MEDIA_V2) && HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT)
typedef struct OpaqueAVCFAssetResourceLoadingRequest* AVCFAssetResourceLoadingRequestRef;
namespace WebCore {
class MediaPlayerPrivateAVFoundationCF;
class CDMSessionAVFoundationCF : public CDMSession {
public:
CDMSessionAVFoundationCF(MediaPlayerPrivateAVFoundationCF* parent);
virtual ~CDMSessionAVFoundationCF() { }
virtual void setClient(CDMSessionClient* client) override { m_client = client; }
virtual const String& sessionId() const override { return m_sessionId; }
virtual PassRefPtr<Uint8Array> generateKeyRequest(const String& mimeType, Uint8Array* initData, String& destinationURL, unsigned short& errorCode, unsigned long& systemCode) override;
virtual void releaseKeys() override;
virtual bool update(Uint8Array*, RefPtr<Uint8Array>& nextMessage, unsigned short& errorCode, unsigned long& systemCode) override;
protected:
MediaPlayerPrivateAVFoundationCF* m_parent;
CDMSessionClient* m_client;
String m_sessionId;
RetainPtr<AVCFAssetResourceLoadingRequestRef> m_request;
};
}
#endif
#endif // CDMSessionAVFoundationCF_h