Yin-Chia Yeh | b978c38 | 2019-10-30 00:22:37 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 37 | using namespace android::camera3; |
| 38 | using namespace android::hardware::camera; |
| 39 | |
| 40 | namespace android { |
| 41 | |
| 42 | Camera3OfflineSession::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 | |
| 49 | Camera3OfflineSession::~Camera3OfflineSession() |
| 50 | { |
| 51 | ATRACE_CALL(); |
| 52 | ALOGV("%s: Tearing down offline session for camera id %s", __FUNCTION__, mId.string()); |
| 53 | } |
| 54 | |
| 55 | const String8& Camera3OfflineSession::getId() const { |
| 56 | return mId; |
| 57 | } |
| 58 | |
| 59 | status_t Camera3OfflineSession::initialize( |
| 60 | sp<hardware::camera::device::V3_6::ICameraOfflineSession> /*hidlSession*/) { |
| 61 | ATRACE_CALL(); |
| 62 | return OK; |
| 63 | } |
| 64 | |
| 65 | status_t Camera3OfflineSession::dump(int /*fd*/) { |
| 66 | ATRACE_CALL(); |
| 67 | return OK; |
| 68 | } |
| 69 | |
| 70 | status_t Camera3OfflineSession::abort() { |
| 71 | ATRACE_CALL(); |
| 72 | return OK; |
| 73 | } |
| 74 | |
| 75 | status_t Camera3OfflineSession::disconnect() { |
| 76 | ATRACE_CALL(); |
| 77 | return OK; |
| 78 | } |
| 79 | |
| 80 | status_t Camera3OfflineSession::waitForNextFrame(nsecs_t /*timeout*/) { |
| 81 | ATRACE_CALL(); |
| 82 | return OK; |
| 83 | } |
| 84 | |
| 85 | status_t Camera3OfflineSession::getNextResult(CaptureResult* /*frame*/) { |
| 86 | ATRACE_CALL(); |
| 87 | return OK; |
| 88 | } |
| 89 | |
| 90 | hardware::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 | |
| 96 | hardware::Return<void> Camera3OfflineSession::processCaptureResult( |
| 97 | const hardware::hidl_vec< |
| 98 | hardware::camera::device::V3_2::CaptureResult>& /*results*/) { |
| 99 | return hardware::Void(); |
| 100 | } |
| 101 | |
| 102 | hardware::Return<void> Camera3OfflineSession::notify( |
| 103 | const hardware::hidl_vec<hardware::camera::device::V3_2::NotifyMsg>& /*msgs*/) { |
| 104 | return hardware::Void(); |
| 105 | } |
| 106 | |
| 107 | hardware::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 | |
| 113 | hardware::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 |