Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROID_H _ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROID_H _ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROID_H _ | 6 #define CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROID_H _ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebVideoFrameProvid er.h" | 10 #include "cc/VideoFrameProvider.h" |
|
jamesr
2013/01/03 23:35:55
should be video_frame_provider.h, no?
danakj
2013/01/04 14:01:29
er.. yeh.
| |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 | 12 |
| 13 struct ANativeWindow; | 13 struct ANativeWindow; |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 class Layer; | 16 class Layer; |
| 17 class VideoLayer; | 17 class VideoLayer; |
| 18 } | 18 } |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class SurfaceTextureBridge; | 21 class SurfaceTextureBridge; |
| 22 | 22 |
| 23 class SurfaceTextureTransportClient : public WebKit::WebVideoFrameProvider { | 23 class SurfaceTextureTransportClient : public cc::VideoFrameProvider { |
| 24 public: | 24 public: |
| 25 SurfaceTextureTransportClient(); | 25 SurfaceTextureTransportClient(); |
| 26 virtual ~SurfaceTextureTransportClient(); | 26 virtual ~SurfaceTextureTransportClient(); |
| 27 | 27 |
| 28 scoped_refptr<cc::Layer> Initialize(); | 28 scoped_refptr<cc::Layer> Initialize(); |
| 29 gfx::GLSurfaceHandle GetCompositingSurface(int surface_id); | 29 gfx::GLSurfaceHandle GetCompositingSurface(int surface_id); |
| 30 void SetSize(const gfx::Size& size); | 30 void SetSize(const gfx::Size& size); |
| 31 | 31 |
| 32 // WebKit::WebVideoFrameProvider implementation. | 32 // cc::VideoFrameProvider implementation. |
| 33 virtual void setVideoFrameProviderClient(Client*) OVERRIDE {} | 33 virtual void SetVideoFrameProviderClient(Client*) OVERRIDE {} |
| 34 virtual WebKit::WebVideoFrame* getCurrentFrame() OVERRIDE; | 34 virtual media::VideoFrame* GetCurrentFrame() OVERRIDE; |
| 35 virtual void putCurrentFrame(WebKit::WebVideoFrame* frame) OVERRIDE; | 35 virtual void PutCurrentFrame(media::VideoFrame* frame) OVERRIDE; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 void OnSurfaceTextureFrameAvailable(); | 38 void OnSurfaceTextureFrameAvailable(); |
| 39 | 39 |
| 40 scoped_refptr<cc::VideoLayer> video_layer_; | 40 scoped_refptr<cc::VideoLayer> video_layer_; |
| 41 scoped_refptr<SurfaceTextureBridge> surface_texture_; | 41 scoped_refptr<SurfaceTextureBridge> surface_texture_; |
| 42 ANativeWindow* window_; | 42 ANativeWindow* window_; |
| 43 scoped_ptr<WebKit::WebVideoFrame> video_frame_; | 43 scoped_refptr<media::VideoFrame> video_frame_; |
| 44 uint32 texture_id_; | 44 uint32 texture_id_; |
| 45 | 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(SurfaceTextureTransportClient); | 46 DISALLOW_COPY_AND_ASSIGN(SurfaceTextureTransportClient); |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace content | 49 } // namespace content |
| 50 | 50 |
| 51 #endif // CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROI D_H_ | 51 #endif // CONTENT_BROWSER_RENDERER_HOST_SURFACE_TEXTURE_TRANSPORT_CLIENT_ANDROI D_H_ |
| OLD | NEW |