1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * http://www.apache.org/licenses/LICENSE-2.0 7 * Unless required by applicable law or agreed to in writing, software 8 * distributed under the License is distributed on an "AS IS" BASIS, 9 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 * See the License for the specific language governing permissions and 11 * limitations under the License. 12 */ 13 14 #ifndef HOST_STREAM_DATA_STRUCTURE_H 15 #define HOST_STREAM_DATA_STRUCTURE_H 16 #include <cstdint> 17 #include <functional> 18 #include "v1_0/vdi_types.h" 19 #include "ibuffer.h" 20 namespace OHOS::Camera { 21 using namespace OHOS::VDI::Camera::V1_0; 22 using HostStreamInfo = struct { 23 VdiStreamIntent type_; 24 int32_t streamId_; 25 int32_t width_; 26 int32_t height_; 27 int32_t format_; 28 uint64_t usage_; 29 uint64_t bufferPoolId_; 30 uint32_t bufferCount_; 31 int32_t encodeType_; 32 bool builed_ = false; 33 }; 34 35 using BufferCb = std::function<void(std::shared_ptr<IBuffer>)>; 36 } 37 #endif 38 39