From a1f35e75933c19cc4b4e4619d8274546b13e80d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E9=9D=96?= Date: Tue, 5 Aug 2025 09:50:33 +0000 Subject: [PATCH 1/5] 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周靖 --- 446673b3.diff | 336 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 446673b3.diff diff --git a/446673b3.diff b/446673b3.diff new file mode 100644 index 00000000..8c071a86 --- /dev/null +++ b/446673b3.diff @@ -0,0 +1,336 @@ +From 446673b3da9498c52e606da0b1956fe7c9350507 Mon Sep 17 00:00:00 2001 +From: z30014341 +Date: Tue, 29 Jul 2025 18:01:35 +0800 +Subject: [PATCH] TicketNo:DTS2025071014731 Description: enbale hebc + Team:OTHERS Feature or Bugfix:Bugfix Binary Source: NA PrivateCode(Yes/No):No + +Change-Id: I87aaa50c2a5d5ceca7b4e4abf91a7fdc79459b44 +--- + .../include/camera_device_ability_items.h | 14 ++++ + .../include/camera_metadata_item_info.h | 4 ++ + camera/metadata/src/camera_metadata_info.cpp | 2 + + camera/v1_5/BUILD.gn | 4 ++ + camera/v1_5/ICameraDevice.idl | 49 +++++++++++++ + camera/v1_5/ICameraHost.idl | 68 +++++++++++++++++++ + camera/v1_5/IStreamOperator.idl | 48 +++++++++++++ + camera/v1_5/Types.idl | 49 +++++++++++++ + 8 files changed, 238 insertions(+) + create mode 100644 camera/v1_5/ICameraDevice.idl + create mode 100644 camera/v1_5/ICameraHost.idl + create mode 100644 camera/v1_5/IStreamOperator.idl + create mode 100644 camera/v1_5/Types.idl + +diff --git a/camera/metadata/include/camera_device_ability_items.h b/camera/metadata/include/camera_device_ability_items.h +index 393f8cb7..3c8a0359 100644 +--- a/camera/metadata/include/camera_device_ability_items.h ++++ b/camera/metadata/include/camera_device_ability_items.h +@@ -1662,6 +1662,20 @@ typedef enum camera_device_metadata_tag { + * (i.e. uint8: 0-false/1-true ...) + */ + OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED, ++ /* ++ * ohos.ability.bandwidthCompressionAvailable [static, byte[], public] ++ * ++ * camera stream property, report camera support band width compression available ++ * (i.e. byte[] ...) ++ */ ++ OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE, ++ /** ++ * ohos.control.bandwidthCompressionAvailable [static, byte[], public] ++ * ++ * camera stream property, set camera support band width compression ++ * (i.e. byte[] ...) ++ */ ++ OHOS_CONTROL_BANDWIDTH_COMPRESSION, + /** + * ohos.ability.prerecord [static, int32[], public] + * +diff --git a/camera/metadata/include/camera_metadata_item_info.h b/camera/metadata/include/camera_metadata_item_info.h +index 15fc2c44..0e37cd34 100644 +--- a/camera/metadata/include/camera_metadata_item_info.h ++++ b/camera/metadata/include/camera_metadata_item_info.h +@@ -410,6 +410,10 @@ static item_info_t g_ohosStreamAbility[OHOS_STREAM_ABILITY_END - OHOS_STREAM_ABI + OHOS_STREAM_ABILITY_START] = {"offlineControlValue", META_TYPE_BYTE, -1}, + [OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED - + OHOS_STREAM_ABILITY_START] = {"rotationInIpsSupported", META_TYPE_BYTE, 1}, ++ [OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE - ++ OHOS_STREAM_ABILITY_START] = {"bandwidthCompressionAvailable", META_TYPE_BYTE, -1}, ++ [OHOS_CONTROL_BANDWIDTH_COMPRESSION - ++ OHOS_STREAM_ABILITY_START] = {"bandwidthCompressionControlValue", META_TYPE_BYTE, -1}, + }; + + static item_info_t g_ohosStreamControl[OHOS_STREAM_CONTROL_END - OHOS_STREAM_CONTROL_START] = { +diff --git a/camera/metadata/src/camera_metadata_info.cpp b/camera/metadata/src/camera_metadata_info.cpp +index cf770083..fc28d831 100644 +--- a/camera/metadata/src/camera_metadata_info.cpp ++++ b/camera/metadata/src/camera_metadata_info.cpp +@@ -258,6 +258,8 @@ const std::vector g_metadataTags = { + OHOS_ABILITY_CHANGETO_OFFLINE_STREAM_OPEATOR, + OHOS_CONTROL_CHANGETO_OFFLINE_STREAM_OPEATOR, + OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED, ++ OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE, ++ OHOS_CONTROL_BANDWIDTH_COMPRESSION, + + OHOS_JPEG_GPS_COORDINATES, + OHOS_JPEG_GPS_PROCESSING_METHOD, +diff --git a/camera/v1_5/BUILD.gn b/camera/v1_5/BUILD.gn +index d046f2a7..38aaa30f 100644 +--- a/camera/v1_5/BUILD.gn ++++ b/camera/v1_5/BUILD.gn +@@ -22,8 +22,12 @@ if (defined(ohos_lite)) { + module_name = "camera_service" + + sources = [ ++ "ICameraDevice.idl", ++ "ICameraHost.idl", ++ "IStreamOperator.idl", + "IVideoProcessService.idl", + "IVideoProcessSession.idl", ++ "Types.idl", + ] + + stub_deps = [ +diff --git a/camera/v1_5/ICameraDevice.idl b/camera/v1_5/ICameraDevice.idl +new file mode 100644 +index 00000000..a111fbc8 +--- /dev/null ++++ b/camera/v1_5/ICameraDevice.idl +@@ -0,0 +1,49 @@ ++/* ++ * Copyright (c) 2025 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. ++ */ ++ ++/** ++ * @file icamera_device.h ++ * ++ * @brief Declares APIs for camera device operations. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ ++package ohos.hdi.camera.v1_5; ++ ++import ohos.hdi.camera.v1_4.IStreamOperatorCallback; ++import ohos.hdi.camera.v1_5.IStreamOperator; ++import ohos.hdi.camera.v1_4.ICameraDevice; ++ ++interface ICameraDevice extends ohos.hdi.camera.v1_4.ICameraDevice { ++ /** ++ * @brief Obtains the stream operation handle. ++ * ++ * @param callback Indicates a stream callback. For details, see {@link IStreamOperatorCallback}. ++ * {@link OnCaptureStarted} and {@link OnCaptureEnded} are used to report the start and end of capture, ++ * and {@link OnCaptureError} is used to report a capture error. ++ * ++ * @param streamOperator Indicates the stream operation handle. ++ * ++ * @return Returns NO_ERROR if the operation is successful; returns an error code defined ++ * in {@link CamRetCode} otherwise. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ GetStreamOperator_V1_5([in] IStreamOperatorCallback callbackObj, [out] IStreamOperator streamOperator); ++ ++} +\ No newline at end of file +diff --git a/camera/v1_5/ICameraHost.idl b/camera/v1_5/ICameraHost.idl +new file mode 100644 +index 00000000..fe566472 +--- /dev/null ++++ b/camera/v1_5/ICameraHost.idl +@@ -0,0 +1,68 @@ ++/* ++ * 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. ++ */ ++ ++/** ++ * @file icamera_host.h ++ * ++ * @brief Management class of the camera service that provides Hardware Driver Interfaces (HDIs) for the upper layer. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ ++package ohos.hdi.camera.v1_5; ++ ++import ohos.hdi.camera.v1_4.ICameraHost; ++import ohos.hdi.camera.v1_5.ICameraDevice; ++import ohos.hdi.camera.v1_0.ICameraDeviceCallback; ++import ohos.hdi.camera.v1_5.Types; ++ ++interface ICameraHost extends ohos.hdi.camera.v1_4.ICameraHost { ++ /** ++ * @brief Opens a camera device. ++ * ++ * By calling this function, you can obtain the ICameraDevice instance and operate the ++ * specific camera device mapping to the instance. ++ * ++ * @param cameraId Indicates the ID of the camera device, which can be obtained by calling {@link GetCameraIds}. ++ * @param callback Indicates the callback related to the camera. For details, see {@link ICameraDeviceCallback}. ++ * @param device Indicates the ICameraDevice instance corresponding to the ID of the camera device. ++ * ++ * @return Returns NO_ERROR if the operation is successful; returns an error code defined ++ * in {@link CamRetCode} otherwise. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ OpenCamera_V1_5([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device); ++ ++ /** ++ * @brief Opens a camera device in secure mode. ++ * ++ * By calling this function, you can obtain the ICameraDevice instance and operate the ++ * specific camera device mapping to the instance. ++ * ++ * @param cameraId Indicates the ID of the camera device, which can be obtained by calling {@link GetCameraIds}. ++ * @param callback Indicates the callback related to the camera. For details, see {@link ICameraDeviceCallback}. ++ * @param device Indicates the ICameraDevice instance corresponding to the ID of the camera device. ++ * ++ * @return Returns NO_ERROR if the operation is successful; returns an error code defined ++ * in {@link CamRetCode} otherwise. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ OpenSecureCamera_V1_5([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device); ++} +\ No newline at end of file +diff --git a/camera/v1_5/IStreamOperator.idl b/camera/v1_5/IStreamOperator.idl +new file mode 100644 +index 00000000..7ee3d4db +--- /dev/null ++++ b/camera/v1_5/IStreamOperator.idl +@@ -0,0 +1,48 @@ ++/* ++ * Copyright (c) 2025 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. ++ */ ++ ++/** ++ * @file istream_operator.h ++ * ++ * @brief Declares APIs for stream operations. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ ++package ohos.hdi.camera.v1_5; ++ ++import ohos.hdi.camera.v1_4.IStreamOperator; ++import ohos.hdi.camera.v1_5.Types; ++ ++interface IStreamOperator extends ohos.hdi.camera.v1_4.IStreamOperator { ++ /** ++ * @brief Creates streams. ++ * ++ * Before calling this function, you must use {@link IsStreamsSupported} to check whether the hardware ++ * abstraction layer (HAL) supports the streams to create. ++ * ++ * @param streamInfos Indicates the list of stream information, which is defined by {@link StreamInfo}. ++ * The passed stream information may be changed. Therefore, you can run {@link GetStreamAttributes} to ++ * obtain the latest stream attributes after the stream is created. ++ * ++ * @return Returns NO_ERROR if the operation is successful; ++ * returns an error code defined in {@link CamRetCode} otherwise. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ CreateStreams_V1_5([in] struct StreamInfo_V1_5[] streamInfos); ++} +diff --git a/camera/v1_5/Types.idl b/camera/v1_5/Types.idl +new file mode 100644 +index 00000000..30217eeb +--- /dev/null ++++ b/camera/v1_5/Types.idl +@@ -0,0 +1,49 @@ ++/* ++ * Copyright (c) 2025 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. ++ */ ++ ++/** ++ * @file Types.h ++ * ++ * @brief Declares data types ++ * used by the Hardware Driver Interfaces (HDIs) of this module. ++ * ++ * @since 6.0 ++ * @version 1.5 ++ */ ++ ++package ohos.hdi.camera.v1_5; ++ ++import ohos.hdi.camera.v1_1.Types; ++import ohos.hdi.camera.v1_0.Types; ++ ++/** ++ * @brief Defines the stream information, which is used to pass configuration parameters during stream creation. ++ */ ++struct StreamInfo_V1_5 { ++ /** ++ * The last version of stream info ++ */ ++ struct StreamInfo v1_0; ++ ++ /** ++ * Optional extended stream informations. ++ */ ++ struct ExtendedStreamInfo[] extendedStreamInfos; ++ ++ /** ++ * Indicates the configuration parameters. ++ */ ++ unsigned char[] settings; ++}; +\ No newline at end of file +-- +2.45.2.huawei.10 + -- Gitee From 01b1c4ef8bcab2dc9fa39e64b6857c1ab8892a04 Mon Sep 17 00:00:00 2001 From: zhoujing Date: Tue, 5 Aug 2025 17:54:10 +0800 Subject: [PATCH 2/5] add hebc Signed-off-by: zhoujing --- .../include/camera_device_ability_items.h | 14 ++++ .../include/camera_metadata_item_info.h | 4 ++ camera/metadata/src/camera_metadata_info.cpp | 2 + camera/v1_5/BUILD.gn | 51 ++++++++++++++ camera/v1_5/ICameraDevice.idl | 49 +++++++++++++ camera/v1_5/ICameraHost.idl | 68 +++++++++++++++++++ camera/v1_5/IStreamOperator.idl | 48 +++++++++++++ camera/v1_5/Types.idl | 49 +++++++++++++ 8 files changed, 285 insertions(+) create mode 100644 camera/v1_5/BUILD.gn create mode 100644 camera/v1_5/ICameraDevice.idl create mode 100644 camera/v1_5/ICameraHost.idl create mode 100644 camera/v1_5/IStreamOperator.idl create mode 100644 camera/v1_5/Types.idl diff --git a/camera/metadata/include/camera_device_ability_items.h b/camera/metadata/include/camera_device_ability_items.h index d27c0c65..9c4bfbbb 100644 --- a/camera/metadata/include/camera_device_ability_items.h +++ b/camera/metadata/include/camera_device_ability_items.h @@ -1620,6 +1620,20 @@ typedef enum camera_device_metadata_tag { * (i.e. uint8: 0-false/1-true ...) */ OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED, + /* + * ohos.ability.bandwidthCompressionAvailable [static, byte[], public] + * + * camera stream property, report camera support band width compression available + * (i.e. byte[] ...) + */ + OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE, + /** + * ohos.control.bandwidthCompressionAvailable [static, byte[], public] + * + * camera stream property, set camera support band width compression + * (i.e. byte[] ...) + */ + OHOS_CONTROL_BANDWIDTH_COMPRESSION, /** * ohos.ability.prerecord [static, int32[], public] * diff --git a/camera/metadata/include/camera_metadata_item_info.h b/camera/metadata/include/camera_metadata_item_info.h index 2e0ebc78..68e49f27 100644 --- a/camera/metadata/include/camera_metadata_item_info.h +++ b/camera/metadata/include/camera_metadata_item_info.h @@ -399,6 +399,10 @@ static item_info_t g_ohosStreamAbility[OHOS_STREAM_ABILITY_END - OHOS_STREAM_ABI OHOS_STREAM_ABILITY_START] = {"offlineControlValue", META_TYPE_BYTE, -1}, [OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED - OHOS_STREAM_ABILITY_START] = {"rotationInIpsSupported", META_TYPE_BYTE, 1}, + [OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE - + OHOS_STREAM_ABILITY_START] = {"bandwidthCompressionAvailable", META_TYPE_BYTE, -1}, + [OHOS_CONTROL_BANDWIDTH_COMPRESSION - + OHOS_STREAM_ABILITY_START] = {"bandwidthCompressionControlValue", META_TYPE_BYTE, -1}, }; static item_info_t g_ohosStreamControl[OHOS_STREAM_CONTROL_END - OHOS_STREAM_CONTROL_START] = { diff --git a/camera/metadata/src/camera_metadata_info.cpp b/camera/metadata/src/camera_metadata_info.cpp index f02d4651..4cd66321 100644 --- a/camera/metadata/src/camera_metadata_info.cpp +++ b/camera/metadata/src/camera_metadata_info.cpp @@ -252,6 +252,8 @@ const std::vector g_metadataTags = { OHOS_ABILITY_CHANGETO_OFFLINE_STREAM_OPEATOR, OHOS_CONTROL_CHANGETO_OFFLINE_STREAM_OPEATOR, OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED, + OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE, + OHOS_CONTROL_BANDWIDTH_COMPRESSION, OHOS_JPEG_GPS_COORDINATES, OHOS_JPEG_GPS_PROCESSING_METHOD, diff --git a/camera/v1_5/BUILD.gn b/camera/v1_5/BUILD.gn new file mode 100644 index 00000000..42c1ae0d --- /dev/null +++ b/camera/v1_5/BUILD.gn @@ -0,0 +1,51 @@ +# Copyright (c) 2025 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. + +import("//build/config/components/hdi/hdi.gni") +if (defined(ohos_lite)) { + group("libcamera_proxy_1.4") { + deps = [] + public_configs = [] + } +} else { + hdi("camera") { + module_name = "camera_service" + + sources = [ + "IVideoProcessCallback.idl", + "IVideoProcessService.idl", + "Types.idl", + ] + + stub_deps = [ + "../sequenceable/buffer_handle:libbuffer_handle_sequenceable_1.0", + "../sequenceable/buffer_producer:libbuffer_producer_sequenceable_1.0", + "../sequenceable/map_data:libmap_data_sequenceable_1.0", + "../v1_3:libcamera_stub_1.3", + ] + proxy_deps = [ + "../sequenceable/buffer_handle:libbuffer_handle_sequenceable_1.0", + "../sequenceable/buffer_producer:libbuffer_producer_sequenceable_1.0", + "../sequenceable/map_data:libmap_data_sequenceable_1.0", + "../v1_3:libcamera_proxy_1.3", + ] + sequenceable_ext_deps = [ + "graphic_surface:buffer_handle", + "graphic_surface:surface", + ] + + language = "cpp" + subsystem_name = "hdf" + part_name = "drivers_interface_camera" + } +} diff --git a/camera/v1_5/ICameraDevice.idl b/camera/v1_5/ICameraDevice.idl new file mode 100644 index 00000000..d33e0003 --- /dev/null +++ b/camera/v1_5/ICameraDevice.idl @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2025 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. + */ + +/** + * @file icamera_device.h + * + * @brief Declares APIs for camera device operations. + * + * @since 6.0 + * @version 1.5 + */ + +package ohos.hdi.camera.v1_5; + +import ohos.hdi.camera.v1_4.IStreamOperatorCallback; +import ohos.hdi.camera.v1_5.IStreamOperator; +import ohos.hdi.camera.v1_4.ICameraDevice; + +interface ICameraDevice extends ohos.hdi.camera.v1_4.ICameraDevice { + /** + * @brief Obtains the stream operation handle. + * + * @param callback Indicates a stream callback. For details, see {@link IStreamOperatorCallback}. + * {@link OnCaptureStarted} and {@link OnCaptureEnded} are used to report the start and end of capture, + * and {@link OnCaptureError} is used to report a capture error. + * + * @param streamOperator Indicates the stream operation handle. + * + * @return Returns NO_ERROR if the operation is successful; returns an error code defined + * in {@link CamRetCode} otherwise. + * + * @since 6.0 + * @version 1.5 + */ + GetStreamOperator_V1_5([in] IStreamOperatorCallback callbackObj, [out] IStreamOperator streamOperator); + +} \ No newline at end of file diff --git a/camera/v1_5/ICameraHost.idl b/camera/v1_5/ICameraHost.idl new file mode 100644 index 00000000..c364e042 --- /dev/null +++ b/camera/v1_5/ICameraHost.idl @@ -0,0 +1,68 @@ +/* + * 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. + */ + +/** + * @file icamera_host.h + * + * @brief Management class of the camera service that provides Hardware Driver Interfaces (HDIs) for the upper layer. + * + * @since 6.0 + * @version 1.5 + */ + +package ohos.hdi.camera.v1_5; + +import ohos.hdi.camera.v1_4.ICameraHost; +import ohos.hdi.camera.v1_5.ICameraDevice; +import ohos.hdi.camera.v1_0.ICameraDeviceCallback; +import ohos.hdi.camera.v1_5.Types; + +interface ICameraHost extends ohos.hdi.camera.v1_4.ICameraHost { + /** + * @brief Opens a camera device. + * + * By calling this function, you can obtain the ICameraDevice instance and operate the + * specific camera device mapping to the instance. + * + * @param cameraId Indicates the ID of the camera device, which can be obtained by calling {@link GetCameraIds}. + * @param callback Indicates the callback related to the camera. For details, see {@link ICameraDeviceCallback}. + * @param device Indicates the ICameraDevice instance corresponding to the ID of the camera device. + * + * @return Returns NO_ERROR if the operation is successful; returns an error code defined + * in {@link CamRetCode} otherwise. + * + * @since 6.0 + * @version 1.5 + */ + OpenCamera_V1_5([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device); + + /** + * @brief Opens a camera device in secure mode. + * + * By calling this function, you can obtain the ICameraDevice instance and operate the + * specific camera device mapping to the instance. + * + * @param cameraId Indicates the ID of the camera device, which can be obtained by calling {@link GetCameraIds}. + * @param callback Indicates the callback related to the camera. For details, see {@link ICameraDeviceCallback}. + * @param device Indicates the ICameraDevice instance corresponding to the ID of the camera device. + * + * @return Returns NO_ERROR if the operation is successful; returns an error code defined + * in {@link CamRetCode} otherwise. + * + * @since 6.0 + * @version 1.5 + */ + OpenSecureCamera_V1_5([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device); +} \ No newline at end of file diff --git a/camera/v1_5/IStreamOperator.idl b/camera/v1_5/IStreamOperator.idl new file mode 100644 index 00000000..7ee3d4db --- /dev/null +++ b/camera/v1_5/IStreamOperator.idl @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 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. + */ + +/** + * @file istream_operator.h + * + * @brief Declares APIs for stream operations. + * + * @since 6.0 + * @version 1.5 + */ + +package ohos.hdi.camera.v1_5; + +import ohos.hdi.camera.v1_4.IStreamOperator; +import ohos.hdi.camera.v1_5.Types; + +interface IStreamOperator extends ohos.hdi.camera.v1_4.IStreamOperator { + /** + * @brief Creates streams. + * + * Before calling this function, you must use {@link IsStreamsSupported} to check whether the hardware + * abstraction layer (HAL) supports the streams to create. + * + * @param streamInfos Indicates the list of stream information, which is defined by {@link StreamInfo}. + * The passed stream information may be changed. Therefore, you can run {@link GetStreamAttributes} to + * obtain the latest stream attributes after the stream is created. + * + * @return Returns NO_ERROR if the operation is successful; + * returns an error code defined in {@link CamRetCode} otherwise. + * + * @since 6.0 + * @version 1.5 + */ + CreateStreams_V1_5([in] struct StreamInfo_V1_5[] streamInfos); +} diff --git a/camera/v1_5/Types.idl b/camera/v1_5/Types.idl new file mode 100644 index 00000000..31c7d3c4 --- /dev/null +++ b/camera/v1_5/Types.idl @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2025 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. + */ + +/** + * @file Types.h + * + * @brief Declares data types + * used by the Hardware Driver Interfaces (HDIs) of this module. + * + * @since 6.0 + * @version 1.5 + */ + +package ohos.hdi.camera.v1_5; + +import ohos.hdi.camera.v1_1.Types; +import ohos.hdi.camera.v1_0.Types; + +/** + * @brief Defines the stream information, which is used to pass configuration parameters during stream creation. + */ +struct StreamInfo_V1_5 { + /** + * The last version of stream info + */ + struct StreamInfo v1_0; + + /** + * Optional extended stream informations. + */ + struct ExtendedStreamInfo[] extendedStreamInfos; + + /** + * Indicates the configuration parameters. + */ + unsigned char[] settings; +}; \ No newline at end of file -- Gitee From 0f7dc01d8d4fedc9ca94ad63dea934899f3fdc5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E9=9D=96?= Date: Tue, 5 Aug 2025 09:56:22 +0000 Subject: [PATCH 3/5] 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 周靖 --- camera/v1_5/BUILD.gn | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/camera/v1_5/BUILD.gn b/camera/v1_5/BUILD.gn index 42c1ae0d..38aaa30f 100644 --- a/camera/v1_5/BUILD.gn +++ b/camera/v1_5/BUILD.gn @@ -13,7 +13,7 @@ import("//build/config/components/hdi/hdi.gni") if (defined(ohos_lite)) { - group("libcamera_proxy_1.4") { + group("libcamera_proxy_1.5") { deps = [] public_configs = [] } @@ -22,8 +22,11 @@ if (defined(ohos_lite)) { module_name = "camera_service" sources = [ - "IVideoProcessCallback.idl", + "ICameraDevice.idl", + "ICameraHost.idl", + "IStreamOperator.idl", "IVideoProcessService.idl", + "IVideoProcessSession.idl", "Types.idl", ] @@ -32,12 +35,14 @@ if (defined(ohos_lite)) { "../sequenceable/buffer_producer:libbuffer_producer_sequenceable_1.0", "../sequenceable/map_data:libmap_data_sequenceable_1.0", "../v1_3:libcamera_stub_1.3", + "../v1_4:libcamera_stub_1.4", ] proxy_deps = [ "../sequenceable/buffer_handle:libbuffer_handle_sequenceable_1.0", "../sequenceable/buffer_producer:libbuffer_producer_sequenceable_1.0", "../sequenceable/map_data:libmap_data_sequenceable_1.0", "../v1_3:libcamera_proxy_1.3", + "../v1_4:libcamera_proxy_1.4", ] sequenceable_ext_deps = [ "graphic_surface:buffer_handle", -- Gitee From aa8127cb0d99e520b22a11a86b9c6f73e666bcd5 Mon Sep 17 00:00:00 2001 From: zhoujing Date: Tue, 5 Aug 2025 17:57:13 +0800 Subject: [PATCH 4/5] 3 Signed-off-by: zhoujing --- camera/v1_5/BUILD.gn | 2 -- 1 file changed, 2 deletions(-) diff --git a/camera/v1_5/BUILD.gn b/camera/v1_5/BUILD.gn index 38aaa30f..67a03bf1 100644 --- a/camera/v1_5/BUILD.gn +++ b/camera/v1_5/BUILD.gn @@ -25,8 +25,6 @@ if (defined(ohos_lite)) { "ICameraDevice.idl", "ICameraHost.idl", "IStreamOperator.idl", - "IVideoProcessService.idl", - "IVideoProcessSession.idl", "Types.idl", ] -- Gitee From 5776c6b8c5e66a99192189b5bedf451560c9617b Mon Sep 17 00:00:00 2001 From: zhoujing Date: Tue, 5 Aug 2025 17:59:54 +0800 Subject: [PATCH 5/5] 4 Signed-off-by: zhoujing --- 446673b3.diff | 336 -------------------------------------------------- 1 file changed, 336 deletions(-) delete mode 100644 446673b3.diff diff --git a/446673b3.diff b/446673b3.diff deleted file mode 100644 index 8c071a86..00000000 --- a/446673b3.diff +++ /dev/null @@ -1,336 +0,0 @@ -From 446673b3da9498c52e606da0b1956fe7c9350507 Mon Sep 17 00:00:00 2001 -From: z30014341 -Date: Tue, 29 Jul 2025 18:01:35 +0800 -Subject: [PATCH] TicketNo:DTS2025071014731 Description: enbale hebc - Team:OTHERS Feature or Bugfix:Bugfix Binary Source: NA PrivateCode(Yes/No):No - -Change-Id: I87aaa50c2a5d5ceca7b4e4abf91a7fdc79459b44 ---- - .../include/camera_device_ability_items.h | 14 ++++ - .../include/camera_metadata_item_info.h | 4 ++ - camera/metadata/src/camera_metadata_info.cpp | 2 + - camera/v1_5/BUILD.gn | 4 ++ - camera/v1_5/ICameraDevice.idl | 49 +++++++++++++ - camera/v1_5/ICameraHost.idl | 68 +++++++++++++++++++ - camera/v1_5/IStreamOperator.idl | 48 +++++++++++++ - camera/v1_5/Types.idl | 49 +++++++++++++ - 8 files changed, 238 insertions(+) - create mode 100644 camera/v1_5/ICameraDevice.idl - create mode 100644 camera/v1_5/ICameraHost.idl - create mode 100644 camera/v1_5/IStreamOperator.idl - create mode 100644 camera/v1_5/Types.idl - -diff --git a/camera/metadata/include/camera_device_ability_items.h b/camera/metadata/include/camera_device_ability_items.h -index 393f8cb7..3c8a0359 100644 ---- a/camera/metadata/include/camera_device_ability_items.h -+++ b/camera/metadata/include/camera_device_ability_items.h -@@ -1662,6 +1662,20 @@ typedef enum camera_device_metadata_tag { - * (i.e. uint8: 0-false/1-true ...) - */ - OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED, -+ /* -+ * ohos.ability.bandwidthCompressionAvailable [static, byte[], public] -+ * -+ * camera stream property, report camera support band width compression available -+ * (i.e. byte[] ...) -+ */ -+ OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE, -+ /** -+ * ohos.control.bandwidthCompressionAvailable [static, byte[], public] -+ * -+ * camera stream property, set camera support band width compression -+ * (i.e. byte[] ...) -+ */ -+ OHOS_CONTROL_BANDWIDTH_COMPRESSION, - /** - * ohos.ability.prerecord [static, int32[], public] - * -diff --git a/camera/metadata/include/camera_metadata_item_info.h b/camera/metadata/include/camera_metadata_item_info.h -index 15fc2c44..0e37cd34 100644 ---- a/camera/metadata/include/camera_metadata_item_info.h -+++ b/camera/metadata/include/camera_metadata_item_info.h -@@ -410,6 +410,10 @@ static item_info_t g_ohosStreamAbility[OHOS_STREAM_ABILITY_END - OHOS_STREAM_ABI - OHOS_STREAM_ABILITY_START] = {"offlineControlValue", META_TYPE_BYTE, -1}, - [OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED - - OHOS_STREAM_ABILITY_START] = {"rotationInIpsSupported", META_TYPE_BYTE, 1}, -+ [OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE - -+ OHOS_STREAM_ABILITY_START] = {"bandwidthCompressionAvailable", META_TYPE_BYTE, -1}, -+ [OHOS_CONTROL_BANDWIDTH_COMPRESSION - -+ OHOS_STREAM_ABILITY_START] = {"bandwidthCompressionControlValue", META_TYPE_BYTE, -1}, - }; - - static item_info_t g_ohosStreamControl[OHOS_STREAM_CONTROL_END - OHOS_STREAM_CONTROL_START] = { -diff --git a/camera/metadata/src/camera_metadata_info.cpp b/camera/metadata/src/camera_metadata_info.cpp -index cf770083..fc28d831 100644 ---- a/camera/metadata/src/camera_metadata_info.cpp -+++ b/camera/metadata/src/camera_metadata_info.cpp -@@ -258,6 +258,8 @@ const std::vector g_metadataTags = { - OHOS_ABILITY_CHANGETO_OFFLINE_STREAM_OPEATOR, - OHOS_CONTROL_CHANGETO_OFFLINE_STREAM_OPEATOR, - OHOS_ABILITY_ROTATION_IN_IPS_SUPPORTED, -+ OHOS_ABILITY_BANDWIDTH_COMPRESSION_AVAILABLE, -+ OHOS_CONTROL_BANDWIDTH_COMPRESSION, - - OHOS_JPEG_GPS_COORDINATES, - OHOS_JPEG_GPS_PROCESSING_METHOD, -diff --git a/camera/v1_5/BUILD.gn b/camera/v1_5/BUILD.gn -index d046f2a7..38aaa30f 100644 ---- a/camera/v1_5/BUILD.gn -+++ b/camera/v1_5/BUILD.gn -@@ -22,8 +22,12 @@ if (defined(ohos_lite)) { - module_name = "camera_service" - - sources = [ -+ "ICameraDevice.idl", -+ "ICameraHost.idl", -+ "IStreamOperator.idl", - "IVideoProcessService.idl", - "IVideoProcessSession.idl", -+ "Types.idl", - ] - - stub_deps = [ -diff --git a/camera/v1_5/ICameraDevice.idl b/camera/v1_5/ICameraDevice.idl -new file mode 100644 -index 00000000..a111fbc8 ---- /dev/null -+++ b/camera/v1_5/ICameraDevice.idl -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (c) 2025 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. -+ */ -+ -+/** -+ * @file icamera_device.h -+ * -+ * @brief Declares APIs for camera device operations. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ -+package ohos.hdi.camera.v1_5; -+ -+import ohos.hdi.camera.v1_4.IStreamOperatorCallback; -+import ohos.hdi.camera.v1_5.IStreamOperator; -+import ohos.hdi.camera.v1_4.ICameraDevice; -+ -+interface ICameraDevice extends ohos.hdi.camera.v1_4.ICameraDevice { -+ /** -+ * @brief Obtains the stream operation handle. -+ * -+ * @param callback Indicates a stream callback. For details, see {@link IStreamOperatorCallback}. -+ * {@link OnCaptureStarted} and {@link OnCaptureEnded} are used to report the start and end of capture, -+ * and {@link OnCaptureError} is used to report a capture error. -+ * -+ * @param streamOperator Indicates the stream operation handle. -+ * -+ * @return Returns NO_ERROR if the operation is successful; returns an error code defined -+ * in {@link CamRetCode} otherwise. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ GetStreamOperator_V1_5([in] IStreamOperatorCallback callbackObj, [out] IStreamOperator streamOperator); -+ -+} -\ No newline at end of file -diff --git a/camera/v1_5/ICameraHost.idl b/camera/v1_5/ICameraHost.idl -new file mode 100644 -index 00000000..fe566472 ---- /dev/null -+++ b/camera/v1_5/ICameraHost.idl -@@ -0,0 +1,68 @@ -+/* -+ * 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. -+ */ -+ -+/** -+ * @file icamera_host.h -+ * -+ * @brief Management class of the camera service that provides Hardware Driver Interfaces (HDIs) for the upper layer. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ -+package ohos.hdi.camera.v1_5; -+ -+import ohos.hdi.camera.v1_4.ICameraHost; -+import ohos.hdi.camera.v1_5.ICameraDevice; -+import ohos.hdi.camera.v1_0.ICameraDeviceCallback; -+import ohos.hdi.camera.v1_5.Types; -+ -+interface ICameraHost extends ohos.hdi.camera.v1_4.ICameraHost { -+ /** -+ * @brief Opens a camera device. -+ * -+ * By calling this function, you can obtain the ICameraDevice instance and operate the -+ * specific camera device mapping to the instance. -+ * -+ * @param cameraId Indicates the ID of the camera device, which can be obtained by calling {@link GetCameraIds}. -+ * @param callback Indicates the callback related to the camera. For details, see {@link ICameraDeviceCallback}. -+ * @param device Indicates the ICameraDevice instance corresponding to the ID of the camera device. -+ * -+ * @return Returns NO_ERROR if the operation is successful; returns an error code defined -+ * in {@link CamRetCode} otherwise. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ OpenCamera_V1_5([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device); -+ -+ /** -+ * @brief Opens a camera device in secure mode. -+ * -+ * By calling this function, you can obtain the ICameraDevice instance and operate the -+ * specific camera device mapping to the instance. -+ * -+ * @param cameraId Indicates the ID of the camera device, which can be obtained by calling {@link GetCameraIds}. -+ * @param callback Indicates the callback related to the camera. For details, see {@link ICameraDeviceCallback}. -+ * @param device Indicates the ICameraDevice instance corresponding to the ID of the camera device. -+ * -+ * @return Returns NO_ERROR if the operation is successful; returns an error code defined -+ * in {@link CamRetCode} otherwise. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ OpenSecureCamera_V1_5([in] String cameraId, [in] ICameraDeviceCallback callbackObj, [out] ICameraDevice device); -+} -\ No newline at end of file -diff --git a/camera/v1_5/IStreamOperator.idl b/camera/v1_5/IStreamOperator.idl -new file mode 100644 -index 00000000..7ee3d4db ---- /dev/null -+++ b/camera/v1_5/IStreamOperator.idl -@@ -0,0 +1,48 @@ -+/* -+ * Copyright (c) 2025 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. -+ */ -+ -+/** -+ * @file istream_operator.h -+ * -+ * @brief Declares APIs for stream operations. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ -+package ohos.hdi.camera.v1_5; -+ -+import ohos.hdi.camera.v1_4.IStreamOperator; -+import ohos.hdi.camera.v1_5.Types; -+ -+interface IStreamOperator extends ohos.hdi.camera.v1_4.IStreamOperator { -+ /** -+ * @brief Creates streams. -+ * -+ * Before calling this function, you must use {@link IsStreamsSupported} to check whether the hardware -+ * abstraction layer (HAL) supports the streams to create. -+ * -+ * @param streamInfos Indicates the list of stream information, which is defined by {@link StreamInfo}. -+ * The passed stream information may be changed. Therefore, you can run {@link GetStreamAttributes} to -+ * obtain the latest stream attributes after the stream is created. -+ * -+ * @return Returns NO_ERROR if the operation is successful; -+ * returns an error code defined in {@link CamRetCode} otherwise. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ CreateStreams_V1_5([in] struct StreamInfo_V1_5[] streamInfos); -+} -diff --git a/camera/v1_5/Types.idl b/camera/v1_5/Types.idl -new file mode 100644 -index 00000000..30217eeb ---- /dev/null -+++ b/camera/v1_5/Types.idl -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (c) 2025 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. -+ */ -+ -+/** -+ * @file Types.h -+ * -+ * @brief Declares data types -+ * used by the Hardware Driver Interfaces (HDIs) of this module. -+ * -+ * @since 6.0 -+ * @version 1.5 -+ */ -+ -+package ohos.hdi.camera.v1_5; -+ -+import ohos.hdi.camera.v1_1.Types; -+import ohos.hdi.camera.v1_0.Types; -+ -+/** -+ * @brief Defines the stream information, which is used to pass configuration parameters during stream creation. -+ */ -+struct StreamInfo_V1_5 { -+ /** -+ * The last version of stream info -+ */ -+ struct StreamInfo v1_0; -+ -+ /** -+ * Optional extended stream informations. -+ */ -+ struct ExtendedStreamInfo[] extendedStreamInfos; -+ -+ /** -+ * Indicates the configuration parameters. -+ */ -+ unsigned char[] settings; -+}; -\ No newline at end of file --- -2.45.2.huawei.10 - -- Gitee