Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: Source/core/platform/graphics/MediaPlayer.h

Issue 15178010: Remove ENABLE_ENCRYPTED_MEDIA #define as it's always enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // A characteristic of the media file, eg. video, audio, closed captions, et c, has changed. 114 // A characteristic of the media file, eg. video, audio, closed captions, et c, has changed.
115 virtual void mediaPlayerCharacteristicChanged(MediaPlayer*) { } 115 virtual void mediaPlayerCharacteristicChanged(MediaPlayer*) { }
116 116
117 // whether the rendering system can accelerate the display of this MediaPlay er. 117 // whether the rendering system can accelerate the display of this MediaPlay er.
118 virtual bool mediaPlayerRenderingCanBeAccelerated(MediaPlayer*) { return fal se; } 118 virtual bool mediaPlayerRenderingCanBeAccelerated(MediaPlayer*) { return fal se; }
119 119
120 // called when the media player's rendering mode changed, which indicates a change in the 120 // called when the media player's rendering mode changed, which indicates a change in the
121 // availability of the platformLayer(). 121 // availability of the platformLayer().
122 virtual void mediaPlayerRenderingModeChanged(MediaPlayer*) { } 122 virtual void mediaPlayerRenderingModeChanged(MediaPlayer*) { }
123 123
124 #if ENABLE(ENCRYPTED_MEDIA)
125 enum MediaKeyErrorCode { UnknownError = 1, ClientError, ServiceError, Output Error, HardwareChangeError, DomainError }; 124 enum MediaKeyErrorCode { UnknownError = 1, ClientError, ServiceError, Output Error, HardwareChangeError, DomainError };
126 virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& /* keySystem */ , const String& /* sessionId */) { } 125 virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& /* keySystem */ , const String& /* sessionId */) { }
127 virtual void mediaPlayerKeyError(MediaPlayer*, const String& /* keySystem */ , const String& /* sessionId */, MediaKeyErrorCode, unsigned short /* systemCode */) { } 126 virtual void mediaPlayerKeyError(MediaPlayer*, const String& /* keySystem */ , const String& /* sessionId */, MediaKeyErrorCode, unsigned short /* systemCode */) { }
128 virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* message */, unsigned /* messageLength */, const KURL& /* defaultURL */) { } 127 virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& /* keySystem */, const String& /* sessionId */, const unsigned char* /* message */, unsigned /* messageLength */, const KURL& /* defaultURL */) { }
129 virtual bool mediaPlayerKeyNeeded(MediaPlayer*, const String& /* keySystem * /, const String& /* sessionId */, const unsigned char* /* initData */, unsigned /* initDataLength */) { return false; } 128 virtual bool mediaPlayerKeyNeeded(MediaPlayer*, const String& /* keySystem * /, const String& /* sessionId */, const unsigned char* /* initData */, unsigned /* initDataLength */) { return false; }
130 #endif
131 129
132 #if ENABLE(ENCRYPTED_MEDIA_V2) 130 #if ENABLE(ENCRYPTED_MEDIA_V2)
133 virtual bool mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) { return false; } 131 virtual bool mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) { return false; }
134 #endif 132 #endif
135 133
136 virtual String mediaPlayerReferrer() const { return String(); } 134 virtual String mediaPlayerReferrer() const { return String(); }
137 virtual String mediaPlayerUserAgent() const { return String(); } 135 virtual String mediaPlayerUserAgent() const { return String(); }
138 virtual CORSMode mediaPlayerCORSMode() const { return Unspecified; } 136 virtual CORSMode mediaPlayerCORSMode() const { return Unspecified; }
139 virtual void mediaPlayerEnterFullscreen() { } 137 virtual void mediaPlayerEnterFullscreen() { }
140 virtual void mediaPlayerExitFullscreen() { } 138 virtual void mediaPlayerExitFullscreen() { }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 bool load(const KURL&, PassRefPtr<WebKitMediaSource>); 191 bool load(const KURL&, PassRefPtr<WebKitMediaSource>);
194 void cancelLoad(); 192 void cancelLoad();
195 193
196 bool visible() const; 194 bool visible() const;
197 void setVisible(bool); 195 void setVisible(bool);
198 196
199 void prepareToPlay(); 197 void prepareToPlay();
200 void play(); 198 void play();
201 void pause(); 199 void pause();
202 200
203 #if ENABLE(ENCRYPTED_MEDIA)
204 // Represents synchronous exceptions that can be thrown from the Encrypted M edia methods. 201 // Represents synchronous exceptions that can be thrown from the Encrypted M edia methods.
205 // This is different from the asynchronous MediaKeyError. 202 // This is different from the asynchronous MediaKeyError.
206 enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported }; 203 enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported };
207 204
208 MediaKeyException generateKeyRequest(const String& keySystem, const unsigned char* initData, unsigned initDataLength); 205 MediaKeyException generateKeyRequest(const String& keySystem, const unsigned char* initData, unsigned initDataLength);
209 MediaKeyException addKey(const String& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataLength, cons t String& sessionId); 206 MediaKeyException addKey(const String& keySystem, const unsigned char* key, unsigned keyLength, const unsigned char* initData, unsigned initDataLength, cons t String& sessionId);
210 MediaKeyException cancelKeyRequest(const String& keySystem, const String& se ssionId); 207 MediaKeyException cancelKeyRequest(const String& keySystem, const String& se ssionId);
211 #endif
212 208
213 bool paused() const; 209 bool paused() const;
214 bool seeking() const; 210 bool seeking() const;
215 211
216 static double invalidTime() { return -1.0;} 212 static double invalidTime() { return -1.0;}
217 double duration() const; 213 double duration() const;
218 double currentTime() const; 214 double currentTime() const;
219 void seek(double time); 215 void seek(double time);
220 216
221 double startTime() const; 217 double startTime() const;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 319
324 unsigned decodedFrameCount() const; 320 unsigned decodedFrameCount() const;
325 unsigned droppedFrameCount() const; 321 unsigned droppedFrameCount() const;
326 unsigned audioDecodedByteCount() const; 322 unsigned audioDecodedByteCount() const;
327 unsigned videoDecodedByteCount() const; 323 unsigned videoDecodedByteCount() const;
328 324
329 #if ENABLE(WEB_AUDIO) 325 #if ENABLE(WEB_AUDIO)
330 AudioSourceProvider* audioSourceProvider(); 326 AudioSourceProvider* audioSourceProvider();
331 #endif 327 #endif
332 328
333 #if ENABLE(ENCRYPTED_MEDIA)
334 void keyAdded(const String& keySystem, const String& sessionId); 329 void keyAdded(const String& keySystem, const String& sessionId);
335 void keyError(const String& keySystem, const String& sessionId, MediaPlayerC lient::MediaKeyErrorCode, unsigned short systemCode); 330 void keyError(const String& keySystem, const String& sessionId, MediaPlayerC lient::MediaKeyErrorCode, unsigned short systemCode);
336 void keyMessage(const String& keySystem, const String& sessionId, const unsi gned char* message, unsigned messageLength, const KURL& defaultURL); 331 void keyMessage(const String& keySystem, const String& sessionId, const unsi gned char* message, unsigned messageLength, const KURL& defaultURL);
337 bool keyNeeded(const String& keySystem, const String& sessionId, const unsig ned char* initData, unsigned initDataLength); 332 bool keyNeeded(const String& keySystem, const String& sessionId, const unsig ned char* initData, unsigned initDataLength);
338 #endif
339 333
340 #if ENABLE(ENCRYPTED_MEDIA_V2) 334 #if ENABLE(ENCRYPTED_MEDIA_V2)
341 bool keyNeeded(Uint8Array* initData); 335 bool keyNeeded(Uint8Array* initData);
342 #endif 336 #endif
343 337
344 String referrer() const; 338 String referrer() const;
345 String userAgent() const; 339 String userAgent() const;
346 340
347 CachedResourceLoader* cachedResourceLoader(); 341 CachedResourceLoader* cachedResourceLoader();
348 342
(...skipping 22 matching lines...) Expand all
371 double m_volume; 365 double m_volume;
372 bool m_muted; 366 bool m_muted;
373 bool m_preservesPitch; 367 bool m_preservesPitch;
374 bool m_shouldPrepareToRender; 368 bool m_shouldPrepareToRender;
375 bool m_contentMIMETypeWasInferredFromExtension; 369 bool m_contentMIMETypeWasInferredFromExtension;
376 370
377 RefPtr<WebKitMediaSource> m_mediaSource; 371 RefPtr<WebKitMediaSource> m_mediaSource;
378 }; 372 };
379 373
380 typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(Media Player*); 374 typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(Media Player*);
381 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2)
382 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const String& keySystem, const KURL& url); 375 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const String& keySystem, const KURL& url);
383 #else
384 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const KURL& url);
385 #endif
386 376
387 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport sType); 377 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport sType);
388 378
389 } 379 }
390 380
391 #endif 381 #endif
OLDNEW
« no previous file with comments | « Source/core/page/RuntimeEnabledFeatures.in ('k') | Source/core/platform/graphics/MediaPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698