Yin-Chia Yeh | 6a6fe0f | 2018-09-06 15:38:34 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 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 | #define LOG_TAG "CamDevSession@3.5-impl" |
| 18 | #include <android/log.h> |
| 19 | |
| 20 | #include <utils/Trace.h> |
| 21 | #include "CameraDeviceSession.h" |
| 22 | |
| 23 | namespace android { |
| 24 | namespace hardware { |
| 25 | namespace camera { |
| 26 | namespace device { |
| 27 | namespace V3_5 { |
| 28 | namespace implementation { |
| 29 | |
| 30 | CameraDeviceSession::CameraDeviceSession( |
| 31 | camera3_device_t* device, |
| 32 | const camera_metadata_t* deviceInfo, |
| 33 | const sp<V3_2::ICameraDeviceCallback>& callback) : |
| 34 | V3_4::implementation::CameraDeviceSession(device, deviceInfo, callback) { |
| 35 | |
| 36 | mHasCallback_3_5 = false; |
| 37 | |
| 38 | auto castResult = ICameraDeviceCallback::castFrom(callback); |
| 39 | if (castResult.isOk()) { |
| 40 | sp<ICameraDeviceCallback> callback3_5 = castResult; |
| 41 | if (callback3_5 != nullptr) { |
| 42 | mHasCallback_3_5 = true; |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | CameraDeviceSession::~CameraDeviceSession() { |
| 48 | } |
| 49 | |
| 50 | Return<void> CameraDeviceSession::configureStreams_3_5( |
| 51 | const StreamConfiguration& /*requestedConfiguration*/, |
| 52 | ICameraDeviceSession::configureStreams_3_5_cb _hidl_cb) { |
| 53 | HalStreamConfiguration outStreams; |
| 54 | _hidl_cb(Status::OPERATION_NOT_SUPPORTED, outStreams); |
| 55 | return Void(); |
| 56 | } |
| 57 | |
| 58 | Return<void> CameraDeviceSession::signalStreamFlush( |
| 59 | const hidl_vec<int32_t>& /*requests*/, uint32_t /*streamConfigCounter*/) { |
| 60 | return Void(); |
| 61 | } |
| 62 | |
| 63 | } // namespace implementation |
| 64 | } // namespace V3_5 |
| 65 | } // namespace device |
| 66 | } // namespace camera |
| 67 | } // namespace hardware |
| 68 | } // namespace android |