Chromium Code Reviews| Index: content/renderer/media/android/stream_texture_factory.h |
| diff --git a/content/renderer/media/android/stream_texture_factory.h b/content/renderer/media/android/stream_texture_factory.h |
| index 7ba8cbd134974f2f98a42d2bf89d2db8e0e66159..22b826b4bda4ae3b3cfe7e997a1f21eba93a4dc2 100644 |
| --- a/content/renderer/media/android/stream_texture_factory.h |
| +++ b/content/renderer/media/android/stream_texture_factory.h |
| @@ -41,13 +41,27 @@ class StreamTextureProxy : public StreamTextureHost::Listener { |
| // provided callback will be run on. This can be called on any thread, but |
| // must be called with the same |task_runner| every time. |
| void BindToTaskRunner( |
| - int32_t stream_id, |
| const base::Closure& received_frame_cb, |
| scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| // StreamTextureHost::Listener implementation: |
| void OnFrameAvailable() override; |
| + // Set the streamTexture size. |
| + void SetStreamTextureSize(const gfx::Size& size); |
| + |
| + // Send an IPC message to the browser process to request a java surface |
| + // object for the given route_id. After the the surface is created, |
| + // it will be passed back to the WebMediaPlayerAndroid object identified by |
| + // the player_id. |
| + void EstablishPeer(int player_id, int frame_id); |
| + |
| + // Sends an IPC to the GPU process. |
| + // Asks the StreamTexture to forward its SurfaceTexture to the |
| + // ScopedSurfaceRequestManager, using the gpu::ScopedSurfaceRequestConduit. |
| + void ForwardStreamTextureForSurfaceRequest( |
| + const base::UnguessableToken& request_token); |
| + |
| struct Deleter { |
| inline void operator()(StreamTextureProxy* ptr) const { ptr->Release(); } |
| }; |
| @@ -55,7 +69,7 @@ class StreamTextureProxy : public StreamTextureHost::Listener { |
| friend class StreamTextureFactory; |
| explicit StreamTextureProxy(StreamTextureHost* host); |
| - void BindOnThread(int32_t stream_id); |
| + void BindOnThread(); |
| void Release(); |
| const std::unique_ptr<StreamTextureHost> host_; |
| @@ -79,30 +93,9 @@ class CONTENT_EXPORT StreamTextureFactory |
| scoped_refptr<ContextProviderCommandBuffer> context_provider); |
| // Create the StreamTextureProxy object. |
|
liberato (no reviews please)
2016/10/10 16:46:13
please comment the function args, now that the cal
sivag
2016/10/12 11:25:33
Done.
|
| - StreamTextureProxy* CreateProxy(); |
| - |
| - // Send an IPC message to the browser process to request a java surface |
| - // object for the given stream_id. After the the surface is created, |
| - // it will be passed back to the WebMediaPlayerAndroid object identified by |
| - // the player_id. |
| - void EstablishPeer(int32_t stream_id, int player_id, int frame_id); |
| - |
| - // Sends an IPC to the GPU process. |
| - // Asks the StreamTexture to forward its SurfaceTexture to the |
| - // ScopedSurfaceRequestManager, using the gpu::ScopedSurfaceRequestConduit. |
| - void ForwardStreamTextureForSurfaceRequest( |
| - int32_t stream_id, |
| - const base::UnguessableToken& request_token); |
| - |
| - // Creates a gpu::StreamTexture and returns its id. Sets |*texture_id| to the |
| - // client-side id of the gpu::StreamTexture. The texture is produced into |
| - // a mailbox so it can be shipped in a VideoFrame. |
| - unsigned CreateStreamTexture(unsigned texture_target, |
| - unsigned* texture_id, |
| - gpu::Mailbox* texture_mailbox); |
| - |
| - // Set the streamTexture size for the given stream Id. |
| - void SetStreamTextureSize(int32_t texture_id, const gfx::Size& size); |
| + StreamTextureProxy* CreateProxy(unsigned texture_target, |
| + unsigned* texture_id, |
| + gpu::Mailbox* texture_mailbox); |
| gpu::gles2::GLES2Interface* ContextGL(); |
| @@ -111,6 +104,12 @@ class CONTENT_EXPORT StreamTextureFactory |
| StreamTextureFactory( |
| scoped_refptr<ContextProviderCommandBuffer> context_provider); |
| ~StreamTextureFactory(); |
| + // Creates a gpu::StreamTexture and returns its id. Sets |*texture_id| to the |
| + // client-side id of the gpu::StreamTexture. The texture is produced into |
| + // a mailbox so it can be shipped in a VideoFrame. |
| + unsigned CreateStreamTexture(unsigned texture_target, |
| + unsigned* texture_id, |
| + gpu::Mailbox* texture_mailbox); |
| scoped_refptr<ContextProviderCommandBuffer> context_provider_; |
| scoped_refptr<gpu::GpuChannelHost> channel_; |