1094332d3Sopenharmony_ci/* 2094332d3Sopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 3094332d3Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4094332d3Sopenharmony_ci * you may not use this file except in compliance with the License. 5094332d3Sopenharmony_ci * You may obtain a copy of the License at 6094332d3Sopenharmony_ci * 7094332d3Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8094332d3Sopenharmony_ci * 9094332d3Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10094332d3Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11094332d3Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12094332d3Sopenharmony_ci * See the License for the specific language governing permissions and 13094332d3Sopenharmony_ci * limitations under the License. 14094332d3Sopenharmony_ci */ 15094332d3Sopenharmony_ci 16094332d3Sopenharmony_ci#ifndef HOS_CAMERA_STREAM_H 17094332d3Sopenharmony_ci#define HOS_CAMERA_STREAM_H 18094332d3Sopenharmony_ci 19094332d3Sopenharmony_ci#include "ibuffer.h" 20094332d3Sopenharmony_ci#include "camera_metadata_info.h" 21094332d3Sopenharmony_ci#include <memory> 22094332d3Sopenharmony_ci 23094332d3Sopenharmony_cinamespace OHOS { 24094332d3Sopenharmony_cinamespace Camera { 25094332d3Sopenharmony_ciusing ModeMeta = std::shared_ptr<CameraMetadata>; 26094332d3Sopenharmony_ciusing CaptureMeta = std::shared_ptr<CameraMetadata>; 27094332d3Sopenharmony_ci 28094332d3Sopenharmony_cistruct StreamConfiguration { 29094332d3Sopenharmony_ci int32_t id; 30094332d3Sopenharmony_ci int32_t type; 31094332d3Sopenharmony_ci int32_t width; 32094332d3Sopenharmony_ci int32_t height; 33094332d3Sopenharmony_ci int32_t format; 34094332d3Sopenharmony_ci uint64_t usage; 35094332d3Sopenharmony_ci int32_t dataspace; 36094332d3Sopenharmony_ci bool tunnelMode; 37094332d3Sopenharmony_ci int32_t minFrameDuration; 38094332d3Sopenharmony_ci int32_t encodeType; 39094332d3Sopenharmony_ci int32_t bufferCount; 40094332d3Sopenharmony_ci int32_t maxBatchCaptureCount; 41094332d3Sopenharmony_ci int32_t maxCaptureCount; 42094332d3Sopenharmony_ci}; 43094332d3Sopenharmony_ci 44094332d3Sopenharmony_cistruct DeviceStreamSetting { 45094332d3Sopenharmony_ci int32_t streamId; 46094332d3Sopenharmony_ci uint32_t bufferCount; 47094332d3Sopenharmony_ci uint32_t width; 48094332d3Sopenharmony_ci uint32_t height; 49094332d3Sopenharmony_ci uint32_t format; 50094332d3Sopenharmony_ci uint64_t usage; 51094332d3Sopenharmony_ci CameraEncodeType encodeType; 52094332d3Sopenharmony_ci /* other settings */ 53094332d3Sopenharmony_ci}; 54094332d3Sopenharmony_ci 55094332d3Sopenharmony_cienum DynamicStreamSwitchMode { 56094332d3Sopenharmony_ci DYNAMIC_STREAM_SWITCH_NOT_SUPPORT = 0, 57094332d3Sopenharmony_ci DYNAMIC_STREAM_SWITCH_SUPPORT, 58094332d3Sopenharmony_ci DYNAMIC_STREAM_SWITCH_NEED_INNER_RESTART, 59094332d3Sopenharmony_ci}; 60094332d3Sopenharmony_ci 61094332d3Sopenharmony_cistruct FrameSpec { 62094332d3Sopenharmony_ci int64_t bufferPoolId_; 63094332d3Sopenharmony_ci uint32_t bufferCount_; 64094332d3Sopenharmony_ci std::shared_ptr<IBuffer> buffer_; 65094332d3Sopenharmony_ci}; 66094332d3Sopenharmony_ci} // namespace Camera 67094332d3Sopenharmony_ci} // namespace OHOS 68094332d3Sopenharmony_ci#endif 69