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

Side by Side Diff: chrome/gpu/arc_gpu_video_decode_accelerator.h

Issue 1641353003: GpuArcVideoService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-4-owen-ArcGpuVideoDecodeAccelerator
Patch Set: address dcheng's comments (uint32) Created 4 years, 8 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_
6 #define CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <queue> 9 #include <queue>
10 #include <vector> 10 #include <vector>
(...skipping 10 matching lines...) Expand all
21 21
22 // This class is executed in the GPU process. It takes decoding requests from 22 // This class is executed in the GPU process. It takes decoding requests from
23 // ARC via IPC channels and translates and sends those requests to an 23 // ARC via IPC channels and translates and sends those requests to an
24 // implementation of media::VideoDecodeAccelerator. It also returns the decoded 24 // implementation of media::VideoDecodeAccelerator. It also returns the decoded
25 // frames back to the ARC side. 25 // frames back to the ARC side.
26 class ArcGpuVideoDecodeAccelerator 26 class ArcGpuVideoDecodeAccelerator
27 : public ArcVideoAccelerator, 27 : public ArcVideoAccelerator,
28 public media::VideoDecodeAccelerator::Client, 28 public media::VideoDecodeAccelerator::Client,
29 public base::SupportsWeakPtr<ArcGpuVideoDecodeAccelerator> { 29 public base::SupportsWeakPtr<ArcGpuVideoDecodeAccelerator> {
30 public: 30 public:
31 ArcGpuVideoDecodeAccelerator(const gpu::GpuPreferences& gpu_preferences); 31 ArcGpuVideoDecodeAccelerator();
32 ~ArcGpuVideoDecodeAccelerator() override; 32 ~ArcGpuVideoDecodeAccelerator() override;
33 33
34 // Implementation of the ArcVideoAccelerator interface. 34 // Implementation of the ArcVideoAccelerator interface.
35 bool Initialize(const Config& config, 35 bool Initialize(const Config& config,
36 ArcVideoAccelerator::Client* client) override; 36 ArcVideoAccelerator::Client* client) override;
37 void SetNumberOfOutputBuffers(size_t number) override; 37 void SetNumberOfOutputBuffers(size_t number) override;
38 void BindSharedMemory(PortType port, 38 void BindSharedMemory(PortType port,
39 uint32_t index, 39 uint32_t index,
40 int ashmem_fd, 40 base::ScopedFD ashmem_fd,
41 off_t offset, 41 off_t offset,
42 size_t length) override; 42 size_t length) override;
43 void BindDmabuf(PortType port, uint32_t index, int dmabuf_fd) override; 43 void BindDmabuf(PortType port,
44 uint32_t index,
45 base::ScopedFD dmabuf_fd) override;
44 void UseBuffer(PortType port, 46 void UseBuffer(PortType port,
45 uint32_t index, 47 uint32_t index,
46 const BufferMetadata& metadata) override; 48 const BufferMetadata& metadata) override;
47 void Reset() override; 49 void Reset() override;
48 50
49 // Implementation of the VideoDecodeAccelerator::Client interface. 51 // Implementation of the VideoDecodeAccelerator::Client interface.
50 void ProvidePictureBuffers(uint32_t requested_num_of_buffers, 52 void ProvidePictureBuffers(uint32_t requested_num_of_buffers,
51 const gfx::Size& dimensions, 53 const gfx::Size& dimensions,
52 uint32_t texture_target) override; 54 uint32_t texture_target) override;
53 void DismissPictureBuffer(int32_t picture_buffer) override; 55 void DismissPictureBuffer(int32_t picture_buffer) override;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 138
137 gpu::GpuPreferences gpu_preferences_; 139 gpu::GpuPreferences gpu_preferences_;
138 140
139 DISALLOW_COPY_AND_ASSIGN(ArcGpuVideoDecodeAccelerator); 141 DISALLOW_COPY_AND_ASSIGN(ArcGpuVideoDecodeAccelerator);
140 }; 142 };
141 143
142 } // namespace arc 144 } // namespace arc
143 } // namespace chromeos 145 } // namespace chromeos
144 146
145 #endif // CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_ 147 #endif // CHROME_GPU_ARC_GPU_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698