Yixiao Luo | aaa5230 | 2022-08-11 18:44:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2022 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #pragma once |
| 18 | |
| 19 | #include <aidl/android/hardware/tv/input/TvStreamConfig.h> |
| 20 | #include <aidlcommonsupport/NativeHandle.h> |
| 21 | |
| 22 | using namespace std; |
| 23 | |
| 24 | namespace aidl { |
| 25 | namespace android { |
| 26 | namespace hardware { |
| 27 | namespace tv { |
| 28 | namespace input { |
| 29 | |
| 30 | class TvStreamConfigWrapper { |
| 31 | public: |
| 32 | TvStreamConfigWrapper() {} |
| 33 | TvStreamConfigWrapper(int32_t streamId_, int32_t maxVideoWidth_, int32_t maxVideoHeight_, |
| 34 | bool isOpen_) { |
| 35 | streamConfig.streamId = streamId_; |
| 36 | streamConfig.maxVideoWidth = maxVideoWidth_; |
| 37 | streamConfig.maxVideoHeight = maxVideoHeight_; |
| 38 | isOpen = isOpen_; |
| 39 | handle = nullptr; |
| 40 | } |
| 41 | |
| 42 | TvStreamConfig streamConfig; |
| 43 | bool isOpen; |
| 44 | native_handle_t* handle; |
| 45 | }; |
| 46 | } // namespace input |
| 47 | } // namespace tv |
| 48 | } // namespace hardware |
| 49 | } // namespace android |
| 50 | } // namespace aidl |