mirror of
https://github.com/openharmony/interface_sdk_c.git
synced 2026-08-24 14:32:50 -04:00
新增camera_device.h头文件,提供获取orientation接口
Signed-off-by: zhangchao <zhangchao338@huawei.com>
This commit is contained in:
@@ -18,6 +18,7 @@ ohos_ndk_headers("camera_ndk_header") {
|
||||
dest_dir = "$ndk_headers_out_dir/ohcamera"
|
||||
sources = [
|
||||
"./camera.h",
|
||||
"./camera_device.h",
|
||||
"./camera_input.h",
|
||||
"./camera_manager.h",
|
||||
"./capture_session.h",
|
||||
@@ -35,6 +36,7 @@ ohos_ndk_library("libohcamera") {
|
||||
system_capability = "SystemCapability.Multimedia.Camera.Core"
|
||||
system_capability_headers = [
|
||||
"ohcamera/camera.h",
|
||||
"ohcamera/camera_device.h",
|
||||
"ohcamera/camera_manager.h",
|
||||
"ohcamera/camera_input.h",
|
||||
"ohcamera/capture_session.h",
|
||||
|
||||
@@ -326,5 +326,9 @@
|
||||
{
|
||||
"first_introduced": "11",
|
||||
"name": "OH_VideoOutput_Release"
|
||||
},
|
||||
{
|
||||
"first_introduced": "12",
|
||||
"name": "OH_CameraDevice_GetCameraOrientation"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup OH_Camera
|
||||
* @{
|
||||
*
|
||||
* @brief Provide the definition of the C interface for the camera module.
|
||||
*
|
||||
* @syscap SystemCapability.Multimedia.Camera.Core
|
||||
*
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file camera_device.h
|
||||
*
|
||||
* @brief Declare the camera device concepts.
|
||||
*
|
||||
* @library libohcamera.so
|
||||
* @syscap SystemCapability.Multimedia.Camera.Core
|
||||
* @since 12
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H
|
||||
#define NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "camera.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Gets the sensor orientation attribute for a camera device.
|
||||
*
|
||||
* @param camera the {@link Camera_Device} which use to get attributes.
|
||||
* @param orientation the sensor orientation attribute if the method call succeeds.
|
||||
* @return {@link #CAMERA_OK} if the method call succeeds.
|
||||
* {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
|
||||
* {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
|
||||
* @since 12
|
||||
*/
|
||||
Camera_ErrorCode OH_CameraDevice_GetCameraOrientation(Camera_Device* camera, uint32_t* orientation);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // NATIVE_INCLUDE_CAMERA_CAMERADEVICE_H
|
||||
/** @} */
|
||||
Reference in New Issue
Block a user