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

Side by Side Diff: Source/web/WebMediaPlayerClientImpl.h

Issue 304353005: Eliminate MediaPlayer & MediaPlayerClient abstractions(rate, setRate and other APIs) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase with latest Created 6 years, 5 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
« no previous file with comments | « Source/platform/graphics/media/MediaPlayer.h ('k') | Source/web/WebMediaPlayerClientImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // MediaPlayer methods: 98 // MediaPlayer methods:
99 virtual WebMediaPlayer* webMediaPlayer() const OVERRIDE; 99 virtual WebMediaPlayer* webMediaPlayer() const OVERRIDE;
100 virtual void load(WebMediaPlayer::LoadType, const WTF::String& url, WebMedia Player::CORSMode) OVERRIDE; 100 virtual void load(WebMediaPlayer::LoadType, const WTF::String& url, WebMedia Player::CORSMode) OVERRIDE;
101 virtual void play() OVERRIDE; 101 virtual void play() OVERRIDE;
102 virtual void pause() OVERRIDE; 102 virtual void pause() OVERRIDE;
103 virtual bool supportsSave() const OVERRIDE; 103 virtual bool supportsSave() const OVERRIDE;
104 virtual double duration() const OVERRIDE; 104 virtual double duration() const OVERRIDE;
105 virtual double currentTime() const OVERRIDE; 105 virtual double currentTime() const OVERRIDE;
106 virtual void seek(double time) OVERRIDE; 106 virtual void seek(double time) OVERRIDE;
107 virtual bool seeking() const OVERRIDE; 107 virtual bool seeking() const OVERRIDE;
108 virtual double rate() const OVERRIDE;
109 virtual void setRate(double) OVERRIDE;
110 virtual bool paused() const OVERRIDE; 108 virtual bool paused() const OVERRIDE;
111 virtual void setPoster(const WebCore::KURL&) OVERRIDE; 109 virtual void setPoster(const WebCore::KURL&) OVERRIDE;
112 virtual WebCore::MediaPlayer::NetworkState networkState() const OVERRIDE; 110 virtual WebCore::MediaPlayer::NetworkState networkState() const OVERRIDE;
113 virtual double maxTimeSeekable() const OVERRIDE;
114 virtual WTF::PassRefPtr<WebCore::TimeRanges> buffered() const OVERRIDE;
115 virtual bool didLoadingProgress() const OVERRIDE;
116 virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&) OVERR IDE; 111 virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect&) OVERR IDE;
117 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, Platfo rm3DObject texture, GLint level, GLenum type, GLenum internalFormat, bool premul tiplyAlpha, bool flipY) OVERRIDE; 112 virtual bool copyVideoTextureToPlatformTexture(WebGraphicsContext3D*, Platfo rm3DObject texture, GLint level, GLenum type, GLenum internalFormat, bool premul tiplyAlpha, bool flipY) OVERRIDE;
118 virtual void setPreload(WebCore::MediaPlayer::Preload) OVERRIDE; 113 virtual void setPreload(WebCore::MediaPlayer::Preload) OVERRIDE;
119 virtual bool hasSingleSecurityOrigin() const OVERRIDE; 114 virtual bool hasSingleSecurityOrigin() const OVERRIDE;
120 virtual double mediaTimeForTimeValue(double timeValue) const OVERRIDE; 115 virtual double mediaTimeForTimeValue(double timeValue) const OVERRIDE;
121 116
122 #if ENABLE(WEB_AUDIO) 117 #if ENABLE(WEB_AUDIO)
123 virtual WebCore::AudioSourceProvider* audioSourceProvider() OVERRIDE; 118 virtual WebCore::AudioSourceProvider* audioSourceProvider() OVERRIDE;
124 #endif 119 #endif
125 120
126 private: 121 private:
127 explicit WebMediaPlayerClientImpl(WebCore::MediaPlayerClient*); 122 explicit WebMediaPlayerClientImpl(WebCore::MediaPlayerClient*);
128 123
129 WebCore::HTMLMediaElement& mediaElement() const; 124 WebCore::HTMLMediaElement& mediaElement() const;
130 125
131 WebCore::MediaPlayerClient* m_client; 126 WebCore::MediaPlayerClient* m_client;
132 OwnPtr<WebMediaPlayer> m_webMediaPlayer; 127 OwnPtr<WebMediaPlayer> m_webMediaPlayer;
133 WebCore::MediaPlayer::Preload m_preload; 128 WebCore::MediaPlayer::Preload m_preload;
134 double m_rate;
135 129
136 #if OS(ANDROID) 130 #if OS(ANDROID)
137 // FIXME: This path "only works" on Android. It is a workaround for the prob lem that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES 131 // FIXME: This path "only works" on Android. It is a workaround for the prob lem that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES
138 // texture internally. It should be removed and replaced by the normal paint path. 132 // texture internally. It should be removed and replaced by the normal paint path.
139 // https://code.google.com/p/skia/issues/detail?id=1189 133 // https://code.google.com/p/skia/issues/detail?id=1189
140 void paintOnAndroid(WebCore::GraphicsContext*, const WebCore::IntRect&, uint 8_t alpha); 134 void paintOnAndroid(WebCore::GraphicsContext*, const WebCore::IntRect&, uint 8_t alpha);
141 SkBitmap m_bitmap; 135 SkBitmap m_bitmap;
142 bool m_usePaintOnAndroid; 136 bool m_usePaintOnAndroid;
143 #endif 137 #endif
144 138
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 Mutex provideInputLock; 181 Mutex provideInputLock;
188 }; 182 };
189 183
190 AudioSourceProviderImpl m_audioSourceProvider; 184 AudioSourceProviderImpl m_audioSourceProvider;
191 #endif 185 #endif
192 }; 186 };
193 187
194 } // namespace blink 188 } // namespace blink
195 189
196 #endif 190 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/media/MediaPlayer.h ('k') | Source/web/WebMediaPlayerClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698