From d020d8ee10d9a32bf4cbe1910572588a234ffded Mon Sep 17 00:00:00 2001 From: Inkmu Date: Thu, 1 Aug 2024 15:33:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20[Issues:=20#IAH666]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=80=80=E5=87=BA=E7=95=8C=E9=9D=A2=E5=BC=82=E5=B8=B8=E9=97=AA?= =?UTF-8?q?=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-profile.json5 | 15 --------- entry/oh-package-lock.json5 | 23 ++----------- entry/oh-package.json5 | 1 - entry/src/main/ets/pages/GeneralAnimation.ets | 2 +- entry/src/main/ets/pages/VAPXAnimation.ets | 2 +- oh-package-lock.json5 | 9 +++--- vap_module/src/main/cpp/audio_decoder.cpp | 2 +- vap_module/src/main/cpp/audio_player.cpp | 2 +- vap_module/src/main/cpp/decoder.cpp | 6 ++-- vap_module/src/main/cpp/demuxer.cpp | 2 +- .../src/main/cpp/include/audio_decoder.h | 2 +- .../src/main/cpp/include/audio_player.h | 2 +- vap_module/src/main/cpp/include/decoder.h | 2 +- vap_module/src/main/cpp/include/demuxer.h | 4 ++- .../src/main/cpp/include/mask/mask_config.h | 7 ++-- .../src/main/cpp/include/mask/mask_render.h | 2 +- .../src/main/cpp/include/mask/mask_shader.h | 2 +- vap_module/src/main/cpp/include/mix/frame.h | 2 +- .../src/main/cpp/include/mix/mix_render.h | 2 +- .../src/main/cpp/include/mix/mix_shader.h | 2 +- vap_module/src/main/cpp/include/mix/src.h | 2 +- vap_module/src/main/cpp/include/player.h | 2 +- .../src/main/cpp/include/plugin_manager.h | 2 +- .../src/main/cpp/include/render/anim_config.h | 2 +- .../src/main/cpp/include/render/egl_core.h | 2 +- .../main/cpp/include/render/plugin_render.h | 6 ++-- .../src/main/cpp/include/render/shader_util.h | 2 +- .../src/main/cpp/include/render/yuv_render.h | 2 +- .../src/main/cpp/include/resource_request.h | 2 +- vap_module/src/main/cpp/include/sample_info.h | 2 +- vap_module/src/main/cpp/include/util/log.h | 2 +- .../src/main/cpp/include/util/shader_util.h | 2 +- .../main/cpp/include/util/tex_coords_util.h | 2 +- .../main/cpp/include/util/texture_load_util.h | 2 +- .../src/main/cpp/include/util/vertex_util.h | 2 +- .../src/main/cpp/manager/plugin_manager.cpp | 4 +-- vap_module/src/main/cpp/mask/mask_config.cpp | 4 +-- vap_module/src/main/cpp/mask/mask_render.cpp | 2 +- vap_module/src/main/cpp/mask/mask_shader.cpp | 2 +- vap_module/src/main/cpp/mix/frame.cpp | 5 +-- vap_module/src/main/cpp/mix/mix_render.cpp | 32 ++----------------- vap_module/src/main/cpp/mix/mix_shader.cpp | 2 +- vap_module/src/main/cpp/mix/src.cpp | 2 +- vap_module/src/main/cpp/napi/n_func_arg.h | 2 +- vap_module/src/main/cpp/napi/n_val.cpp | 2 +- vap_module/src/main/cpp/napi/n_val.h | 2 +- vap_module/src/main/cpp/napi_init.cpp | 2 +- vap_module/src/main/cpp/player.cpp | 7 ++-- .../src/main/cpp/render/anim_config.cpp | 8 ++--- vap_module/src/main/cpp/render/egl_core.cpp | 2 +- .../src/main/cpp/render/plugin_render.cpp | 17 ++++++---- vap_module/src/main/cpp/render/yuv_render.cpp | 2 +- vap_module/src/main/cpp/resource_request.cpp | 2 +- vap_module/src/main/cpp/util/shader_util.cpp | 2 +- .../src/main/cpp/util/tex_coords_util.cpp | 2 +- .../src/main/cpp/util/texture_load_util.cpp | 10 +++--- vap_module/src/main/cpp/util/vertex_util.cpp | 2 +- ...2\344\276\213\344\273\243\347\240\201.ets" | 2 +- 58 files changed, 96 insertions(+), 146 deletions(-) diff --git a/build-profile.json5 b/build-profile.json5 index 03f4960..1815ec9 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -13,21 +13,6 @@ "name": "release" } ], - "signingConfigs": [ - { - "name": "default", - "type": "HarmonyOS", - "material": { - "certpath": "C:\\Users\\lwx1314738\\.ohos\\config\\default_vap-product_lQC1CIxmHOg3mX9iRHAcw8DejHnM7Ow7Njnr0sPk5rs=.cer", - "storePassword": "0000001A1C5E5436E65C23FEE35FFBE3B6CD91AB8AAAD712F1287B1621D0B1B1F1201B5491891FA8D969", - "keyAlias": "debugKey", - "keyPassword": "0000001A8F7AC46C9DED174F4D7B971A927EAB6CBBCA6C4E320FB7DEB5D026D4C303209ABF7B81E15CEB", - "profile": "C:\\Users\\lwx1314738\\.ohos\\config\\default_vap-product_lQC1CIxmHOg3mX9iRHAcw8DejHnM7Ow7Njnr0sPk5rs=.p7b", - "signAlg": "SHA256withECDSA", - "storeFile": "C:\\Users\\lwx1314738\\.ohos\\config\\default_vap-product_lQC1CIxmHOg3mX9iRHAcw8DejHnM7Ow7Njnr0sPk5rs=.p12" - } - } - ] }, "modules": [ { diff --git a/entry/oh-package-lock.json5 b/entry/oh-package-lock.json5 index 7a4afc7..b79e40b 100644 --- a/entry/oh-package-lock.json5 +++ b/entry/oh-package-lock.json5 @@ -4,25 +4,6 @@ }, "lockfileVersion": 3, "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", - "specifiers": { - "libvap.so@../oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap": "libvap.so@../oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap", - "vap_module@../vap_module": "vap_module@../vap_module/build/default/outputs/default/vap_module.har" - }, - "packages": { - "libvap.so@../oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap": { - "name": "libvap.so", - "version": "1", - "resolved": "../oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap", - "registryType": "local" - }, - "vap_module@../vap_module/build/default/outputs/default/vap_module.har": { - "name": "vap_module", - "version": "1.0.0", - "resolved": "../vap_module/build/default/outputs/default/vap_module.har", - "registryType": "local", - "dependencies": { - "libvap.so": "file:./src/main/cpp/types/libvap" - } - } - } + "specifiers": {}, + "packages": {} } \ No newline at end of file diff --git a/entry/oh-package.json5 b/entry/oh-package.json5 index ffa9ce2..4ba6afd 100644 --- a/entry/oh-package.json5 +++ b/entry/oh-package.json5 @@ -8,6 +8,5 @@ "main": "", "version": "1.0.0", "dependencies": { - "vap_module": "file:../vap_module" } } diff --git a/entry/src/main/ets/pages/GeneralAnimation.ets b/entry/src/main/ets/pages/GeneralAnimation.ets index 32a3be4..2b053f2 100644 --- a/entry/src/main/ets/pages/GeneralAnimation.ets +++ b/entry/src/main/ets/pages/GeneralAnimation.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/entry/src/main/ets/pages/VAPXAnimation.ets b/entry/src/main/ets/pages/VAPXAnimation.ets index 141a482..129c945 100644 --- a/entry/src/main/ets/pages/VAPXAnimation.ets +++ b/entry/src/main/ets/pages/VAPXAnimation.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/oh-package-lock.json5 b/oh-package-lock.json5 index a984c1d..c459bc9 100644 --- a/oh-package-lock.json5 +++ b/oh-package-lock.json5 @@ -7,7 +7,7 @@ "specifiers": { "@ohos/hamock@1.0.1-rc2": "@ohos/hamock@1.0.1-rc2", "@ohos/hypium@1.0.18": "@ohos/hypium@1.0.18", - "libvap.so@oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap": "libvap.so@oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap", + "libvap.so@oh_modules/.ohpm/vap_module@qblwjgjke8t+co7rbc2rja10zwq=/oh_modules/vap_module/src/main/cpp/types/libvap": "libvap.so@oh_modules/.ohpm/vap_module@qblwjgjke8t+co7rbc2rja10zwq=/oh_modules/vap_module/src/main/cpp/types/libvap", "vap_module@vap_module/build/default/outputs/default/vap_module.har": "vap_module@vap_module/build/default/outputs/default/vap_module.har" }, "packages": { @@ -27,10 +27,10 @@ "shasum": "cdbaf30436c45461a0c527da1aab0e916c7e1195", "registryType": "npm" }, - "libvap.so@oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap": { + "libvap.so@oh_modules/.ohpm/vap_module@qblwjgjke8t+co7rbc2rja10zwq=/oh_modules/vap_module/src/main/cpp/types/libvap": { "name": "libvap.so", "version": "1", - "resolved": "oh_modules/.ohpm/vap_module@kqcvp2lepzmnuthykcfhrcqbqvy=/oh_modules/vap_module/src/main/cpp/types/libvap", + "resolved": "oh_modules/.ohpm/vap_module@qblwjgjke8t+co7rbc2rja10zwq=/oh_modules/vap_module/src/main/cpp/types/libvap", "registryType": "local" }, "vap_module@vap_module/build/default/outputs/default/vap_module.har": { @@ -40,7 +40,8 @@ "registryType": "local", "dependencies": { "libvap.so": "file:./src/main/cpp/types/libvap" - } + }, + "maskedByOverrideDependencyMap": true } } } \ No newline at end of file diff --git a/vap_module/src/main/cpp/audio_decoder.cpp b/vap_module/src/main/cpp/audio_decoder.cpp index 8ca73ce..3ef9ece 100644 --- a/vap_module/src/main/cpp/audio_decoder.cpp +++ b/vap_module/src/main/cpp/audio_decoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/audio_player.cpp b/vap_module/src/main/cpp/audio_player.cpp index 19819ae..0e17031 100644 --- a/vap_module/src/main/cpp/audio_player.cpp +++ b/vap_module/src/main/cpp/audio_player.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/decoder.cpp b/vap_module/src/main/cpp/decoder.cpp index 6cc23b4..7b480c9 100644 --- a/vap_module/src/main/cpp/decoder.cpp +++ b/vap_module/src/main/cpp/decoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -13,9 +13,11 @@ * limitations under the License. */ +#include "decoder.h" + #include #include -#include "decoder.h" + #include "log.h" #undef LOG_TAG diff --git a/vap_module/src/main/cpp/demuxer.cpp b/vap_module/src/main/cpp/demuxer.cpp index ff34eef..8e6b2b0 100644 --- a/vap_module/src/main/cpp/demuxer.cpp +++ b/vap_module/src/main/cpp/demuxer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/audio_decoder.h b/vap_module/src/main/cpp/include/audio_decoder.h index 739aead..fb07804 100644 --- a/vap_module/src/main/cpp/include/audio_decoder.h +++ b/vap_module/src/main/cpp/include/audio_decoder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/audio_player.h b/vap_module/src/main/cpp/include/audio_player.h index 1417fad..7dd8993 100644 --- a/vap_module/src/main/cpp/include/audio_player.h +++ b/vap_module/src/main/cpp/include/audio_player.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/decoder.h b/vap_module/src/main/cpp/include/decoder.h index bde0cf9..72f3f4f 100644 --- a/vap_module/src/main/cpp/include/decoder.h +++ b/vap_module/src/main/cpp/include/decoder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/demuxer.h b/vap_module/src/main/cpp/include/demuxer.h index e41d49d..c2e09ee 100644 --- a/vap_module/src/main/cpp/include/demuxer.h +++ b/vap_module/src/main/cpp/include/demuxer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -20,6 +20,8 @@ #include "multimedia/player_framework/native_avdemuxer.h" #include "sample_info.h" +static constexpr int32_t ONE_K = 1024; + class Demuxer { public: ~Demuxer(); diff --git a/vap_module/src/main/cpp/include/mask/mask_config.h b/vap_module/src/main/cpp/include/mask/mask_config.h index 54c177a..4e3d1d6 100644 --- a/vap_module/src/main/cpp/include/mask/mask_config.h +++ b/vap_module/src/main/cpp/include/mask/mask_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -16,11 +16,12 @@ #ifndef VAP_MASK_CONFIG_H #define VAP_MASK_CONFIG_H -#include "texture_load_util.h" -#include "vertex_util.h" #include #include +#include "texture_load_util.h" +#include "vertex_util.h" + class MaskConfig { public: MaskConfig(int32_t width, int32_t height); diff --git a/vap_module/src/main/cpp/include/mask/mask_render.h b/vap_module/src/main/cpp/include/mask/mask_render.h index df5b30c..b4790d7 100644 --- a/vap_module/src/main/cpp/include/mask/mask_render.h +++ b/vap_module/src/main/cpp/include/mask/mask_render.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/mask/mask_shader.h b/vap_module/src/main/cpp/include/mask/mask_shader.h index ae66823..a4d334e 100644 --- a/vap_module/src/main/cpp/include/mask/mask_shader.h +++ b/vap_module/src/main/cpp/include/mask/mask_shader.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/mix/frame.h b/vap_module/src/main/cpp/include/mix/frame.h index efe28cb..493b3d7 100644 --- a/vap_module/src/main/cpp/include/mix/frame.h +++ b/vap_module/src/main/cpp/include/mix/frame.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/mix/mix_render.h b/vap_module/src/main/cpp/include/mix/mix_render.h index bdb916f..6d34961 100644 --- a/vap_module/src/main/cpp/include/mix/mix_render.h +++ b/vap_module/src/main/cpp/include/mix/mix_render.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/mix/mix_shader.h b/vap_module/src/main/cpp/include/mix/mix_shader.h index 5594008..d6fd8ae 100644 --- a/vap_module/src/main/cpp/include/mix/mix_shader.h +++ b/vap_module/src/main/cpp/include/mix/mix_shader.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/mix/src.h b/vap_module/src/main/cpp/include/mix/src.h index df8a96f..9beb428 100644 --- a/vap_module/src/main/cpp/include/mix/src.h +++ b/vap_module/src/main/cpp/include/mix/src.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/player.h b/vap_module/src/main/cpp/include/player.h index d7e08f3..8f1f9ac 100644 --- a/vap_module/src/main/cpp/include/player.h +++ b/vap_module/src/main/cpp/include/player.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/plugin_manager.h b/vap_module/src/main/cpp/include/plugin_manager.h index 24a7ee3..d98a60d 100644 --- a/vap_module/src/main/cpp/include/plugin_manager.h +++ b/vap_module/src/main/cpp/include/plugin_manager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/render/anim_config.h b/vap_module/src/main/cpp/include/render/anim_config.h index 10854fc..7c7cc97 100644 --- a/vap_module/src/main/cpp/include/render/anim_config.h +++ b/vap_module/src/main/cpp/include/render/anim_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/render/egl_core.h b/vap_module/src/main/cpp/include/render/egl_core.h index 230e744..8b8a663 100644 --- a/vap_module/src/main/cpp/include/render/egl_core.h +++ b/vap_module/src/main/cpp/include/render/egl_core.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/render/plugin_render.h b/vap_module/src/main/cpp/include/render/plugin_render.h index a641e08..4506a42 100644 --- a/vap_module/src/main/cpp/include/render/plugin_render.h +++ b/vap_module/src/main/cpp/include/render/plugin_render.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -50,8 +50,8 @@ public: static OH_NativeXComponent_Callback m_callback; static std::unordered_map m_jsCallback; // id+type - void ParseCallback(void *&playDoneCallbackData, napi_env env, - napi_value val, std::string id, std::string type); + void ParseCallback(void *&playDoneCallbackData, napi_env env, + napi_value val, std::string id, std::string type); void PutRef(std::string key, napi_ref ref) // type { diff --git a/vap_module/src/main/cpp/include/render/shader_util.h b/vap_module/src/main/cpp/include/render/shader_util.h index 36265bd..b5ef815 100644 --- a/vap_module/src/main/cpp/include/render/shader_util.h +++ b/vap_module/src/main/cpp/include/render/shader_util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/render/yuv_render.h b/vap_module/src/main/cpp/include/render/yuv_render.h index b93ba3c..fde10b4 100644 --- a/vap_module/src/main/cpp/include/render/yuv_render.h +++ b/vap_module/src/main/cpp/include/render/yuv_render.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/resource_request.h b/vap_module/src/main/cpp/include/resource_request.h index 19ac6bc..25a5548 100644 --- a/vap_module/src/main/cpp/include/resource_request.h +++ b/vap_module/src/main/cpp/include/resource_request.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/sample_info.h b/vap_module/src/main/cpp/include/sample_info.h index 65fe017..7c26528 100644 --- a/vap_module/src/main/cpp/include/sample_info.h +++ b/vap_module/src/main/cpp/include/sample_info.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/util/log.h b/vap_module/src/main/cpp/include/util/log.h index 1bf258a..96e775b 100644 --- a/vap_module/src/main/cpp/include/util/log.h +++ b/vap_module/src/main/cpp/include/util/log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/util/shader_util.h b/vap_module/src/main/cpp/include/util/shader_util.h index a3337eb..c1df15f 100644 --- a/vap_module/src/main/cpp/include/util/shader_util.h +++ b/vap_module/src/main/cpp/include/util/shader_util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/util/tex_coords_util.h b/vap_module/src/main/cpp/include/util/tex_coords_util.h index 9bc9c90..d9134b7 100644 --- a/vap_module/src/main/cpp/include/util/tex_coords_util.h +++ b/vap_module/src/main/cpp/include/util/tex_coords_util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/util/texture_load_util.h b/vap_module/src/main/cpp/include/util/texture_load_util.h index 8fc76cd..1f4e0d6 100644 --- a/vap_module/src/main/cpp/include/util/texture_load_util.h +++ b/vap_module/src/main/cpp/include/util/texture_load_util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/include/util/vertex_util.h b/vap_module/src/main/cpp/include/util/vertex_util.h index 8213407..484126e 100644 --- a/vap_module/src/main/cpp/include/util/vertex_util.h +++ b/vap_module/src/main/cpp/include/util/vertex_util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/manager/plugin_manager.cpp b/vap_module/src/main/cpp/manager/plugin_manager.cpp index e51d413..2a2fbf3 100644 --- a/vap_module/src/main/cpp/manager/plugin_manager.cpp +++ b/vap_module/src/main/cpp/manager/plugin_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -43,7 +43,7 @@ PluginManager::~PluginManager() for (auto iter = m_pluginRenderMap.begin(); iter != m_pluginRenderMap.end(); ++iter) { if (nullptr != iter->second) { - // delete iter->second; + delete iter->second; iter->second = nullptr; } } diff --git a/vap_module/src/main/cpp/mask/mask_config.cpp b/vap_module/src/main/cpp/mask/mask_config.cpp index 5c3c877..e98c171 100644 --- a/vap_module/src/main/cpp/mask/mask_config.cpp +++ b/vap_module/src/main/cpp/mask/mask_config.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -23,7 +23,7 @@ MaskConfig::MaskConfig(int32_t width, int32_t height) MaskConfig::~MaskConfig() { - if(maskTexId_) { + if (maskTexId_) { glDeleteTextures(1, &maskTexId_); } } diff --git a/vap_module/src/main/cpp/mask/mask_render.cpp b/vap_module/src/main/cpp/mask/mask_render.cpp index 8a99d54..73038f0 100644 --- a/vap_module/src/main/cpp/mask/mask_render.cpp +++ b/vap_module/src/main/cpp/mask/mask_render.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/mask/mask_shader.cpp b/vap_module/src/main/cpp/mask/mask_shader.cpp index 7b886cd..1beaa04 100644 --- a/vap_module/src/main/cpp/mask/mask_shader.cpp +++ b/vap_module/src/main/cpp/mask/mask_shader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/mix/frame.cpp b/vap_module/src/main/cpp/mix/frame.cpp index 07b78dd..94f0067 100644 --- a/vap_module/src/main/cpp/mix/frame.cpp +++ b/vap_module/src/main/cpp/mix/frame.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -14,8 +14,9 @@ */ #include "frame.h" -#include "log.h" + #include +#include "log.h" Frame::Frame(json jsonFrame) { diff --git a/vap_module/src/main/cpp/mix/mix_render.cpp b/vap_module/src/main/cpp/mix/mix_render.cpp index 74a8435..fd99fc1 100644 --- a/vap_module/src/main/cpp/mix/mix_render.cpp +++ b/vap_module/src/main/cpp/mix/mix_render.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -91,7 +91,6 @@ void MixRender::Init() } } - GLuint textureId; bitmap.imgWidth = src.w; bitmap.imgHeight = src.h; @@ -148,17 +147,10 @@ void MixRender::RenderFrame(MixConfigSize config, Frame frame, Src src) m_srcArray.SetArray(m_srcArray.array.get()); m_srcArray.EnableVertexAttrib(m_shader->m_aTextureSrcCoordinatesLocation); - // 绑定 src纹理 glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, src.srcTextureId); glUniform1i(m_shader->m_uTextureSrcUnitLocation, 0); - GLenum error = glGetError(); - if (error != GL_NO_ERROR) { - LOGE("glGetError bind src texture error: %{public}x", error); - } - - // mask 纹理 TexCoordsUtil::Create(config.videoWidth, config.videoHeight, frame.mFrame, m_maskArray.array.get()); m_maskArray.SetArray(m_maskArray.array.get()); if (frame.mt == 90) { @@ -166,24 +158,12 @@ void MixRender::RenderFrame(MixConfigSize config, Frame frame, Src src) m_maskArray.SetArray(m_maskArray.array.get()); } m_maskArray.EnableVertexAttrib(m_shader->m_aTextureMaskCoordinatesLocation); - - error = glGetError(); - if (error != GL_NO_ERROR) { - LOGE("glGetError before bind mask texture error: %{public}x", error); - } - // 绑定 mask纹理 glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, videoTextureId); glUniform1i(m_shader->m_uTextureMaskUnitLocation, 1); - error = glGetError(); - if (error != GL_NO_ERROR) { - LOGE("glGetError bind mask texture error: %{public}x", error); - } - - // 属性处理 - if (src.srcType == SrcType::TXT) { // // 文字需要颜色填充 + if (src.srcType == SrcType::TXT) { glUniform1i(m_shader->m_uIsFillLocation, 1); std::vector argb; transColor(src.color, argb); @@ -194,16 +174,8 @@ void MixRender::RenderFrame(MixConfigSize config, Frame frame, Src src) } glEnable(GL_BLEND); - // 基于源象素alpha通道值的半透明混合函数 glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - // draw glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - error = glGetError(); - if (error != GL_NO_ERROR) { - LOGE("glGetError draw error: %{public}x", error); - } - glDisable(GL_BLEND); } diff --git a/vap_module/src/main/cpp/mix/mix_shader.cpp b/vap_module/src/main/cpp/mix/mix_shader.cpp index 1e32610..f69fecd 100644 --- a/vap_module/src/main/cpp/mix/mix_shader.cpp +++ b/vap_module/src/main/cpp/mix/mix_shader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/mix/src.cpp b/vap_module/src/main/cpp/mix/src.cpp index 33b1830..751475d 100644 --- a/vap_module/src/main/cpp/mix/src.cpp +++ b/vap_module/src/main/cpp/mix/src.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/napi/n_func_arg.h b/vap_module/src/main/cpp/napi/n_func_arg.h index 04b3d2f..b230a10 100644 --- a/vap_module/src/main/cpp/napi/n_func_arg.h +++ b/vap_module/src/main/cpp/napi/n_func_arg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/napi/n_val.cpp b/vap_module/src/main/cpp/napi/n_val.cpp index db531c4..5fae009 100644 --- a/vap_module/src/main/cpp/napi/n_val.cpp +++ b/vap_module/src/main/cpp/napi/n_val.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/napi/n_val.h b/vap_module/src/main/cpp/napi/n_val.h index 772afc4..68d30c4 100644 --- a/vap_module/src/main/cpp/napi/n_val.h +++ b/vap_module/src/main/cpp/napi/n_val.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/napi_init.cpp b/vap_module/src/main/cpp/napi_init.cpp index 90b6c67..e2009b7 100644 --- a/vap_module/src/main/cpp/napi_init.cpp +++ b/vap_module/src/main/cpp/napi_init.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/player.cpp b/vap_module/src/main/cpp/player.cpp index f6d0c72..3dea562 100644 --- a/vap_module/src/main/cpp/player.cpp +++ b/vap_module/src/main/cpp/player.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -35,7 +35,7 @@ using namespace std::chrono_literals; Player::~Player() { - Player::StartRelease(); +// Player::StartRelease(); } int32_t OpenFile(SampleInfo &sampleInfo) @@ -221,10 +221,9 @@ void Player::StartRelease() { LOGI("StartRelease %{public}d %{public}d", isVideoEnd_.load(), isAudioEnd_.load()); - if (isReleased_) return; - // 获取锁 std::unique_lock lock(mutex_); + if (isReleased_) return; if (!isVideoEnd_ || !isAudioEnd_) return; diff --git a/vap_module/src/main/cpp/render/anim_config.cpp b/vap_module/src/main/cpp/render/anim_config.cpp index 41fbbb2..3241ed1 100644 --- a/vap_module/src/main/cpp/render/anim_config.cpp +++ b/vap_module/src/main/cpp/render/anim_config.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -19,7 +19,7 @@ AnimConfig::~AnimConfig() { - if(srcMapPtr) { + if (srcMapPtr) { srcMapPtr->srcSMap.clear(); } if (frameAllPtr) { @@ -70,7 +70,7 @@ int AnimConfig::GetJson(std::string &jsonStr, std::string uri) bool AnimConfig::ParseJson(std::string uri) { LOGI("Enter ParseJson"); - if(isInit) { + if (isInit) { LOGI("Json data has been initialized"); return true; } @@ -125,7 +125,7 @@ bool AnimConfig::ParseJson(std::string uri) void AnimConfig::GetSrc(std::map &src) { - if(!srcMapPtr) { + if (!srcMapPtr) { LOGW("this file not have src prop"); } else { src = srcMapPtr->srcSMap; diff --git a/vap_module/src/main/cpp/render/egl_core.cpp b/vap_module/src/main/cpp/render/egl_core.cpp index 9e9550f..fdf58af 100644 --- a/vap_module/src/main/cpp/render/egl_core.cpp +++ b/vap_module/src/main/cpp/render/egl_core.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/render/plugin_render.cpp b/vap_module/src/main/cpp/render/plugin_render.cpp index ada994c..956539c 100644 --- a/vap_module/src/main/cpp/render/plugin_render.cpp +++ b/vap_module/src/main/cpp/render/plugin_render.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -387,12 +387,17 @@ void Callback(void *asyncContext) } uv_loop_s *loop = nullptr; CallbackContext *context = (CallbackContext *)asyncContext; - napi_get_uv_event_loop(context->env, &loop); + napi_status status = napi_get_uv_event_loop(context->env, &loop); + if (status != napi_ok) { + LOGE("Callback con not napi_get_uv_event_loop %{public}d", status); + return; + } uv_work_t *work = new uv_work_t; work->data = context; uv_queue_work( loop, work, [](uv_work_t *work) { LOGI("enter uv_work_t Callback"); }, - [](uv_work_t *work, int status) { + [](uv_work_t *work, int status) + { LOGI("enter complete Callback"); CallbackContext *context = (CallbackContext *)work->data; napi_handle_scope scope = nullptr; @@ -616,7 +621,7 @@ void PluginRender::Release(std::string &id) PluginRender *render = PluginRender::GetInstance(id); if (nullptr != render) { if (!render->refMap_.empty()) { - for (auto it = render->refMap_.begin(); it != render->refMap_.end(); ) { + for (auto it = render->refMap_.begin(); it != render->refMap_.end();) { napi_delete_reference(render->env_, it->second); it = render->refMap_.erase(it); } @@ -628,8 +633,8 @@ void PluginRender::Release(std::string &id) m_jsCallback.erase(m_jsCallback.find(key)); } } - delete render; - render = nullptr; +// delete render; +// render = nullptr; m_instance.erase(m_instance.find(id)); } } \ No newline at end of file diff --git a/vap_module/src/main/cpp/render/yuv_render.cpp b/vap_module/src/main/cpp/render/yuv_render.cpp index e233e4f..c1277c7 100644 --- a/vap_module/src/main/cpp/render/yuv_render.cpp +++ b/vap_module/src/main/cpp/render/yuv_render.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/resource_request.cpp b/vap_module/src/main/cpp/resource_request.cpp index 9f208c5..dddf493 100644 --- a/vap_module/src/main/cpp/resource_request.cpp +++ b/vap_module/src/main/cpp/resource_request.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/util/shader_util.cpp b/vap_module/src/main/cpp/util/shader_util.cpp index b822e56..5a652c7 100644 --- a/vap_module/src/main/cpp/util/shader_util.cpp +++ b/vap_module/src/main/cpp/util/shader_util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/util/tex_coords_util.cpp b/vap_module/src/main/cpp/util/tex_coords_util.cpp index ea652e7..3fd1aa6 100644 --- a/vap_module/src/main/cpp/util/tex_coords_util.cpp +++ b/vap_module/src/main/cpp/util/tex_coords_util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git a/vap_module/src/main/cpp/util/texture_load_util.cpp b/vap_module/src/main/cpp/util/texture_load_util.cpp index 95a3ec8..fc5aaef 100644 --- a/vap_module/src/main/cpp/util/texture_load_util.cpp +++ b/vap_module/src/main/cpp/util/texture_load_util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 @@ -14,12 +14,13 @@ */ #include "texture_load_util.h" -#include "log.h" + #include +#include "log.h" void TextureLoadUtil::loadTexture(BitMap bitmap, GLuint *textureId) { - if(!textureId) { + if (!textureId) { LOGE("textureId nullptr"); return; } @@ -39,7 +40,8 @@ void TextureLoadUtil::loadTexture(BitMap bitmap, GLuint *textureId) glBindTexture(GL_TEXTURE_2D, textures[0]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap.imgWidth, bitmap.imgHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, bitmap.pixelsData.data()); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap.imgWidth, bitmap.imgHeight, 0, GL_RGBA, + GL_UNSIGNED_BYTE, bitmap.pixelsData.data()); glGenerateMipmap(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); diff --git a/vap_module/src/main/cpp/util/vertex_util.cpp b/vap_module/src/main/cpp/util/vertex_util.cpp index 0ed205b..88aadc2 100644 --- a/vap_module/src/main/cpp/util/vertex_util.cpp +++ b/vap_module/src/main/cpp/util/vertex_util.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 diff --git "a/\347\244\272\344\276\213\344\273\243\347\240\201.ets" "b/\347\244\272\344\276\213\344\273\243\347\240\201.ets" index 41390b3..ca78f73 100644 --- "a/\347\244\272\344\276\213\344\273\243\347\240\201.ets" +++ "b/\347\244\272\344\276\213\344\273\243\347\240\201.ets" @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved. * 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 -- Gitee