| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef MediaPlayer_h | 26 #ifndef MediaPlayer_h |
| 27 #define MediaPlayer_h | 27 #define MediaPlayer_h |
| 28 | 28 |
| 29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
| 30 #include "platform/graphics/GraphicsTypes3D.h" | 30 #include "platform/graphics/GraphicsTypes3D.h" |
| 31 #include "public/platform/WebMediaPlayer.h" | 31 #include "public/platform/WebMediaPlayer.h" |
| 32 #include "public/platform/WebMediaPlayerClient.h" |
| 32 #include "wtf/Forward.h" | 33 #include "wtf/Forward.h" |
| 33 #include "wtf/Noncopyable.h" | 34 #include "wtf/Noncopyable.h" |
| 34 | 35 |
| 35 namespace blink { | 36 namespace blink { |
| 36 class WebGraphicsContext3D; | 37 class WebGraphicsContext3D; |
| 37 class WebContentDecryptionModule; | 38 class WebContentDecryptionModule; |
| 38 class WebInbandTextTrack; | 39 class WebInbandTextTrack; |
| 39 class WebLayer; | 40 class WebLayer; |
| 40 class WebMediaSource; | 41 class WebMediaSource; |
| 41 } | 42 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 virtual void mediaPlayerKeyAdded(const String& /* keySystem */, const String
& /* sessionId */) = 0; | 97 virtual void mediaPlayerKeyAdded(const String& /* keySystem */, const String
& /* sessionId */) = 0; |
| 97 virtual void mediaPlayerKeyError(const String& /* keySystem */, const String
& /* sessionId */, MediaKeyErrorCode, unsigned short /* systemCode */) = 0; | 98 virtual void mediaPlayerKeyError(const String& /* keySystem */, const String
& /* sessionId */, MediaKeyErrorCode, unsigned short /* systemCode */) = 0; |
| 98 virtual void mediaPlayerKeyMessage(const String& /* keySystem */, const Stri
ng& /* sessionId */, const unsigned char* /* message */, unsigned /* messageLeng
th */, const KURL& /* defaultURL */) = 0; | 99 virtual void mediaPlayerKeyMessage(const String& /* keySystem */, const Stri
ng& /* sessionId */, const unsigned char* /* message */, unsigned /* messageLeng
th */, const KURL& /* defaultURL */) = 0; |
| 99 virtual bool mediaPlayerKeyNeeded(const String& /* contentType */, const uns
igned char* /* initData */, unsigned /* initDataLength */) = 0; | 100 virtual bool mediaPlayerKeyNeeded(const String& /* contentType */, const uns
igned char* /* initData */, unsigned /* initDataLength */) = 0; |
| 100 | 101 |
| 101 virtual CORSMode mediaPlayerCORSMode() const = 0; | 102 virtual CORSMode mediaPlayerCORSMode() const = 0; |
| 102 | 103 |
| 103 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) = 0; | 104 virtual void mediaPlayerSetWebLayer(blink::WebLayer*) = 0; |
| 104 virtual void mediaPlayerSetOpaque(bool) = 0; | 105 virtual void mediaPlayerSetOpaque(bool) = 0; |
| 105 | 106 |
| 106 virtual void mediaPlayerDidAddTrack(blink::WebInbandTextTrack*) = 0; | 107 virtual void mediaPlayerDidAddVideoTrack(const AtomicString& id, const Atomi
cString& kind, const AtomicString& label, const AtomicString& language, bool sel
ected) = 0; |
| 107 virtual void mediaPlayerDidRemoveTrack(blink::WebInbandTextTrack*) = 0; | 108 virtual void mediaPlayerDidRemoveVideoTrack(const AtomicString& id) = 0; |
| 109 virtual void mediaPlayerDidAddAudioTrack(const AtomicString& id, const Atomi
cString& kind, const AtomicString& label, const AtomicString& language, bool ena
bled) = 0; |
| 110 virtual void mediaPlayerDidRemoveAudioTrack(const AtomicString& id) = 0; |
| 111 virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) = 0; |
| 112 virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) = 0; |
| 108 | 113 |
| 109 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0; | 114 virtual void mediaPlayerMediaSourceOpened(blink::WebMediaSource*) = 0; |
| 110 }; | 115 }; |
| 111 | 116 |
| 112 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); | 117 typedef PassOwnPtr<MediaPlayer> (*CreateMediaEnginePlayer)(MediaPlayerClient*); |
| 113 | 118 |
| 114 class PLATFORM_EXPORT MediaPlayer { | 119 class PLATFORM_EXPORT MediaPlayer { |
| 115 WTF_MAKE_NONCOPYABLE(MediaPlayer); | 120 WTF_MAKE_NONCOPYABLE(MediaPlayer); |
| 116 public: | 121 public: |
| 117 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); | 122 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient*); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 195 |
| 191 #if ENABLE(WEB_AUDIO) | 196 #if ENABLE(WEB_AUDIO) |
| 192 virtual AudioSourceProvider* audioSourceProvider() = 0; | 197 virtual AudioSourceProvider* audioSourceProvider() = 0; |
| 193 #endif | 198 #endif |
| 194 | 199 |
| 195 enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported,
InvalidAccess }; | 200 enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported,
InvalidAccess }; |
| 196 virtual MediaKeyException addKey(const String&, const unsigned char*, unsign
ed, const unsigned char*, unsigned, const String&) = 0; | 201 virtual MediaKeyException addKey(const String&, const unsigned char*, unsign
ed, const unsigned char*, unsigned, const String&) = 0; |
| 197 virtual MediaKeyException generateKeyRequest(const String&, const unsigned c
har*, unsigned) = 0; | 202 virtual MediaKeyException generateKeyRequest(const String&, const unsigned c
har*, unsigned) = 0; |
| 198 virtual MediaKeyException cancelKeyRequest(const String&, const String&) = 0
; | 203 virtual MediaKeyException cancelKeyRequest(const String&, const String&) = 0
; |
| 199 virtual void setContentDecryptionModule(blink::WebContentDecryptionModule*)
= 0; | 204 virtual void setContentDecryptionModule(blink::WebContentDecryptionModule*)
= 0; |
| 205 |
| 206 virtual blink::WebMediaPlayer* webMediaPlayer() const = 0; |
| 200 }; | 207 }; |
| 201 | 208 |
| 202 } | 209 } |
| 203 | 210 |
| 204 #endif // MediaPlayer_h | 211 #endif // MediaPlayer_h |
| OLD | NEW |