Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: media/video/gpu_memory_buffer_video_frame_pool.h

Issue 1133563010: Add a GpuMemoryBuffer pool that creates hardware backed VideoFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015 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_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_
6 #define MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "media/base/video_frame.h"
11
12 namespace base {
13 class SingleThreadTaskRunner;
14 }
15
16 namespace media {
17 class GpuVideoAcceleratorFactories;
18
19 // Interface to a pool of GpuMemoryBuffers that can be used to back VideoFrames.
20 // Calling the method MaybeCreateHardwareFrame with a software frame will
21 // create and return a VideoFrame containing only mailboxes to the native
22 // resources needed to draw. If it's not possible to create an hardware
23 // VideoFrame the object passed as parameter will be returned.
DaleCurtis 2015/05/12 17:23:20 Needs a lot more details about OOM situations and
Daniele Castagna 2015/05/12 21:21:30 Shouldn't the comment on the interface be only hig
24 class GpuMemoryBufferVideoFramePool {
25 public:
26 explicit GpuMemoryBufferVideoFramePool(
27 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
28 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories);
reveman 2015/05/12 03:20:26 I dunno about media put in other parts of chromium
DaleCurtis 2015/05/12 17:23:20 media passes these via const& which should do the
Daniele Castagna 2015/05/12 21:21:30 Leaving the const& as suggested by dalecurtis.
29 ~GpuMemoryBufferVideoFramePool();
30
31 const scoped_refptr<VideoFrame> MaybeCreateHardwareFrame(
reveman 2015/05/12 03:20:25 why 'const' return type?
Daniele Castagna 2015/05/12 21:21:30 Because if we can't create the hardwareframe we ju
DaleCurtis 2015/05/13 02:52:14 Is this still true after using const& it should ju
Daniele Castagna 2015/05/13 04:29:45 No, changed it.
32 const scoped_refptr<VideoFrame>);
reveman 2015/05/12 03:20:25 nit: missing param name
DaleCurtis 2015/05/12 17:23:20 Should be const&
Daniele Castagna 2015/05/12 21:21:30 Done.
Daniele Castagna 2015/05/12 21:21:30 Done. Also changed it to &.
33
34 private:
35 class PoolImpl;
36 scoped_refptr<PoolImpl> pool_impl_;
37
38 DISALLOW_COPY_AND_ASSIGN(GpuMemoryBufferVideoFramePool);
39 };
40
41 } // namespace media
42
43 #endif // MEDIA_VIDEO_GPU_MEMORY_BUFFER_VIDEO_FRAME_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698