Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | 5 #ifndef MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ |
| 6 #define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | 6 #define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | |
| 10 #include "base/task_runner.h" | 11 #include "base/task_runner.h" |
| 11 #include "media/base/video_frame.h" | 12 #include "media/base/video_frame.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 class SingleThreadTaskRunner; | 15 class SingleThreadTaskRunner; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace media { | 18 namespace media { |
| 18 class GpuVideoAcceleratorFactories; | 19 class GpuVideoAcceleratorFactories; |
| 19 | 20 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 41 // mailboxes to native resources. |cb| will be destroyed on | 42 // mailboxes to native resources. |cb| will be destroyed on |
| 42 // |media_worker_pool|. | 43 // |media_worker_pool|. |
| 43 // The content of the new object is copied from the software-allocated | 44 // The content of the new object is copied from the software-allocated |
| 44 // |video_frame|. | 45 // |video_frame|. |
| 45 // If it's not possible to create a new hardware VideoFrame, |video_frame| | 46 // If it's not possible to create a new hardware VideoFrame, |video_frame| |
| 46 // itself will passed to |cb|. | 47 // itself will passed to |cb|. |
| 47 virtual void MaybeCreateHardwareFrame( | 48 virtual void MaybeCreateHardwareFrame( |
| 48 const scoped_refptr<VideoFrame>& video_frame, | 49 const scoped_refptr<VideoFrame>& video_frame, |
| 49 const FrameReadyCB& frame_ready_cb); | 50 const FrameReadyCB& frame_ready_cb); |
| 50 | 51 |
| 52 base::WeakPtr<GpuMemoryBufferVideoFramePool> GetWeakPtr(); | |
|
mcasas
2016/02/11 15:40:41
nit: for cases like this you can also make the cla
| |
| 53 | |
| 51 private: | 54 private: |
| 52 class PoolImpl; | 55 class PoolImpl; |
| 53 scoped_refptr<PoolImpl> pool_impl_; | 56 scoped_refptr<PoolImpl> pool_impl_; |
| 57 base::WeakPtrFactory<GpuMemoryBufferVideoFramePool> weak_ptr_factory_; | |
| 54 | 58 |
| 55 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFramePool); | 59 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFramePool); |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 } // namespace media | 62 } // namespace media |
| 59 | 63 |
| 60 #endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ | 64 #endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_ |
| OLD | NEW |