diff --git a/interfaces/kits/native/ndk_test_example/BUILD.gn b/interfaces/kits/native/BUILD.gn similarity index 37% rename from interfaces/kits/native/ndk_test_example/BUILD.gn rename to interfaces/kits/native/BUILD.gn index c93f3572e58b1e9a35f344a5801cbb2377ead55d..ba315977fee8a48fe90e6c51d41375d91d937db9 100644 --- a/interfaces/kits/native/ndk_test_example/BUILD.gn +++ b/interfaces/kits/native/BUILD.gn @@ -12,39 +12,14 @@ # limitations under the License. import("//build/ohos.gni") +import("//build/ohos/ndk/ndk.gni") -config("image_ndk_test_jni_config") { - visibility = [ ":*" ] - include_dirs = [ - "//utils/native/base/include", - "//utils/jni/jnikit/include", - "//foundation/multimedia/image_standard/interfaces/innerkits/include", - "//foundation/multimedia/utils/include", - "//foundation/multimedia/image_standard/interfaces/kits/native/include", - "//foundation/multimedia/image_standard/frameworks/jni/common/include", - "//foundation/multimedia/image_standard/frameworks/jni/pixelmap/include", - ] +ohos_ndk_library("libpixelmap_ndk") { + output_name = "image_pixelmap" + ndk_description_file = "./libpixelmap.ndk.json" } -group("g_image_ndk_test_jni") { - deps = [ ":image_ndk_test_jni" ] -} - -ohos_shared_library("image_ndk_test_jni") { - sources = [ "ohos_image_PixelMapNdkTest.cpp" ] - - configs = [ ":image_ndk_test_jni_config" ] - - deps = [ - "//base/hiviewdfx/hilog/frameworks/native:libhilogutil", - "//foundation/multimedia/image_standard/interfaces/kits/native:multimedia_target", - - # "//utils/jni:utils_jnikit", - "//utils/native/base:utils", - ] - - # external_deps = [ "hilog:libhilog" ] - - subsystem_name = "multimedia" - part_name = "multimedia_image" +ohos_ndk_headers("pixelmap_header") { + dest_dir = "$ndk_headers_out_dir/multimedia/image" + sources = [ "./include/pixel_map_ndk.h" ] } diff --git a/interfaces/kits/native/BUILD.gn_old b/interfaces/kits/native/BUILD.gn_old deleted file mode 100644 index ee5a61c10634dfe2fe638308a2fabd0edc0ac703..0000000000000000000000000000000000000000 --- a/interfaces/kits/native/BUILD.gn_old +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (C) 2021 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/ohos.gni") - -SUBSYSTEM_DIR = "//foundation/multimedia/image_standard" - -ohos_ndk_library("libpixelmap") { - ndk_description_file = "./libimage_pixelmap.json" - min_compact_version = "1" - output_name = "image_pixelmap" -} - -ohos_ndk_headers("image_header") { - dest_dir = "$ndk_headers_out_dir/multimedia/image_standard" - sources = [ "./include/image_pixel_map.h" ] -} - -ohos_shared_library("libimage_pixelmap_ndk") { - sources = [ "src/image_pixel_map.cpp" ] - output_name = "image_pixelmap" - - include_dirs = [ - "include", - "//utils/native/base/include", - "//utils/jni/jnikit/include", - "//foundation/multimedia/image_standard/frameworks/innerkitsimpl/utils/include", - "$SUBSYSTEM_DIR/interfaces/innerkits/include", - "$SUBSYSTEM_DIR/frameworks/jni/pixelmap/include", - ] - - deps = [ -# "$SUBSYSTEM_DIR/frameworks/jni/pixelmap:pixelmap_jni", - "$SUBSYSTEM_DIR/interfaces/kits/native:libpixelmap", - "//utils/native/base:utils", - ] - - version_script = - get_label_info(":libpixelmap", "target_gen_dir") + "/" + - get_label_info(":libpixelmap", "name") + version_script_suffix - subsystem_name = "multimedia" - part_name = "multimedia_image" -} - -group("multimedia_target") { - deps = [ ":libimage_pixelmap_ndk" ] -} diff --git a/interfaces/kits/native/include/image_pixel_map.h b/interfaces/kits/native/include/image_pixel_map.h deleted file mode 100644 index 2b2b502779888bd4e5905404c638c71fdf102b33..0000000000000000000000000000000000000000 --- a/interfaces/kits/native/include/image_pixel_map.h +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Copyright (C) 2021 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 image - * @{ - * - * @brief Provides access to pixel data and pixel map information. - * - * @Syscap SystemCapability.Multimedia.Image - * @since 3 - * @version 1.0 - */ - -/** - * @file image_pixel_map.h - * - * @brief Declares functions for you to lock and access or unlock pixel data, and obtain the width and height of a pixel - * map. - * - * @since 3 - * @version 1.0 - */ - -#ifndef IMAGE_PIXEL_MAP_H -#define IMAGE_PIXEL_MAP_H -/* -#include -*/ -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief Enumerates the result codes that may be returned by a function. - * - * @since 3 - * @version 1.0 - */ -enum { - /** Success result */ - OHOS_IMAGE_RESULT_SUCCESS = 0, - /** Invalid parameters */ - OHOS_IMAGE_RESULT_BAD_PARAMETER = -1, - /** JNI exception */ - /* - OHOS_IMAGE_RESULT_JNI_EXCEPTION = -2, - */ -}; - -/** - * @brief Enumerates pixel formats. - * - * @since 3 - * @version 1.0 - */ -enum { - /** - * Unknown format - */ - OHOS_PIXEL_MAP_FORMAT_NONE = 0, - /** - * 32-bit RGBA. Components R, G, B, and A each occupies 8 bits - * and are stored from the higher-order to the lower-order bits. - */ - OHOS_PIXEL_MAP_FORMAT_RGBA_8888 = 3, - /** - * 16-bit RGB. Only the R, G, and B components are encoded - * from the higher-order to the lower-order bits: red is stored with 5 bits of precision, - * green is stored with 6 bits of precision, and blue is stored with 5 bits of precision. - */ - OHOS_PIXEL_MAP_FORMAT_RGB_565 = 2, -}; - -/** - * @brief Defines pixel map information. - * - * @since 3 - * @version 1.0 - */ -struct OhosPixelMapInfo { - /** Image width, in pixels. */ - uint32_t width; - /** Image height, in pixels. */ - uint32_t height; - /** Number of bytes in each row of a pixel map */ - uint32_t rowSize; - /** Pixel format */ - int32_t pixelFormat; -}; - -/** - * @brief Obtains information about a given PixelMap and stores the information in a {@link OhosPixelMapInfo} - * structure. - * - * @param env Indicates the pointer to the JNI environment. - * @param pixelMapObject Indicates the Java PixelMap object. - * @param info Indicates the pointer to the pixel map information to obtain. For details, see {@link - * OhosPixelMapInfo}. - * @return Returns 0 if the information is obtained and stored in the structure; returns result codes if the - * operation fails. - * @see OhosPixelMapInfo - * @since 3 - * @version 1.0 - */ -/** - * @brief Obtains the memory address of a given PixelMap object and locks the memory. - * - * If this function call is successful, *addrPtr is set to the memory address. After accessing the pixel data, - * you must use {@link UnAccessPixels} to unlock the memory. Otherwise, resources cannot be released. - * After the memory is unlocked, it can be invalid and should not be accessed. - * - * @param env Indicates the pointer to the JNI environment. - * @param pixelMapObject Indicates the Java PixelMap object. - * @param addrPtr Indicates the double pointer to the memory address. - * @see UnAccessPixels - * @return Returns {@link OHOS_IMAGE_RESULT_SUCCESS} if the operation is successful; returns other result codes if - * the operation fails. - * @since 3 - * @version 1.0 - */ -/** - * @brief Unlocks the memory storing the pixel data of a given PixelMap to balance a successful call to {@link - * AccessPixels}. - * - * @param env Indicates the pointer to the JNI environment. - * @param pixelMapObject Indicates the Java PixelMap object. - * @return Returns {@link OHOS_IMAGE_RESULT_SUCCESS} if the operation is successful; returns other result codes if - * the operation fails. - * @see AccessPixels - * @since 3 - * @version 1.0 - */ - -#ifdef __cplusplus -}; -#endif - -/** @} */ -#endif // IMAGE_PIXEL_MAP_H diff --git a/interfaces/kits/native/src/image_pixel_map.cpp b/interfaces/kits/native/include/pixel_map_ndk.h similarity index 34% rename from interfaces/kits/native/src/image_pixel_map.cpp rename to interfaces/kits/native/include/pixel_map_ndk.h index b9deb635982afc249d3744097b433cea6777d51c..2b9ddbd9776ed15f8dc08d45bdeea44d742d485d 100644 --- a/interfaces/kits/native/src/image_pixel_map.cpp +++ b/interfaces/kits/native/include/pixel_map_ndk.h @@ -13,45 +13,47 @@ * limitations under the License. */ -#include "image_pixel_map.h" -#include "ohos_image_pixelmap.h" +/** + * @file pixel_map_ndk.h + * + * @brief Declares functions for you to lock and access or unlock pixel data, + * and obtain the width and height of a pixel map. + * + * @since 8 + * @version 1.0 + */ -int32_t GetImageInfo(JNIEnv *env, jobject pixelMapObject, OhosPixelMapInfo &info) -{ - if (env == nullptr || pixelMapObject == nullptr) { - return OHOS_IMAGE_RESULT_BAD_PARAMETER; - } +#ifndef PIXEL_MAP_NDK_H +#define PIXEL_MAP_NDK_H - OHOS::Media::ohos_media_image_GetImageInfo(env, pixelMapObject, info); - return OHOS_IMAGE_RESULT_SUCCESS; -} +#include "napi/native_api.h" -int32_t AccessPixels(JNIEnv *env, jobject pixelMapObject, void **addrPtr) -{ - if (env == nullptr || pixelMapObject == nullptr) { - return OHOS_IMAGE_RESULT_BAD_PARAMETER; - } - - void *addr = OHOS::Media::ohos_media_image_AccessPixels(env, pixelMapObject); - if (!addr) { - return OHOS_IMAGE_RESULT_JNI_EXCEPTION; - } - - if (addrPtr) { - *addrPtr = addr; - } - return OHOS_IMAGE_RESULT_SUCCESS; -} +#ifdef __cplusplus +extern "C" { +#endif + +struct OhosPixelMapInfo { + /** Image width, in pixels. */ + uint32_t width; + + /** Image height, in pixels. */ + uint32_t height; -int32_t UnAccessPixels(JNIEnv *env, jobject pixelMapObject) -{ - if (env == nullptr || pixelMapObject == nullptr) { - return OHOS_IMAGE_RESULT_BAD_PARAMETER; - } - - bool unAccessed = OHOS::Media::ohos_media_image_UnAccessPixels(env, pixelMapObject); - if (!unAccessed) { - return OHOS_IMAGE_RESULT_JNI_EXCEPTION; - } - return OHOS_IMAGE_RESULT_SUCCESS; + /** Number of bytes in each row of a pixel map */ + uint32_t rowSize; + + /** Pixel format */ + int32_t pixelFormat; +}; + +int32_t OH_GetImageInfo(napi_env env, napi_value value, OhosPixelMapInfo *info); + +int32_t OH_AccessPixels(napi_env env, napi_value value, void** addrPtr); + +int32_t OH_UnAccessPixels(napi_env env, napi_value value); + +#ifdef __cplusplus } +#endif + +#endif // PIXEL_MAP_NDK_H diff --git a/interfaces/kits/native/libimage_pixelmap.json b/interfaces/kits/native/libimage_pixelmap.json deleted file mode 100644 index 9bc37d8d2ee0d593e219d623ff5bddbe4dc95591..0000000000000000000000000000000000000000 --- a/interfaces/kits/native/libimage_pixelmap.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { - "first_introduced": "1", - "name": "GetImageInfo" - }, - { - "name": "AccessPixels" - }, - { - "name": "UnAccessPixels" - } -] \ No newline at end of file diff --git a/interfaces/kits/native/libpixelmap.ndk.json b/interfaces/kits/native/libpixelmap.ndk.json new file mode 100644 index 0000000000000000000000000000000000000000..a654a260d4eefd83c053345baaa236996620b05c --- /dev/null +++ b/interfaces/kits/native/libpixelmap.ndk.json @@ -0,0 +1,11 @@ +[ + { + "name": "OH_GetImageInfo" + }, + { + "name": "OH_AccessPixels" + }, + { + "name": "OH_UnAccessPixels" + } +] \ No newline at end of file diff --git a/interfaces/kits/native/ndk_test_example/ohos_image_PixelMapNdkTest.cpp b/interfaces/kits/native/ndk_test_example/ohos_image_PixelMapNdkTest.cpp deleted file mode 100644 index 4d53e02cde543574853bf3864cd3a4a7ca0221f4..0000000000000000000000000000000000000000 --- a/interfaces/kits/native/ndk_test_example/ohos_image_PixelMapNdkTest.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#include "hilog/log.h" -#include "image_pixel_map.h" -#include "jkit_utils.h" -#include "log_tags.h" -#include "media_errors.h" - -using namespace OHOS::HiviewDFX; -using namespace OHOS::Media; - -static constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, LOG_TAG_DOMAIN_ID_IMAGE, "PixelMapNdkTest_JNI" }; -static constexpr int32_t PIXEL_OFFSET = 588 * 342 + 360; -static jclass g_imageNdkTestClass; - -static bool InitImageNdkTest(JNIEnv *env) -{ - jclass imageClazz = env->FindClass("ohos/media/image/PixelMapNdkTest"); - if (imageClazz == nullptr) { - HiLog::Error(LABEL, "find PixelMapNdkTest class fail"); - return false; - } - g_imageNdkTestClass = static_cast(env->NewGlobalRef(imageClazz)); - env->DeleteLocalRef(imageClazz); - return true; -} - -void ohos_media_image_PixelMapNdkTest_nativeInit(JNIEnv *env, jclass thiz) -{ - HiLog::Debug(LABEL, "nativeInit begin"); - if (!InitImageNdkTest(env)) { - HiLog::Error(LABEL, "nativeInit InitImageNdkTest failed"); - return; - } - HiLog::Debug(LABEL, "nativeInit end"); -} - -static jint ohos_media_image_PixelMapNdkTest_ValidPixelMapInfo(JNIEnv *env, jobject thiz, jobject jpixelMap, - jint width, jint height, jboolean is565) -{ - HiLog::Debug(LABEL, "input:width[%{public}u], height[%{public}u]", static_cast(width), - static_cast(height)); - OhosPixelMapInfo info; - int32_t err = GetImageInfo(env, jpixelMap, info); - HiLog::Debug(LABEL, "output:width[%{public}u], height[%{public}u], format[%{public}d], err[%{public}d]", info.width, - info.height, info.pixelFormat, err); - int32_t format = is565 ? OHOS_PIXEL_MAP_FORMAT_RGB_565 : OHOS_PIXEL_MAP_FORMAT_RGBA_8888; - if (err == OHOS_IMAGE_RESULT_SUCCESS && format == info.pixelFormat && - static_cast(width) == info.width && static_cast(height) == info.height) { - return OHOS_IMAGE_RESULT_SUCCESS; - } - return OHOS_IMAGE_RESULT_BAD_PARAMETER; -} - -static jint ohos_media_image_PixelMapNdkTest_AccessPixels(JNIEnv *env, jobject thiz, jobject jpixelMap) -{ - void *pixels = nullptr; - return AccessPixels(env, jpixelMap, &pixels); -} - -static jint ohos_media_image_PixelMapNdkTest_ReadPixelsValue(JNIEnv *env, jobject thiz, jobject jpixelMap) -{ - void *pixels = nullptr; - int32_t err = AccessPixels(env, jpixelMap, &pixels); - if (err != OHOS_IMAGE_RESULT_SUCCESS) { - return OHOS_IMAGE_RESULT_BAD_PARAMETER; - } - uint32_t *offset = static_cast(pixels) + PIXEL_OFFSET; - return *offset; -} - -static jint ohos_media_image_PixelMapNdkTest_UnAccessPixels(JNIEnv *env, jobject thiz, jobject jpixelMap) -{ - return UnAccessPixels(env, jpixelMap); -} - -static jint ohos_media_image_PixelMapNdkTest_GetPixelFormat(JNIEnv *env, jobject thiz, jobject jpixelMap) -{ - OhosPixelMapInfo info; - info.pixelFormat = OHOS_PIXEL_MAP_FORMAT_NONE; - int err = 0; - err = GetImageInfo(env, jpixelMap, info); - if (err != OHOS_IMAGE_RESULT_SUCCESS) { - return OHOS_PIXEL_MAP_FORMAT_NONE; - } - return info.pixelFormat; -} - -static const JNINativeMethod METHODS[] = { - { "nativeInit", "()V", reinterpret_cast(ohos_media_image_PixelMapNdkTest_nativeInit) }, - { "nativeValidatePixelMapInfo", "(Lohos/media/image/PixelMap;IIZ)I", - reinterpret_cast(ohos_media_image_PixelMapNdkTest_ValidPixelMapInfo) }, - { "nativeAccessPixels", "(Lohos/media/image/PixelMap;)I", - (void *)ohos_media_image_PixelMapNdkTest_AccessPixels }, - { "nativeReadPixelsValue", "(Lohos/media/image/PixelMap;)I", - (void *)ohos_media_image_PixelMapNdkTest_ReadPixelsValue }, - { "nativeUnAccessPixels", "(Lohos/media/image/PixelMap;)I", - (void *)ohos_media_image_PixelMapNdkTest_UnAccessPixels }, - { "nativeGetPixelFormat", "(Lohos/media/image/PixelMap;)I", - (void *)ohos_media_image_PixelMapNdkTest_GetPixelFormat }, -}; - -jint JNI_OnLoad(JavaVM *vm, void *reserved) -{ - JNIEnv *env = nullptr; - if (vm->GetEnv(reinterpret_cast(&env), JNI_VERSION_1_4) != JNI_OK) { - return ERROR; - } - int ret = JkitRegisterNativeMethods(env, "ohos/media/image/PixelMapNdkTest", METHODS, ARRCOUNT(METHODS)); - if (ret == JNI_ERR) { - return ERROR; - } - Jkit::nativeInit(vm); - return JNI_VERSION_1_4; -} \ No newline at end of file diff --git a/interfaces/kits/native/test/BUILD.gn b/interfaces/kits/native/test/BUILD.gn deleted file mode 100644 index 44d70663fb9ba9ba55b04f82009719715aa99b34..0000000000000000000000000000000000000000 --- a/interfaces/kits/native/test/BUILD.gn +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (C) 2021 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/test.gni") -module_output_path = "multimedia_image/image_standard" -ohos_unittest("pixlmapndktest") { - module_out_path = module_output_path - include_dirs = [ - "//foundation/multimedia/image_standard/interfaces/innerkits/include", - "//foundation/multimedia/utils/include", - "//third_party/googletest/googletest/include", - "//foundation/multimedia/image_standard/interfaces/kits/native/include", - "//utils/native/base/include", - ] - sources = [ "//foundation/multimedia/image_standard/interfaces/kits/native/test/unittest/pixel_map_ndk_test.cpp" ] - - deps = [ - "//foundation/multimedia/image_standard/interfaces/innerkits:image_native", - "//foundation/multimedia/image_standard/interfaces/kits/native:multimedia_target", - "//foundation/multimedia/image_standard/interfaces/kits/native/ndk_test_example:image_ndk_test_jni", - "//third_party/googletest:gtest_main", - "//utils/native/base:utils", - ] - - # external_deps = [ "hilog:libhilog" ] - resource_config_file = - "//foundation/multimedia/image_standard/test/resource/image/ohos_test.xml" -} - -################################################ -group("unittest") { - testonly = true - deps = [ ":pixlmapndktest" ] -} -################################################ diff --git a/interfaces/kits/native/test/unittest/pixel_map_ndk_test.cpp b/interfaces/kits/native/test/unittest/pixel_map_ndk_test.cpp deleted file mode 100644 index a8483346cefee7e423b87b5fd4f0515ab51953cf..0000000000000000000000000000000000000000 --- a/interfaces/kits/native/test/unittest/pixel_map_ndk_test.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2021 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. - */ - -#include -#include "image_pixel_map.h" -#include "pixel_map_manager.h" - -using namespace testing::ext; -using namespace OHOS::Media; -namespace OHOS { -namespace Multimedia { -class PixelMapNdkTest : public testing::Test { -public: - PixelMapNdkTest(){}; - ~PixelMapNdkTest(){}; -}; - -/** - * @tc.name: PixelMapNdkTest001 - * @tc.desc: override ndk interface,exception. - * @tc.type: FUNC - */ -HWTEST_F(PixelMapNdkTest, PixelMapNdkTest001, TestSize.Level3) -{ - /** - * @tc.steps: step1. test AccessPixels input Illegal pixelmap. - * @tc.expected: step1. expect ok. - */ - void *pixels = nullptr; - int err = AccessPixels(nullptr, nullptr, &pixels); - ASSERT_EQ(err, OHOS_IMAGE_RESULT_BAD_PARAMETER); - - /** - * @tc.steps: step2. test UnAccessPixels input Illegal pixelmap. - * @tc.expected: step2. expect ok. - */ - err = UnAccessPixels(nullptr, nullptr); - ASSERT_EQ(err, OHOS_IMAGE_RESULT_BAD_PARAMETER); - - /** - * @tc.steps: step2. test GetImageInfo input Illegal pixelmap. - * @tc.expected: step2. expect ok. - */ - OhosPixelMapInfo info; - err = GetImageInfo(nullptr, nullptr, info); - ASSERT_EQ(err, OHOS_IMAGE_RESULT_BAD_PARAMETER); -} -} // namespace Multimedia -} // namespace OHOS