Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 _MEDIA_BLINK_SURFACE_TEXTURE_FRAME_PROVIDER_H_ | |
| 6 #define _MEDIA_BLINK_SURFACE_TEXTURE_FRAME_PROVIDER_H_ | |
| 7 | |
| 8 #include "cc/layers/video_frame_provider.h" | |
| 9 #include "media/blink/media_blink_export.h" | |
| 10 | |
| 11 namespace media { | |
| 12 class VideoFrame; | |
| 13 | |
| 14 // Interface defining a VideoFrameProvider that is backed by an underlying | |
| 15 // Android SurfaceTexture. | |
| 16 class SurfaceTextureFrameProvider : public cc::VideoFrameProvider { | |
|
liberato (no reviews please)
2016/07/13 16:42:50
not sure if the additional abstraction is needed -
tguilbert
2016/07/14 02:47:03
I can show you the overall setup/tear down of this
liberato (no reviews please)
2016/07/14 16:41:30
hrm, not sure. i forgot that StreamTextureFactory
| |
| 17 public: | |
| 18 SurfaceTextureFrameProvider() {} | |
| 19 virtual ~SurfaceTextureFrameProvider() {} | |
| 20 | |
| 21 // Initialize and start providing frames if possible. | |
| 22 // The provided |task_runner| will be used to "signal" new frames (and most | |
| 23 // likely should be the compositor's TaskRunner). | |
| 24 virtual void Initialize( | |
| 25 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | |
| 26 const gfx::Size& natural_size) = 0; | |
| 27 | |
| 28 // TODO(tguilbert): Define and document return value on failure. To be | |
| 29 // submitted as part of crbug.com/627658. | |
| 30 virtual int GetSurfaceTextureIdentifier() = 0; | |
|
liberato (no reviews please)
2016/07/13 16:42:50
is this to tell the browser how to find the Surfac
tguilbert
2016/07/14 02:47:02
That is the plan :) I am using some hard coded val
| |
| 31 | |
| 32 // Should be called whenever the Video's natural size changes. | |
| 33 virtual void UpdateTextureSize(const gfx::Size& natural_size) = 0; | |
| 34 }; | |
| 35 | |
| 36 } // namespace media | |
| 37 | |
| 38 #endif // _MEDIA_BLINK_SURFACE_TEXTURE_FRAME_PROVIDER_H_ | |
| OLD | NEW |