blob: 9cdaf370c7b03b575f7aa81170b718b8a3eff96f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ANDROID_C2_ARC_VIDEO_ACCELERATOR_FACTORY_H
#define ANDROID_C2_ARC_VIDEO_ACCELERATOR_FACTORY_H
#include <media/arcvideobridge/IArcVideoBridge.h>
#include <utils/Singleton.h>
#include <components/arc/common/video.mojom.h>
#include <components/arc/common/video_decode_accelerator.mojom.h>
#include <components/arc/common/video_encode_accelerator.mojom.h>
namespace android {
// Helper class to create message pipe to the ArcVideoAccelerator.
// This class should only be used in the Mojo thread.
class C2ArcVideoAcceleratorFactory : public Singleton<C2ArcVideoAcceleratorFactory> {
public:
bool createVideoDecodeAccelerator(::arc::mojom::VideoDecodeAcceleratorRequest request);
bool createVideoEncodeAccelerator(::arc::mojom::VideoEncodeAcceleratorRequest request);
bool createVideoProtectedBufferAllocator(
::arc::mojom::VideoProtectedBufferAllocatorRequest request);
int32_t hostVersion() const;
private:
C2ArcVideoAcceleratorFactory();
uint32_t mHostVersion;
sp<IArcVideoBridge> mArcVideoBridge;
::arc::mojom::VideoAcceleratorFactoryPtr mRemoteFactory;
friend class Singleton<C2ArcVideoAcceleratorFactory>;
};
} // namespace android
#endif // ANDROID_C2_ARC_VIDEO_ACCELERATOR_FACTORY_H
|