Index: Source/core/html/HTMLMediaElement.h |
diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h |
index ff834bbc591634b5ed972592a091bd75d8333fb5..90bb63d57a7fb0d92a53030937b499ab3dd5024e 100644 |
--- a/Source/core/html/HTMLMediaElement.h |
+++ b/Source/core/html/HTMLMediaElement.h |
@@ -49,6 +49,7 @@ namespace WebCore { |
class AudioSourceProvider; |
class MediaElementAudioSourceNode; |
#endif |
+class AudioTrackList; |
class ContentType; |
class Event; |
class ExceptionState; |
@@ -62,6 +63,7 @@ class HTMLMediaSource; |
class TextTrackList; |
class TimeRanges; |
class URLRegistry; |
+class VideoTrackList; |
typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; |
typedef CueIntervalTree::IntervalType CueInterval; |
@@ -163,6 +165,12 @@ public: |
virtual bool canPlay() const OVERRIDE FINAL; |
+ AudioTrackList& audioTracks(); |
+ void audioTrackChanged(const AtomicString& audioTrackID, bool enabled); |
+ |
+ VideoTrackList& videoTracks(); |
+ void selectedVideoTrackChanged(const AtomicString& selectedTrackID); |
+ |
PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicString& label, const AtomicString& language, ExceptionState&); |
PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicString& label, ExceptionState& exceptionState) { return addTextTrack(kind, label, emptyAtom, exceptionState); } |
PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, ExceptionState& exceptionState) { return addTextTrack(kind, emptyAtom, emptyAtom, exceptionState); } |
@@ -181,6 +189,11 @@ public: |
void didAddTrackElement(HTMLTrackElement*); |
void didRemoveTrackElement(HTMLTrackElement*); |
+ void addVideoTrack(const AtomicString& id, blink::WebMediaPlayerClient::VideoTrackKind, const AtomicString& label, const AtomicString& language, bool selected); |
+ void removeVideoTrack(const AtomicString& id); |
+ void addAudioTrack(const AtomicString& id, blink::WebMediaPlayerClient::AudioTrackKind, const AtomicString& label, const AtomicString& language, bool enabled); |
+ void removeAudioTrack(const AtomicString& id); |
+ |
virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) OVERRIDE FINAL; |
virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) OVERRIDE FINAL; |
// FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not depend on it. |
@@ -417,6 +430,16 @@ private: |
bool isBlockedOnMediaController() const; |
bool isAutoplaying() const { return m_autoplaying; } |
+ // Creates placeholder AudioTrack and/or VideoTrack objects when WebMemediaPlayer objects |
+ // advertise they have audio and/or video, but don't explicity signal them via |
+ // mediaPlayerDidAddAudioTrack() and mediaPlayerDidAddVideoTrack(). |
+ // FIXME: Remove this once all WebMediaPlayer implementations properly report their track info. |
+ void createPlaceholderTracksIfNecessary(); |
+ |
+ // Sets the selected/enabled tracks if they aren't set before we initially |
+ // transition to HAVE_METADATA. |
+ void selectInitialTracksIfNecessary(); |
+ |
Timer<HTMLMediaElement> m_loadTimer; |
Timer<HTMLMediaElement> m_progressEventTimer; |
Timer<HTMLMediaElement> m_playbackProgressTimer; |
@@ -501,6 +524,8 @@ private: |
bool m_processingPreferenceChange : 1; |
double m_lastTextTrackUpdateTime; |
+ RefPtr<AudioTrackList> m_audioTracks; |
+ RefPtr<VideoTrackList> m_videoTracks; |
RefPtr<TextTrackList> m_textTracks; |
Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan; |