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

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

Issue 10413015: Upstream implementation for embedded video for WebMediaPlayerAndroid (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove GetWebMediaPlayerManager() from render_view.h Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_
6 #define WEBKIT_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_
7
8 namespace WebKit {
9 class WebStreamTextureClient;
10 }
11
12 namespace webkit_media {
13
14 // The proxy class for the gpu thread to notify the compositor thread
15 // when a new video frame is available.
16 class StreamTextureProxy {
17 public:
18 virtual ~StreamTextureProxy() { }
19
20 // Initialize the the stream_id, texture width and height. This should
21 // be called on the compositor thread.
22 virtual bool Initialize(int stream_id, int width, int height) = 0;
23
24 // Setting the target for callback when a frame is available. This function
25 // could be called on both the main thread and the compositor thread.
26 virtual void SetClient(WebKit::WebStreamTextureClient* client) = 0;
27 };
28
29
30 // Factory class for managing the stream texture.
31 class StreamTextureFactory {
32 public:
33 virtual ~StreamTextureFactory() { }
34
35 // Create the StreamTextureProxy object.
36 virtual StreamTextureProxy* CreateProxy() = 0;
37
38 // Send an IPC message to the browser process to request a java surface
39 // object for the given stream_id. After the the surface is created,
40 // it will be passed back to the WebMediaPlayerAndroid object identified by
41 // the player_id.
42 virtual void EstablishPeer(int stream_id, int player_id) = 0;
scherkus (not reviewing) 2012/05/23 22:45:46 seeing as this code knows about WMPA, couldn't it
qinmin 2012/05/24 20:30:28 This request will go all the way to the browser pr
43
44 // Create the streamTexture and return the stream Id and set the texture id.
45 virtual unsigned CreateStreamTexture(unsigned* texture_id) = 0;
46
47 // Destroy the streamTexture for the given texture Id.
48 virtual void DestroyStreamTexture(unsigned texture_id) = 0;
49 };
50
51 } // namespace webkit_media
52
53 #endif // WEBKIT_MEDIA_ANDROID_STREAM_TEXTURE_FACTORY_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698