| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bool hasAudio() const; | 90 bool hasAudio() const; |
| 91 | 91 |
| 92 bool supportsSave() const; | 92 bool supportsSave() const; |
| 93 | 93 |
| 94 WebLayer* platformLayer() const; | 94 WebLayer* platformLayer() const; |
| 95 | 95 |
| 96 enum DelayedActionType { | 96 enum DelayedActionType { |
| 97 LoadMediaResource = 1 << 0, | 97 LoadMediaResource = 1 << 0, |
| 98 LoadTextTrackResource = 1 << 1 | 98 LoadTextTrackResource = 1 << 1 |
| 99 }; | 99 }; |
| 100 void scheduleDelayedAction(DelayedActionType); | 100 void scheduleTextTrackResourceLoad(); |
| 101 | 101 |
| 102 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } | 102 bool hasRemoteRoutes() const { return m_remoteRoutesAvailable; } |
| 103 bool isPlayingRemotely() const { return m_playingRemotely; } | 103 bool isPlayingRemotely() const { return m_playingRemotely; } |
| 104 | 104 |
| 105 // error state | 105 // error state |
| 106 MediaError* error() const; | 106 MediaError* error() const; |
| 107 | 107 |
| 108 // network state | 108 // network state |
| 109 void setSrc(const AtomicString&); | 109 void setSrc(const AtomicString&); |
| 110 const KURL& currentSrc() const { return m_currentSrc; } | 110 const KURL& currentSrc() const { return m_currentSrc; } |
| 111 | 111 |
| 112 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; | 112 enum NetworkState { NETWORK_EMPTY, NETWORK_IDLE, NETWORK_LOADING, NETWORK_NO
_SOURCE }; |
| 113 NetworkState getNetworkState() const; | 113 NetworkState getNetworkState() const; |
| 114 | 114 |
| 115 String preload() const; | 115 String preload() const; |
| 116 void setPreload(const AtomicString&); | 116 void setPreload(const AtomicString&); |
| 117 WebMediaPlayer::Preload preloadType() const; | 117 WebMediaPlayer::Preload preloadType() const; |
| 118 String effectivePreload() const; |
| 118 WebMediaPlayer::Preload effectivePreloadType() const; | 119 WebMediaPlayer::Preload effectivePreloadType() const; |
| 119 | 120 |
| 120 TimeRanges* buffered() const; | 121 TimeRanges* buffered() const; |
| 121 void load(); | 122 void load(); |
| 122 String canPlayType(const String& mimeType) const; | 123 String canPlayType(const String& mimeType) const; |
| 123 | 124 |
| 124 // ready state | 125 // ready state |
| 125 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR
E_DATA, HAVE_ENOUGH_DATA }; | 126 enum ReadyState { HAVE_NOTHING, HAVE_METADATA, HAVE_CURRENT_DATA, HAVE_FUTUR
E_DATA, HAVE_ENOUGH_DATA }; |
| 126 ReadyState getReadyState() const; | 127 ReadyState getReadyState() const; |
| 127 bool seeking() const; | 128 bool seeking() const; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 void stopPeriodicTimers(); | 339 void stopPeriodicTimers(); |
| 339 | 340 |
| 340 void seek(double time); | 341 void seek(double time); |
| 341 void finishSeek(); | 342 void finishSeek(); |
| 342 void checkIfSeekNeeded(); | 343 void checkIfSeekNeeded(); |
| 343 void addPlayedRange(double start, double end); | 344 void addPlayedRange(double start, double end); |
| 344 | 345 |
| 345 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. | 346 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched
uleNamedEvent for clarity. |
| 346 | 347 |
| 347 // loading | 348 // loading |
| 348 void prepareForLoad(); | 349 void invokeLoadAlgorithm(); |
| 350 void invokeResourceSelectionAlgorithm(); |
| 349 void loadInternal(); | 351 void loadInternal(); |
| 350 void selectMediaResource(); | 352 void selectMediaResource(); |
| 351 void loadResource(const KURL&, ContentType&); | 353 void loadResource(const KURL&, ContentType&); |
| 352 void startPlayerLoad(); | 354 void startPlayerLoad(); |
| 353 void setPlayerPreload(); | 355 void setPlayerPreload(); |
| 354 WebMediaPlayer::LoadType loadType() const; | 356 WebMediaPlayer::LoadType loadType() const; |
| 355 void scheduleNextSourceChild(); | 357 void scheduleNextSourceChild(); |
| 356 void loadNextSourceChild(); | 358 void loadNextSourceChild(); |
| 357 void clearMediaPlayer(int flags); | 359 void clearMediaPlayer(); |
| 358 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 360 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
| 359 bool havePotentialSourceChild(); | 361 bool havePotentialSourceChild(); |
| 360 void noneSupported(); | 362 void noneSupported(); |
| 361 void mediaEngineError(MediaError*); | 363 void mediaEngineError(MediaError*); |
| 362 void cancelPendingEventsAndCallbacks(); | 364 void cancelPendingEventsAndCallbacks(); |
| 363 void waitForSourceChange(); | 365 void waitForSourceChange(); |
| 364 void prepareToPlay(); | 366 void setIgnorePreloadNone(); |
| 365 | 367 |
| 366 KURL selectNextSourceChild(ContentType*, InvalidURLAction); | 368 KURL selectNextSourceChild(ContentType*, InvalidURLAction); |
| 367 | 369 |
| 368 void mediaLoadingFailed(WebMediaPlayer::NetworkState); | 370 void mediaLoadingFailed(WebMediaPlayer::NetworkState); |
| 369 | 371 |
| 370 // deferred loading (preload=none) | 372 // deferred loading (preload=none) |
| 371 bool loadIsDeferred() const; | 373 bool loadIsDeferred() const; |
| 372 void deferLoad(); | 374 void deferLoad(); |
| 373 void cancelDeferredLoad(); | 375 void cancelDeferredLoad(); |
| 374 void startDeferredLoad(); | 376 void startDeferredLoad(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 bool m_seeking : 1; | 547 bool m_seeking : 1; |
| 546 | 548 |
| 547 // data has not been loaded since sending a "stalled" event | 549 // data has not been loaded since sending a "stalled" event |
| 548 bool m_sentStalledEvent : 1; | 550 bool m_sentStalledEvent : 1; |
| 549 | 551 |
| 550 // time has not changed since sending an "ended" event | 552 // time has not changed since sending an "ended" event |
| 551 bool m_sentEndEvent : 1; | 553 bool m_sentEndEvent : 1; |
| 552 | 554 |
| 553 bool m_closedCaptionsVisible : 1; | 555 bool m_closedCaptionsVisible : 1; |
| 554 | 556 |
| 555 bool m_havePreparedToPlay : 1; | 557 bool m_ignorePreloadNone : 1; |
| 556 | |
| 557 bool m_tracksAreReady : 1; | 558 bool m_tracksAreReady : 1; |
| 558 bool m_processingPreferenceChange : 1; | 559 bool m_processingPreferenceChange : 1; |
| 559 bool m_remoteRoutesAvailable : 1; | 560 bool m_remoteRoutesAvailable : 1; |
| 560 bool m_playingRemotely : 1; | 561 bool m_playingRemotely : 1; |
| 561 bool m_isFinalizing : 1; | 562 bool m_isFinalizing : 1; |
| 562 bool m_initialPlayWithoutUserGesture : 1; | 563 bool m_initialPlayWithoutUserGesture : 1; |
| 563 bool m_autoplayMediaCounted : 1; | 564 bool m_autoplayMediaCounted : 1; |
| 564 // Whether this element is in overlay fullscreen mode. | 565 // Whether this element is in overlay fullscreen mode. |
| 565 bool m_inOverlayFullscreenVideo : 1; | 566 bool m_inOverlayFullscreenVideo : 1; |
| 566 | 567 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 inline bool isHTMLMediaElement(const HTMLElement& element) | 644 inline bool isHTMLMediaElement(const HTMLElement& element) |
| 644 { | 645 { |
| 645 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 646 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
| 646 } | 647 } |
| 647 | 648 |
| 648 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 649 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 649 | 650 |
| 650 } // namespace blink | 651 } // namespace blink |
| 651 | 652 |
| 652 #endif // HTMLMediaElement_h | 653 #endif // HTMLMediaElement_h |
| OLD | NEW |