| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class AVCFPlayer; | 49 class AVCFPlayer; |
| 50 class QTMovieGWorld; | 50 class QTMovieGWorld; |
| 51 class QTMovieVisualContext; | 51 class QTMovieVisualContext; |
| 52 | 52 |
| 53 namespace WebCore { | 53 namespace WebCore { |
| 54 | 54 |
| 55 class AudioSourceProvider; | 55 class AudioSourceProvider; |
| 56 class Document; | 56 class Document; |
| 57 class GStreamerGWorld; | 57 class GStreamerGWorld; |
| 58 class MediaPlayerPrivateInterface; | 58 class MediaPlayerPrivateInterface; |
| 59 class MediaSource; | 59 class WebKitMediaSource; |
| 60 class TextTrackRepresentation; | 60 class TextTrackRepresentation; |
| 61 | 61 |
| 62 // Structure that will hold every native | 62 // Structure that will hold every native |
| 63 // types supported by the current media player. | 63 // types supported by the current media player. |
| 64 // We have to do that has multiple media players | 64 // We have to do that has multiple media players |
| 65 // backend can live at runtime. | 65 // backend can live at runtime. |
| 66 struct PlatformMedia { | 66 struct PlatformMedia { |
| 67 enum { | 67 enum { |
| 68 None, | 68 None, |
| 69 QTMovieType, | 69 QTMovieType, |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 bool hasAudio() const; | 229 bool hasAudio() const; |
| 230 | 230 |
| 231 void setFrameView(FrameView* frameView) { m_frameView = frameView; } | 231 void setFrameView(FrameView* frameView) { m_frameView = frameView; } |
| 232 FrameView* frameView() { return m_frameView; } | 232 FrameView* frameView() { return m_frameView; } |
| 233 bool inMediaDocument(); | 233 bool inMediaDocument(); |
| 234 | 234 |
| 235 IntSize size() const { return m_size; } | 235 IntSize size() const { return m_size; } |
| 236 void setSize(const IntSize& size); | 236 void setSize(const IntSize& size); |
| 237 | 237 |
| 238 bool load(const KURL&, const ContentType&, const String& keySystem); | 238 bool load(const KURL&, const ContentType&, const String& keySystem); |
| 239 bool load(const KURL&, PassRefPtr<MediaSource>); | 239 bool load(const KURL&, PassRefPtr<WebKitMediaSource>); |
| 240 void cancelLoad(); | 240 void cancelLoad(); |
| 241 | 241 |
| 242 bool visible() const; | 242 bool visible() const; |
| 243 void setVisible(bool); | 243 void setVisible(bool); |
| 244 | 244 |
| 245 void prepareToPlay(); | 245 void prepareToPlay(); |
| 246 void play(); | 246 void play(); |
| 247 void pause(); | 247 void pause(); |
| 248 | 248 |
| 249 #if ENABLE(ENCRYPTED_MEDIA) | 249 #if ENABLE(ENCRYPTED_MEDIA) |
| 250 // Represents synchronous exceptions that can be thrown from the Encrypted M
edia methods. | 250 // Represents synchronous exceptions that can be thrown from the Encrypted M
edia methods. |
| 251 // This is different from the asynchronous MediaKeyError. | 251 // This is different from the asynchronous MediaKeyError. |
| 252 enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported
}; | 252 enum MediaKeyException { NoError, InvalidPlayerState, KeySystemNotSupported
}; |
| 253 | 253 |
| 254 MediaKeyException generateKeyRequest(const String& keySystem, const unsigned
char* initData, unsigned initDataLength); | 254 MediaKeyException generateKeyRequest(const String& keySystem, const unsigned
char* initData, unsigned initDataLength); |
| 255 MediaKeyException addKey(const String& keySystem, const unsigned char* key,
unsigned keyLength, const unsigned char* initData, unsigned initDataLength, cons
t String& sessionId); | 255 MediaKeyException addKey(const String& keySystem, const unsigned char* key,
unsigned keyLength, const unsigned char* initData, unsigned initDataLength, cons
t String& sessionId); |
| 256 MediaKeyException cancelKeyRequest(const String& keySystem, const String& se
ssionId); | 256 MediaKeyException cancelKeyRequest(const String& keySystem, const String& se
ssionId); |
| 257 #endif | 257 #endif |
| 258 | 258 |
| 259 bool paused() const; | 259 bool paused() const; |
| 260 bool seeking() const; | 260 bool seeking() const; |
| 261 | 261 |
| 262 static double invalidTime() { return -1.0;} | 262 static double invalidTime() { return -1.0;} |
| 263 double duration() const; | 263 double duration() const; |
| 264 double currentTime() const; | 264 double currentTime() const; |
| 265 void seek(double time); | 265 void seek(double time); |
| 266 | 266 |
| 267 double startTime() const; | 267 double startTime() const; |
| 268 | 268 |
| 269 double initialTime() const; | 269 double initialTime() const; |
| 270 | 270 |
| 271 double rate() const; | 271 double rate() const; |
| 272 void setRate(double); | 272 void setRate(double); |
| 273 | 273 |
| 274 bool preservesPitch() const; | 274 bool preservesPitch() const; |
| 275 void setPreservesPitch(bool); | 275 void setPreservesPitch(bool); |
| 276 | 276 |
| 277 PassRefPtr<TimeRanges> buffered(); | 277 PassRefPtr<TimeRanges> buffered(); |
| 278 PassRefPtr<TimeRanges> seekable(); | 278 PassRefPtr<TimeRanges> seekable(); |
| 279 double maxTimeSeekable(); | 279 double maxTimeSeekable(); |
| 280 | 280 |
| 281 bool didLoadingProgress(); | 281 bool didLoadingProgress(); |
| 282 | 282 |
| 283 double volume() const; | 283 double volume() const; |
| 284 void setVolume(double); | 284 void setVolume(double); |
| 285 | 285 |
| 286 bool muted() const; | 286 bool muted() const; |
| 287 void setMuted(bool); | 287 void setMuted(bool); |
| 288 | 288 |
| 289 bool hasClosedCaptions() const; | 289 bool hasClosedCaptions() const; |
| 290 void setClosedCaptionsVisible(bool closedCaptionsVisible); | 290 void setClosedCaptionsVisible(bool closedCaptionsVisible); |
| 291 | 291 |
| 292 bool autoplay() const; | 292 bool autoplay() const; |
| 293 void setAutoplay(bool); | 293 void setAutoplay(bool); |
| 294 | 294 |
| 295 void paint(GraphicsContext*, const IntRect&); | 295 void paint(GraphicsContext*, const IntRect&); |
| 296 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&); | 296 void paintCurrentFrameInContext(GraphicsContext*, const IntRect&); |
| 297 | 297 |
| 298 // copyVideoTextureToPlatformTexture() is used to do the GPU-GPU textures co
py without a readback to system memory. | 298 // copyVideoTextureToPlatformTexture() is used to do the GPU-GPU textures co
py without a readback to system memory. |
| 299 // The first five parameters denote the corresponding GraphicsContext, desti
nation texture, requested level, requested type and the required internalFormat
for destination texture. | 299 // The first five parameters denote the corresponding GraphicsContext, desti
nation texture, requested level, requested type and the required internalFormat
for destination texture. |
| 300 // The last two parameters premultiplyAlpha and flipY denote whether addtion
al premultiplyAlpha and flip operation are required during the copy. | 300 // The last two parameters premultiplyAlpha and flipY denote whether addtion
al premultiplyAlpha and flip operation are required during the copy. |
| 301 // It returns true on success and false on failure. | 301 // It returns true on success and false on failure. |
| 302 | 302 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 IntSize m_size; | 418 IntSize m_size; |
| 419 Preload m_preload; | 419 Preload m_preload; |
| 420 bool m_visible; | 420 bool m_visible; |
| 421 double m_rate; | 421 double m_rate; |
| 422 double m_volume; | 422 double m_volume; |
| 423 bool m_muted; | 423 bool m_muted; |
| 424 bool m_preservesPitch; | 424 bool m_preservesPitch; |
| 425 bool m_shouldPrepareToRender; | 425 bool m_shouldPrepareToRender; |
| 426 bool m_contentMIMETypeWasInferredFromExtension; | 426 bool m_contentMIMETypeWasInferredFromExtension; |
| 427 | 427 |
| 428 RefPtr<MediaSource> m_mediaSource; | 428 RefPtr<WebKitMediaSource> m_mediaSource; |
| 429 }; | 429 }; |
| 430 | 430 |
| 431 typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(Media
Player*); | 431 typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(Media
Player*); |
| 432 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) | 432 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) |
| 433 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type,
const String& codecs, const String& keySystem, const KURL& url); | 433 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type,
const String& codecs, const String& keySystem, const KURL& url); |
| 434 #else | 434 #else |
| 435 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type,
const String& codecs, const KURL& url); | 435 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type,
const String& codecs, const KURL& url); |
| 436 #endif | 436 #endif |
| 437 | 437 |
| 438 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
sType); | 438 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
sType); |
| 439 | 439 |
| 440 } | 440 } |
| 441 | 441 |
| 442 #endif | 442 #endif |
| OLD | NEW |