diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h')
-rw-r--r-- | Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h index d44a30c73..e70db1a98 100644 --- a/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h +++ b/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h @@ -29,8 +29,9 @@ #if ENABLE(VIDEO) && USE(AVFOUNDATION) #include "MediaPlayerPrivateAVFoundation.h" +#include <wtf/HashMap.h> -OBJC_CLASS AVAsset; +OBJC_CLASS AVURLAsset; OBJC_CLASS AVPlayer; OBJC_CLASS AVPlayerItem; OBJC_CLASS AVPlayerItemVideoOutput; @@ -38,6 +39,11 @@ OBJC_CLASS AVPlayerLayer; OBJC_CLASS AVAssetImageGenerator; OBJC_CLASS WebCoreAVFMovieObserver; +#if ENABLE(ENCRYPTED_MEDIA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 +OBJC_CLASS WebCoreAVFLoaderDelegate; +OBJC_CLASS AVAssetResourceLoadingRequest; +#endif + #ifndef __OBJC__ typedef struct objc_object *id; #endif @@ -56,6 +62,10 @@ public: void setAsset(id); virtual void tracksChanged(); +#if ENABLE(ENCRYPTED_MEDIA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 + bool shouldWaitForLoadingOfResource(AVAssetResourceLoadingRequest*); +#endif + private: MediaPlayerPrivateAVFoundationObjC(MediaPlayer*); @@ -63,6 +73,10 @@ private: static PassOwnPtr<MediaPlayerPrivateInterface> create(MediaPlayer*); static void getSupportedTypes(HashSet<String>& types); static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&); +#if ENABLE(ENCRYPTED_MEDIA) + static MediaPlayer::SupportsType extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL&); +#endif + static bool isAvailable(); virtual void cancelLoad(); @@ -124,7 +138,13 @@ private: void paintWithVideoOutput(GraphicsContext*, const IntRect&); #endif - RetainPtr<AVAsset> m_avAsset; +#if ENABLE(ENCRYPTED_MEDIA) + virtual MediaPlayer::MediaKeyException addKey(const String&, const unsigned char*, unsigned, const unsigned char*, unsigned, const String&); + virtual MediaPlayer::MediaKeyException generateKeyRequest(const String&, const unsigned char*, unsigned); + virtual MediaPlayer::MediaKeyException cancelKeyRequest(const String&, const String&); +#endif + + RetainPtr<AVURLAsset> m_avAsset; RetainPtr<AVPlayer> m_avPlayer; RetainPtr<AVPlayerItem> m_avPlayerItem; RetainPtr<AVPlayerLayer> m_videoLayer; @@ -139,6 +159,12 @@ private: RetainPtr<AVPlayerItemVideoOutput> m_videoOutput; RetainPtr<CVPixelBufferRef> m_lastImage; #endif + +#if ENABLE(ENCRYPTED_MEDIA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 + RetainPtr<WebCoreAVFLoaderDelegate> m_loaderDelegate; + HashMap<String, RetainPtr<AVAssetResourceLoadingRequest> > m_keyURIToRequestMap; + HashMap<String, RetainPtr<AVAssetResourceLoadingRequest> > m_sessionIDToRequestMap; +#endif }; } |