OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ | 5 #ifndef CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ |
6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ | 6 #define CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/layers/video_frame_provider.h" | 10 #include "cc/layers/video_frame_provider.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 static scoped_refptr<VideoFrameProviderClientImpl> Create( | 22 static scoped_refptr<VideoFrameProviderClientImpl> Create( |
23 VideoFrameProvider* provider); | 23 VideoFrameProvider* provider); |
24 | 24 |
25 void set_active_video_layer(VideoLayerImpl* video_layer) { | 25 void set_active_video_layer(VideoLayerImpl* video_layer) { |
26 active_video_layer_ = video_layer; | 26 active_video_layer_ = video_layer; |
27 } | 27 } |
28 | 28 |
29 void Stop(); | 29 void Stop(); |
30 bool Stopped() const { return !provider_; } | 30 bool Stopped() const { return !provider_; } |
31 | 31 |
32 media::VideoFrame* AcquireLockAndCurrentFrame(); | 32 scoped_refptr<media::VideoFrame> AcquireLockAndCurrentFrame(); |
33 void PutCurrentFrame(media::VideoFrame* frame); | 33 void PutCurrentFrame(scoped_refptr<media::VideoFrame> frame); |
34 void ReleaseLock(); | 34 void ReleaseLock(); |
35 const gfx::Transform& stream_texture_matrix() const { | 35 const gfx::Transform& stream_texture_matrix() const { |
36 return stream_texture_matrix_; | 36 return stream_texture_matrix_; |
37 } | 37 } |
38 | 38 |
39 // VideoFrameProvider::Client implementation. These methods are all callable | 39 // VideoFrameProvider::Client implementation. These methods are all callable |
40 // on any thread. | 40 // on any thread. |
41 virtual void StopUsingProvider() OVERRIDE; | 41 virtual void StopUsingProvider() OVERRIDE; |
42 virtual void DidReceiveFrame() OVERRIDE; | 42 virtual void DidReceiveFrame() OVERRIDE; |
43 virtual void DidUpdateMatrix(const float* matrix) OVERRIDE; | 43 virtual void DidUpdateMatrix(const float* matrix) OVERRIDE; |
(...skipping 10 matching lines...) Expand all Loading... |
54 VideoFrameProvider* provider_; | 54 VideoFrameProvider* provider_; |
55 | 55 |
56 gfx::Transform stream_texture_matrix_; | 56 gfx::Transform stream_texture_matrix_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(VideoFrameProviderClientImpl); | 58 DISALLOW_COPY_AND_ASSIGN(VideoFrameProviderClientImpl); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace cc | 61 } // namespace cc |
62 | 62 |
63 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ | 63 #endif // CC_LAYERS_VIDEO_FRAME_PROVIDER_CLIENT_IMPL_H_ |
OLD | NEW |