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

Side by Side Diff: webkit/media/android/webmediaplayer_android.h

Issue 12443003: Implement out-of-band video compositing on Android: Step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 // Cleaning up all remaining resources as this object is about to get deleted. 168 // Cleaning up all remaining resources as this object is about to get deleted.
169 virtual void Destroy() = 0; 169 virtual void Destroy() = 0;
170 170
171 WebKit::WebMediaPlayerClient* client() { return client_; } 171 WebKit::WebMediaPlayerClient* client() { return client_; }
172 172
173 int player_id() const { return player_id_; } 173 int player_id() const { return player_id_; }
174 174
175 WebMediaPlayerManagerAndroid* manager() const { return manager_; } 175 WebMediaPlayerManagerAndroid* manager() const { return manager_; }
176 176
177 // Request whether the player needs external surface for rendering.
178 void SetNeedsExternalSurface(bool needs_external_surface);
179
180 // Request external surface for out-of-band composition.
181 virtual void RequestExternalSurface() = 0;
182
177 private: 183 private:
178 void ReallocateVideoFrame(); 184 void ReallocateVideoFrame();
179 185
180 WebKit::WebMediaPlayerClient* const client_; 186 WebKit::WebMediaPlayerClient* const client_;
181 187
182 // Save the list of buffered time ranges. 188 // Save the list of buffered time ranges.
183 WebKit::WebTimeRanges buffered_; 189 WebKit::WebTimeRanges buffered_;
184 190
185 // Size of the video. 191 // Size of the video.
186 WebKit::WebSize natural_size_; 192 WebKit::WebSize natural_size_;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // Whether the video size info is available. 237 // Whether the video size info is available.
232 bool has_size_info_; 238 bool has_size_info_;
233 239
234 // Object for allocating stream textures. 240 // Object for allocating stream textures.
235 scoped_ptr<StreamTextureFactory> stream_texture_factory_; 241 scoped_ptr<StreamTextureFactory> stream_texture_factory_;
236 242
237 // Object for calling back the compositor thread to repaint the video when a 243 // Object for calling back the compositor thread to repaint the video when a
238 // frame available. It should be initialized on the compositor thread. 244 // frame available. It should be initialized on the compositor thread.
239 scoped_ptr<StreamTextureProxy> stream_texture_proxy_; 245 scoped_ptr<StreamTextureProxy> stream_texture_proxy_;
240 246
247 // Whether media player needs external surface.
248 bool needs_external_surface_;
249
241 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); 250 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid);
242 }; 251 };
243 252
244 } // namespace webkit_media 253 } // namespace webkit_media
245 254
246 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ 255 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698