blob: dc5cbb350cf12d65b8b13e5c8b84f83135acc116 [file] [log] [blame]
Yin-Chia Yehb978c382019-10-30 00:22:37 -07001/*
2 * Copyright (C) 2019 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 "Camera3-OffLnSsn"
18#define ATRACE_TAG ATRACE_TAG_CAMERA
19//#define LOG_NDEBUG 0
20//#define LOG_NNDEBUG 0 // Per-frame verbose logging
21
22#ifdef LOG_NNDEBUG
23#define ALOGVV(...) ALOGV(__VA_ARGS__)
24#else
25#define ALOGVV(...) ((void)0)
26#endif
27
28#include <inttypes.h>
29
30#include <utils/Trace.h>
31
32#include "device3/Camera3OfflineSession.h"
33#include "device3/Camera3OutputStream.h"
34#include "device3/Camera3InputStream.h"
35#include "device3/Camera3SharedOutputStream.h"
36
37using namespace android::camera3;
38using namespace android::hardware::camera;
39
40namespace android {
41
42Camera3OfflineSession::Camera3OfflineSession(const String8 &id):
43 mId(id)
44{
45 ATRACE_CALL();
46 ALOGV("%s: Created offline session for camera %s", __FUNCTION__, mId.string());
47}
48
49Camera3OfflineSession::~Camera3OfflineSession()
50{
51 ATRACE_CALL();
52 ALOGV("%s: Tearing down offline session for camera id %s", __FUNCTION__, mId.string());
53}
54
55const String8& Camera3OfflineSession::getId() const {
56 return mId;
57}
58
59status_t Camera3OfflineSession::initialize(
60 sp<hardware::camera::device::V3_6::ICameraOfflineSession> /*hidlSession*/) {
61 ATRACE_CALL();
62 return OK;
63}
64
65status_t Camera3OfflineSession::dump(int /*fd*/) {
66 ATRACE_CALL();
67 return OK;
68}
69
70status_t Camera3OfflineSession::abort() {
71 ATRACE_CALL();
72 return OK;
73}
74
75status_t Camera3OfflineSession::disconnect() {
76 ATRACE_CALL();
77 return OK;
78}
79
80status_t Camera3OfflineSession::waitForNextFrame(nsecs_t /*timeout*/) {
81 ATRACE_CALL();
82 return OK;
83}
84
85status_t Camera3OfflineSession::getNextResult(CaptureResult* /*frame*/) {
86 ATRACE_CALL();
87 return OK;
88}
89
90hardware::Return<void> Camera3OfflineSession::processCaptureResult_3_4(
91 const hardware::hidl_vec<
92 hardware::camera::device::V3_4::CaptureResult>& /*results*/) {
93 return hardware::Void();
94}
95
96hardware::Return<void> Camera3OfflineSession::processCaptureResult(
97 const hardware::hidl_vec<
98 hardware::camera::device::V3_2::CaptureResult>& /*results*/) {
99 return hardware::Void();
100}
101
102hardware::Return<void> Camera3OfflineSession::notify(
103 const hardware::hidl_vec<hardware::camera::device::V3_2::NotifyMsg>& /*msgs*/) {
104 return hardware::Void();
105}
106
107hardware::Return<void> Camera3OfflineSession::requestStreamBuffers(
108 const hardware::hidl_vec<hardware::camera::device::V3_5::BufferRequest>& /*bufReqs*/,
109 requestStreamBuffers_cb /*_hidl_cb*/) {
110 return hardware::Void();
111}
112
113hardware::Return<void> Camera3OfflineSession::returnStreamBuffers(
114 const hardware::hidl_vec<hardware::camera::device::V3_2::StreamBuffer>& /*buffers*/) {
115 return hardware::Void();
116}
117
118}; // namespace android