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

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

Issue 1641353003: GpuArcVideoService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@arc-4-owen-ArcGpuVideoDecodeAccelerator
Patch Set: update ArcVideoAccelerator api Created 4 years, 9 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 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 CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
6 #define CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
7
8 #include <map>
9
10 #include "base/macros.h"
11 #include "components/arc/common/video.mojom.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h"
13
14 namespace chromeos {
15 namespace arc {
16
17 // GpuArcVideoService manages life-cycle and IPC message translation for
18 // ArcVideoAccelerator.
19 //
20 // For each creation request from GpuArcVideoServiceHost, GpuArcVideoService
21 // will create a new IPC channel.
22 class GpuArcVideoService : public ::arc::VideoHost {
23 public:
24 class AcceleratorStub;
25
26 // |request| is mojo interface request of arc::VideoHost.
27 explicit GpuArcVideoService(mojo::InterfaceRequest<::arc::VideoHost> request);
28
29 // Upon deletion, all ArcVideoAccelerator will be deleted and the associated
30 // IPC channels are closed.
31 ~GpuArcVideoService() override;
32
33 // Removes the reference of |stub| (and trigger deletion) from this class.
34 void RemoveClient(AcceleratorStub* stub);
35
36 private:
37 // arc::VideoHost implementation.
38 void OnRequestArcVideoAcceleratorChannel(
39 uint32_t pid,
40 const OnRequestArcVideoAcceleratorChannelCallback& callback) override;
41
42 base::ThreadChecker thread_checker_;
43
44 // Binding of arc::VideoHost. It also takes ownership of |this|.
45 mojo::StrongBinding<::arc::VideoHost> binding_;
46
47 // Bookkeeping all accelerator stubs.
48 std::map<AcceleratorStub*, scoped_ptr<AcceleratorStub>> accelerator_stubs_;
49
50 DISALLOW_COPY_AND_ASSIGN(GpuArcVideoService);
51 };
52
53 } // namespace arc
54 } // namespace chromeos
55
56 #endif // CHROME_GPU_GPU_ARC_VIDEO_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698