blob: 963893afbd4eb5afc4528dda7b2c50bd64217348 [file] [log] [blame]
Yin-Chia Yeh6a6fe0f2018-09-06 15:38:34 -07001/*
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
23namespace android {
24namespace hardware {
25namespace camera {
26namespace device {
27namespace V3_5 {
28namespace implementation {
29
30CameraDeviceSession::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
47CameraDeviceSession::~CameraDeviceSession() {
48}
49
50Return<void> CameraDeviceSession::configureStreams_3_5(
Yin-Chia Yeh86a7d962018-10-15 14:20:15 -070051 const StreamConfiguration& requestedConfiguration,
Yin-Chia Yeh6a6fe0f2018-09-06 15:38:34 -070052 ICameraDeviceSession::configureStreams_3_5_cb _hidl_cb) {
Yin-Chia Yeh86a7d962018-10-15 14:20:15 -070053 return configureStreams_3_4(requestedConfiguration.v3_4, _hidl_cb);
Yin-Chia Yeh6a6fe0f2018-09-06 15:38:34 -070054}
55
56Return<void> CameraDeviceSession::signalStreamFlush(
57 const hidl_vec<int32_t>& /*requests*/, uint32_t /*streamConfigCounter*/) {
58 return Void();
59}
60
61} // namespace implementation
62} // namespace V3_5
63} // namespace device
64} // namespace camera
65} // namespace hardware
66} // namespace android