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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 return m_webMediaPlayer.get(); | 85 return m_webMediaPlayer.get(); |
86 } | 86 } |
87 | 87 |
88 virtual bool hasVideo() const { return false; } | 88 virtual bool hasVideo() const { return false; } |
89 bool hasAudio() const; | 89 bool hasAudio() const; |
90 | 90 |
91 bool supportsSave() const; | 91 bool supportsSave() const; |
92 | 92 |
93 WebLayer* platformLayer() const; | 93 WebLayer* platformLayer() const; |
94 | 94 |
95 enum DelayedActionType { | 95 enum DelayedActionType { |
philipj_slow
2016/01/21 12:48:11
Maybe move this down to m_pendingActionFlags and c
| |
96 LoadMediaResource = 1 << 0, | 96 LoadMediaResource = 1 << 0, |
97 LoadTextTrackResource = 1 << 1, | 97 LoadTextTrackResource = 1 << 1, |
98 TextTrackChangesNotification = 1 << 2 | 98 TextTrackChangesNotification = 1 << 2 |
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; } |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 | 341 |
342 void seek(double time); | 342 void seek(double time); |
343 void finishSeek(); | 343 void finishSeek(); |
344 void checkIfSeekNeeded(); | 344 void checkIfSeekNeeded(); |
345 void addPlayedRange(double start, double end); | 345 void addPlayedRange(double start, double end); |
346 | 346 |
347 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity. | 347 void scheduleEvent(const AtomicString& eventName); // FIXME: Rename to sched uleNamedEvent for clarity. |
348 | 348 |
349 // loading | 349 // loading |
350 void prepareForLoad(); | 350 void prepareForLoad(); |
351 void invokeResourceSelectionAlgorithm(); | |
351 void loadInternal(); | 352 void loadInternal(); |
352 void selectMediaResource(); | 353 void selectMediaResource(); |
353 void loadResource(const KURL&, ContentType&, const String& keySystem); | 354 void loadResource(const KURL&, ContentType&, const String& keySystem); |
354 void startPlayerLoad(); | 355 void startPlayerLoad(); |
355 void setPlayerPreload(); | 356 void setPlayerPreload(); |
356 WebMediaPlayer::LoadType loadType() const; | 357 WebMediaPlayer::LoadType loadType() const; |
357 void scheduleNextSourceChild(); | 358 void scheduleNextSourceChild(); |
358 void loadNextSourceChild(); | 359 void loadNextSourceChild(); |
359 void clearMediaPlayer(int flags); | 360 void resetMediaElement(int flags); |
360 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 361 void clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
361 bool havePotentialSourceChild(); | 362 bool havePotentialSourceChild(); |
362 void noneSupported(); | 363 void noneSupported(); |
363 void mediaEngineError(MediaError*); | 364 void mediaEngineError(MediaError*); |
364 void cancelPendingEventsAndCallbacks(); | 365 void cancelPendingEventsAndCallbacks(); |
365 void waitForSourceChange(); | 366 void waitForSourceChange(); |
366 void prepareToPlay(); | 367 void prepareToPlay(); |
367 | 368 |
368 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction ); | 369 KURL selectNextSourceChild(ContentType*, String* keySystem, InvalidURLAction ); |
369 | 370 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
635 inline bool isHTMLMediaElement(const HTMLElement& element) | 636 inline bool isHTMLMediaElement(const HTMLElement& element) |
636 { | 637 { |
637 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 638 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
638 } | 639 } |
639 | 640 |
640 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 641 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
641 | 642 |
642 } // namespace blink | 643 } // namespace blink |
643 | 644 |
644 #endif // HTMLMediaElement_h | 645 #endif // HTMLMediaElement_h |
OLD | NEW |