| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 PreloadNone, | 75 PreloadNone, |
| 76 PreloadMetaData, | 76 PreloadMetaData, |
| 77 PreloadAuto, | 77 PreloadAuto, |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 enum class BufferingStrategy { | 80 enum class BufferingStrategy { |
| 81 Normal, | 81 Normal, |
| 82 Aggressive, | 82 Aggressive, |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 // Represents synchronous exceptions that can be thrown from the Encrypted | |
| 86 // Media methods. This is different from the asynchronous MediaKeyError. | |
| 87 enum MediaKeyException { | |
| 88 MediaKeyExceptionNoError, | |
| 89 MediaKeyExceptionInvalidPlayerState, | |
| 90 MediaKeyExceptionKeySystemNotSupported, | |
| 91 MediaKeyExceptionInvalidAccess, | |
| 92 }; | |
| 93 | |
| 94 enum CORSMode { | 85 enum CORSMode { |
| 95 CORSModeUnspecified, | 86 CORSModeUnspecified, |
| 96 CORSModeAnonymous, | 87 CORSModeAnonymous, |
| 97 CORSModeUseCredentials, | 88 CORSModeUseCredentials, |
| 98 }; | 89 }; |
| 99 | 90 |
| 100 // Reported to UMA. Do not change existing values. | 91 // Reported to UMA. Do not change existing values. |
| 101 enum LoadType { | 92 enum LoadType { |
| 102 LoadTypeURL = 0, | 93 LoadTypeURL = 0, |
| 103 LoadTypeMediaSource = 1, | 94 LoadTypeMediaSource = 1, |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign
ed target, | 168 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, unsign
ed target, |
| 178 unsigned texture, unsigned internalFormat, unsigned type, int level, | 169 unsigned texture, unsigned internalFormat, unsigned type, int level, |
| 179 bool premultiplyAlpha, bool flipY) { return false; } | 170 bool premultiplyAlpha, bool flipY) { return false; } |
| 180 // Copy sub video frame texture to |texture|. If the copy is impossible or f
ails, it returns false. | 171 // Copy sub video frame texture to |texture|. If the copy is impossible or f
ails, it returns false. |
| 181 virtual bool copyVideoSubTextureToPlatformTexture(WebGraphicsContext3D*, uns
igned target, | 172 virtual bool copyVideoSubTextureToPlatformTexture(WebGraphicsContext3D*, uns
igned target, |
| 182 unsigned texture, int level, int xoffset, int yoffset, bool premultiplyA
lpha, | 173 unsigned texture, int level, int xoffset, int yoffset, bool premultiplyA
lpha, |
| 183 bool flipY) { return false; } | 174 bool flipY) { return false; } |
| 184 | 175 |
| 185 virtual WebAudioSourceProvider* audioSourceProvider() { return nullptr; } | 176 virtual WebAudioSourceProvider* audioSourceProvider() { return nullptr; } |
| 186 | 177 |
| 187 // Returns whether keySystem is supported. If true, the result will be | |
| 188 // reported by an event. | |
| 189 virtual MediaKeyException generateKeyRequest(const WebString& keySystem, con
st unsigned char* initData, unsigned initDataLength) { return MediaKeyExceptionK
eySystemNotSupported; } | |
| 190 virtual MediaKeyException addKey(const WebString& keySystem, const unsigned
char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataL
ength, const WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupport
ed; } | |
| 191 virtual MediaKeyException cancelKeyRequest(const WebString& keySystem, const
WebString& sessionId) { return MediaKeyExceptionKeySystemNotSupported; } | |
| 192 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm, Web
ContentDecryptionModuleResult result) { result.completeWithError(WebContentDecry
ptionModuleExceptionNotSupportedError, 0, "ERROR"); } | 178 virtual void setContentDecryptionModule(WebContentDecryptionModule* cdm, Web
ContentDecryptionModuleResult result) { result.completeWithError(WebContentDecry
ptionModuleExceptionNotSupportedError, 0, "ERROR"); } |
| 193 | 179 |
| 194 // Sets the poster image URL. | 180 // Sets the poster image URL. |
| 195 virtual void setPoster(const WebURL& poster) { } | 181 virtual void setPoster(const WebURL& poster) { } |
| 196 | 182 |
| 197 // Whether the WebMediaPlayer supports overlay fullscreen video mode. When | 183 // Whether the WebMediaPlayer supports overlay fullscreen video mode. When |
| 198 // this is true, the video layer will be removed from the layer tree when | 184 // this is true, the video layer will be removed from the layer tree when |
| 199 // entering fullscreen, and the WebMediaPlayer is responsible for displaying | 185 // entering fullscreen, and the WebMediaPlayer is responsible for displaying |
| 200 // the video in enteredFullscreen(). | 186 // the video in enteredFullscreen(). |
| 201 virtual bool supportsOverlayFullscreenVideo() { return false; } | 187 virtual bool supportsOverlayFullscreenVideo() { return false; } |
| 202 // Inform WebMediaPlayer when the element has entered/exited fullscreen. | 188 // Inform WebMediaPlayer when the element has entered/exited fullscreen. |
| 203 virtual void enteredFullscreen() { } | 189 virtual void enteredFullscreen() { } |
| 204 virtual void exitedFullscreen() { } | 190 virtual void exitedFullscreen() { } |
| 205 | 191 |
| 206 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac
kIds) { } | 192 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac
kIds) { } |
| 207 // |selectedTrackId| is null if no track is selected. | 193 // |selectedTrackId| is null if no track is selected. |
| 208 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } | 194 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } |
| 209 }; | 195 }; |
| 210 | 196 |
| 211 } // namespace blink | 197 } // namespace blink |
| 212 | 198 |
| 213 #endif | 199 #endif |
| OLD | NEW |