diff --git a/interface/inner_api/common/media_source.h b/interface/inner_api/common/media_source.h index 14b249874ed11164bd1482387e7fe055549e58d1..7ecc4c9f47bb41b2dd1ddaed25cb5fe53ef01c25 100644 --- a/interface/inner_api/common/media_source.h +++ b/interface/inner_api/common/media_source.h @@ -25,7 +25,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /// End of Stream Buffer Flag #define BUFFER_FLAG_EOS 0x00000001 /// Video Key Frame Flag @@ -80,7 +80,7 @@ private: std::shared_ptr dataSrc_ {}; #endif }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif \ No newline at end of file diff --git a/interface/inner_api/meta/audio_types.h b/interface/inner_api/meta/audio_types.h index e041a6342cf41e7131507500536043095c5f00eb..33e8b9dd0570e58ed763ce16a96c7b2955d63338 100644 --- a/interface/inner_api/meta/audio_types.h +++ b/interface/inner_api/meta/audio_types.h @@ -20,9 +20,9 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** - * @enum Audio AAC Profile。 + * @enum Audio AAC Profile * * AAC mode type. Note that the term profile is used with the MPEG-2 * standard and the term object type and profile is used with MPEG-4 @@ -241,7 +241,7 @@ enum AACProfile : int32_t { AAC_PROFILE_LD = 5, AAC_PROFILE_MAIN = 6, }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // MEDIA_FOUNDATION_AUDIO_TYPES_H diff --git a/interface/inner_api/meta/media_types.h b/interface/inner_api/meta/media_types.h index 6587594b1a5f756751dec0f151fc38a5bb147139..5349b9ab442325173d17c7380d5530c491e46fdb 100644 --- a/interface/inner_api/meta/media_types.h +++ b/interface/inner_api/meta/media_types.h @@ -21,7 +21,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @enum Media Track Type * @@ -220,7 +220,7 @@ private: * The tag content is stored in key-value format. */ using CodecConfig = std::vector; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // MEDIA_FOUNDATION_MEDIA_TYPES_H \ No newline at end of file diff --git a/interface/inner_api/meta/meta.h b/interface/inner_api/meta/meta.h index 50622987895205e3b449ffbe4a9097607f730311..89b09b0ca3787ace1826105f52a08d2bcfb87996 100644 --- a/interface/inner_api/meta/meta.h +++ b/interface/inner_api/meta/meta.h @@ -100,7 +100,7 @@ public: DECLARE_INFO_CLASS - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::SRC_INPUT_TYPE, Plugin::SrcInputType, ValueType::INT32_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::SRC_INPUT_TYPE, Plugins::SrcInputType, ValueType::INT32_T); DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::MEDIA_CODEC_CONFIG or tagCharSeq == Tag::MEDIA_COVER or tagCharSeq == Tag::AUDIO_VIVID_METADATA or @@ -109,29 +109,29 @@ public: std::vector, ValueType::VECTOR_UINT8); DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::AUDIO_CHANNEL_LAYOUT or tagCharSeq == Tag::AUDIO_OUTPUT_CHANNEL_LAYOUT, - Plugin::AudioChannelLayout, ValueType::INT64_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::AUDIO_SAMPLE_FORMAT, Plugin::AudioSampleFormat, + Plugins::AudioChannelLayout, ValueType::INT64_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::AUDIO_SAMPLE_FORMAT, Plugins::AudioSampleFormat, ValueType::INT32_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::AUDIO_AAC_PROFILE, Plugin::AudioAacProfile, ValueType::UINT8_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::AUDIO_AAC_STREAM_FORMAT, Plugin::AudioAacStreamFormat, + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::AUDIO_AAC_PROFILE, Plugins::AudioAacProfile, ValueType::UINT8_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::AUDIO_AAC_STREAM_FORMAT, Plugins::AudioAacStreamFormat, ValueType::UINT8_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_PIXEL_FORMAT, Plugin::VideoPixelFormat, + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_PIXEL_FORMAT, Plugins::VideoPixelFormat, ValueType::INT32_T); -// DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::MEDIA_SEEKABLE), Plugin::Seekable); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::MEDIA_TYPE, Plugin::MediaType, ValueType::INT32_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_BIT_STREAM_FORMAT, std::vector, +// DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::MEDIA_SEEKABLE), Plugins::Seekable); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::MEDIA_TYPE, Plugins::MediaType, ValueType::INT32_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_BIT_STREAM_FORMAT, std::vector, ValueType::VECTOR_UINT32); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_H264_PROFILE, Plugin::VideoH264Profile, + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_H264_PROFILE, Plugins::VideoH264Profile, ValueType::INT32_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_ROTATION, Plugin::VideoRotation, ValueType::INT32_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_COLOR_PRIMARIES, Plugin::ColorPrimary, + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_ROTATION, Plugins::VideoRotation, ValueType::INT32_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_COLOR_PRIMARIES, Plugins::ColorPrimary, ValueType::INT32_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_COLOR_TRC, Plugin::TransferCharacteristic, + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_COLOR_TRC, Plugins::TransferCharacteristic, ValueType::INT32_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_COLOR_MATRIX_COEFF, Plugin::MatrixCoefficient, + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_COLOR_MATRIX_COEFF, Plugins::MatrixCoefficient, ValueType::INT32_T); DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_ENCODE_BITRATE_MODE, - Plugin::VideoEncodeBitrateMode, ValueType::INT32_T); + Plugins::VideoEncodeBitrateMode, ValueType::INT32_T); DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_COLOR_RANGE or tagCharSeq == Tag::VIDEO_REQUEST_I_FRAME or tagCharSeq == Tag::VIDEO_IS_HDR_VIVID or @@ -139,10 +139,10 @@ public: tagCharSeq == Tag::MEDIA_HAS_AUDIO or tagCharSeq == Tag::MEDIA_END_OF_STREAM or tagCharSeq == Tag::VIDEO_FRAME_RATE_ADAPTIVE_MODE, bool, ValueType::BOOL); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_H265_PROFILE, Plugin::HEVCProfile, ValueType::INT32_T); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_H265_LEVEL, Plugin::HEVCLevel, ValueType::INT32_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_H265_PROFILE, Plugins::HEVCProfile, ValueType::INT32_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_H265_LEVEL, Plugins::HEVCLevel, ValueType::INT32_T); DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_CHROMA_LOCATION, - Plugin::ChromaLocation, ValueType::INT32_T); + Plugins::ChromaLocation, ValueType::INT32_T); DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::APP_UID or tagCharSeq == Tag::APP_PID or tagCharSeq == Tag::APP_TOKEN_ID or @@ -197,7 +197,7 @@ public: DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::VIDEO_FRAME_RATE or tagCharSeq == Tag::VIDEO_CAPTURE_RATE, double, ValueType::DOUBLE); - DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::MEDIA_FILE_TYPE, Plugin::FileType, ValueType::INT32_T); + DEFINE_INSERT_GET_FUNC(tagCharSeq == Tag::MEDIA_FILE_TYPE, Plugins::FileType, ValueType::INT32_T); DEFINE_INSERT_GET_FUNC( tagCharSeq == Tag::MIME_TYPE or tagCharSeq == Tag::MEDIA_FILE_URI or diff --git a/interface/inner_api/meta/mime_type.h b/interface/inner_api/meta/mime_type.h index 2078cbde130625ff55d376aced74b0d29f235188..a042f0f939c3d676f3ab597fc48ac0137d9422e0 100644 --- a/interface/inner_api/meta/mime_type.h +++ b/interface/inner_api/meta/mime_type.h @@ -18,7 +18,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { class MimeType { public: static constexpr const char VIDEO_H263[] = "video/h263"; @@ -46,7 +46,7 @@ public: static constexpr const char MEDIA_MP4[] = "media/mp4"; static constexpr const char MEDIA_M4A[] = "media/m4a"; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // MEDIA_FOUNDATION_MIME_TYPE_H \ No newline at end of file diff --git a/interface/inner_api/meta/source_types.h b/interface/inner_api/meta/source_types.h index 5381154ab5028ca28a819e7d886bfa9203f90e63..864cdd26614ea997b5d4bc1df541c32ffc575e55 100644 --- a/interface/inner_api/meta/source_types.h +++ b/interface/inner_api/meta/source_types.h @@ -20,7 +20,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @enum source input type. * @@ -35,7 +35,7 @@ enum struct SrcInputType : uint32_t { VID_SURFACE_RGB, ///< Video source input type of RGB video data VID_SURFACE_ES, ///< Video source input type of Raw encoded data }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_COMMON_SOURCE_TAG_H diff --git a/interface/inner_api/meta/video_types.h b/interface/inner_api/meta/video_types.h index 7dc4c416cafa1d230de0f96caf9d449a11152989..eb8831918447d3a00081f975e5748f7676c55886 100644 --- a/interface/inner_api/meta/video_types.h +++ b/interface/inner_api/meta/video_types.h @@ -20,7 +20,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { enum class VideoScaleType { VIDEO_SCALE_TYPE_FIT, VIDEO_SCALE_TYPE_FIT_CROP, @@ -281,7 +281,7 @@ enum MPEG4Level : int32_t { MPEG4_LEVEL_4A = 6, MPEG4_LEVEL_5 = 7, }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // MEDIA_FOUNDATION_VIDEO_TYPES_H diff --git a/interface/inner_api/osal/utils/dump_buffer.h b/interface/inner_api/osal/utils/dump_buffer.h index 243f64cb7062b37d7e6f4f063044b4140d72aa10..e61629fed46678d5caec929cc524b19735e0d6d7 100644 --- a/interface/inner_api/osal/utils/dump_buffer.h +++ b/interface/inner_api/osal/utils/dump_buffer.h @@ -57,10 +57,11 @@ namespace Media { #define DUMP_BUFFER2LOG(desc, buffer, offset) #endif -void DumpBufferToFile(const std::string& fileName, const std::shared_ptr& buffer); +void DumpBufferToFile(const std::string& fileName, const std::shared_ptr& buffer); void PrepareDumpDir(); void EndDumpFile(); -void DumpBufferToLog(const char* desc, const std::shared_ptr& buffer, uint64_t offset, size_t dumpSize); +void DumpBufferToLog(const char* desc, const std::shared_ptr& buffer, uint64_t offset, + size_t dumpSize); } // Media } // OHOS #endif // HISTREAMER_PIPELINE_DUMP_BUFFER_H diff --git a/interface/inner_api/plugin/generic_plugin.h b/interface/inner_api/plugin/generic_plugin.h index fac60bda3b1544725cb2102874bfef927432fe93..1b20b7e9922204512d602688edbabc0262bdbaa0 100644 --- a/interface/inner_api/plugin/generic_plugin.h +++ b/interface/inner_api/plugin/generic_plugin.h @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @brief Generic plugin definition. * It can be used to represent any user defined plugin (T), which must derived from PluginBase. @@ -43,7 +43,7 @@ struct GenericPluginDef : public PluginDefBase { pluginType = PluginType::GENERIC_PLUGIN; ///< Plugin type, MUST be GENERIC_PLUGIN. } }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif \ No newline at end of file diff --git a/interface/inner_api/plugin/plugin_base.h b/interface/inner_api/plugin/plugin_base.h index 6a93478aeef67a57a135459eb15e113181e56ea3..9b81edc608f0525b76ae2a9e25f3445d92b6fdd2 100644 --- a/interface/inner_api/plugin/plugin_base.h +++ b/interface/inner_api/plugin/plugin_base.h @@ -25,7 +25,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { enum class ErrorType { PLUGIN_ERROR, ALGO_ERROR, @@ -223,7 +223,7 @@ struct PluginBase { protected: const std::string pluginName_; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_INTF_PLUGIN_BASE_H diff --git a/interface/inner_api/plugin/plugin_buffer.h b/interface/inner_api/plugin/plugin_buffer.h index 08b38fd42f77d88c27c4e6fb3648462c49effaef..1794f067a26866157397537ffdec48d7069f0090 100644 --- a/interface/inner_api/plugin/plugin_buffer.h +++ b/interface/inner_api/plugin/plugin_buffer.h @@ -28,7 +28,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { // Align value template template @@ -99,7 +99,7 @@ private: /// Data described by this buffer. std::vector> data {}; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_COMMON_BUFFER_H diff --git a/interface/inner_api/plugin/plugin_caps.h b/interface/inner_api/plugin/plugin_caps.h index 41726c8ce01c88146ba452971a58438a5707306e..9745fe5acfc1efceae33d96a76dcbbe1f0306e00 100644 --- a/interface/inner_api/plugin/plugin_caps.h +++ b/interface/inner_api/plugin/plugin_caps.h @@ -24,7 +24,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /// Indicates that the available capability type is an fixed value. template using FixedCapability = T; @@ -131,7 +131,7 @@ struct Capability { /// A collection of multiple capabilities using CapabilitySet = std::vector; using ValueType = Any; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_CAPS_H diff --git a/interface/inner_api/plugin/plugin_definition.h b/interface/inner_api/plugin/plugin_definition.h index e92d68ebd7e276161906ecc98a428b9f0d4b65db..8f24816763d702bedbf81f9fe86a35a147bbf207 100644 --- a/interface/inner_api/plugin/plugin_definition.h +++ b/interface/inner_api/plugin/plugin_definition.h @@ -25,7 +25,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @brief Macro definition, creating the version information. * @@ -303,19 +303,19 @@ using UnregisterFunc = void (*)(); * @param registerFunc Plugin registration function, MUST NOT be NULL. * @param unregisterFunc Plugin deregister function,MUST NOT be NULL. */ -#define PLUGIN_DEFINITION(name, license, registerFunc, unregisterFunc) \ - PLUGIN_EXPORT OHOS::Media::Status PLUGIN_PASTE(register_, name)( \ - const std::shared_ptr& pkgReg) \ - { \ - pkgReg->AddPackage({PLUGIN_INTERFACE_VERSION, PLUGIN_STRINGIFY(name), license}); \ - std::shared_ptr pluginReg = pkgReg; \ - return registerFunc(pluginReg); \ - } \ - PLUGIN_EXPORT void PLUGIN_PASTE(unregister_, name)() \ - { \ - unregisterFunc(); \ +#define PLUGIN_DEFINITION(name, license, registerFunc, unregisterFunc) \ + PLUGIN_EXPORT OHOS::Media::Status PLUGIN_PASTE(register_, name)( \ + const std::shared_ptr& pkgReg) \ + { \ + pkgReg->AddPackage({PLUGIN_INTERFACE_VERSION, PLUGIN_STRINGIFY(name), license}); \ + std::shared_ptr pluginReg = pkgReg; \ + return registerFunc(pluginReg); \ + } \ + PLUGIN_EXPORT void PLUGIN_PASTE(unregister_, name)() \ + { \ + unregisterFunc(); \ } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_INTF_PLUGIN_DEFINITION_H diff --git a/interface/inner_api/plugin/plugin_event.h b/interface/inner_api/plugin/plugin_event.h index 518e8902f67a237cdefe2a61ed631d9961ecc022..fffacf19ab5394cbfdb53e011fc3635cbb4c8e04 100644 --- a/interface/inner_api/plugin/plugin_event.h +++ b/interface/inner_api/plugin/plugin_event.h @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { enum struct PluginEventType : int32_t { CLIENT_ERROR, SERVER_ERROR, @@ -50,7 +50,7 @@ struct PluginEvent { Any param; std::string description; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_TYPES_H diff --git a/interface/inner_api/plugin/plugin_info.h b/interface/inner_api/plugin/plugin_info.h index 3c738fe4da9d37d26615ae2c2ba514c76776b17b..8a7b6def26af88b1395d26d75d7e658e5c00aa51 100644 --- a/interface/inner_api/plugin/plugin_info.h +++ b/interface/inner_api/plugin/plugin_info.h @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * PluginInfo, which describes static information for a plugin, including basic plugin information, * such as the type, name, rank, and input and output capabilities. @@ -99,10 +99,10 @@ struct MediaInfo { * Extra information about the plugin. * Describes the CodecMode supported by the Codec plugin. * - * ValueType: enum Plugin::CodecMode + * ValueType: enum Plugins::CodecMode */ #define PLUGIN_INFO_EXTRA_CODEC_MODE "codec_mode" // NOLINT: macro constant -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_INFO_H diff --git a/interface/inner_api/plugin/plugin_loader.h b/interface/inner_api/plugin/plugin_loader.h index 8dd77a71cca27e9b03fd8bb6ad308f563bf78567..b2168684f52fac9cf274bcc7a8805523eb1a1ba7 100644 --- a/interface/inner_api/plugin/plugin_loader.h +++ b/interface/inner_api/plugin/plugin_loader.h @@ -21,7 +21,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { class PluginLoader { public: PluginLoader(const PluginLoader &) = delete; @@ -46,7 +46,7 @@ private: RegisterFunc registerFunc_ {nullptr}; UnregisterFunc unregisterFunc_ {nullptr}; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_LOADER_H diff --git a/interface/inner_api/plugin/plugin_manager.h b/interface/inner_api/plugin/plugin_manager.h index 2f48907131f44e98e914175d4fbfd7a7a8926d6d..6e7dd7df26689120f5eb699ee950fe22c297b05d 100644 --- a/interface/inner_api/plugin/plugin_manager.h +++ b/interface/inner_api/plugin/plugin_manager.h @@ -23,7 +23,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { class PluginManager { public: PluginManager(const PluginManager&) = delete; @@ -78,7 +78,7 @@ private: private: std::shared_ptr pluginRegister_; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_MANAGER_H diff --git a/interface/inner_api/plugin/plugin_memory.h b/interface/inner_api/plugin/plugin_memory.h index f89f39856a24f1298762ebef66c10bce349b20a0..50af2573f9ab4d039d74a0cae90645a7c8552165 100644 --- a/interface/inner_api/plugin/plugin_memory.h +++ b/interface/inner_api/plugin/plugin_memory.h @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { constexpr size_t MEM_INVALID_POSITION = -1; /** @@ -158,7 +158,7 @@ private: friend class Buffer; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_MEMORY_H diff --git a/interface/inner_api/plugin/plugin_register.h b/interface/inner_api/plugin/plugin_register.h index a9e9d2a9c220d9e2fadb6bb96ad173d167fb86c2..1daf8edbc11104a6378ec922e6a05d672e59412b 100644 --- a/interface/inner_api/plugin/plugin_register.h +++ b/interface/inner_api/plugin/plugin_register.h @@ -27,7 +27,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { struct DataSource; using DemuxerPluginSnifferFunc = int (*)(const std::string& name, std::shared_ptr dataSource); struct PluginRegInfo { @@ -124,7 +124,7 @@ public: return staticPluginRegister_; } }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_REGISTER_H diff --git a/src/buffer/avbuffer_queue/avbuffer_queue.cpp b/src/buffer/avbuffer_queue/avbuffer_queue.cpp index eed98efa86978313af314ecb383326ee666c32f3..a9a774092cefa90f1d18517638e2fce4c61ee392 100644 --- a/src/buffer/avbuffer_queue/avbuffer_queue.cpp +++ b/src/buffer/avbuffer_queue/avbuffer_queue.cpp @@ -409,7 +409,7 @@ Status AVBufferQueueImpl::ReturnBuffer(uint64_t uniqueId, bool available) NOK_RETURN(CancelBuffer(uniqueId)); } else { auto& config = cachedBufferMap_[uniqueId].buffer->GetConfig(); - bool isEosBuffer = cachedBufferMap_[uniqueId].buffer->flag_ & (uint32_t)(Plugin::AVBufferFlag::EOS); + bool isEosBuffer = cachedBufferMap_[uniqueId].buffer->flag_ & (uint32_t)(Plugins::AVBufferFlag::EOS); if (!isEosBuffer) { FALSE_RETURN_V(config.size > 0, Status::ERROR_INVALID_BUFFER_SIZE); } diff --git a/src/common/plugin_attr_desc.h b/src/common/plugin_attr_desc.h index 37c75172b4193faa200ebf09b61746c7f356953a..3844ef757cc70b5193d887fd5a8e8a9840dc7510 100644 --- a/src/common/plugin_attr_desc.h +++ b/src/common/plugin_attr_desc.h @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { const ValueType g_emptyString = std::string(); const ValueType g_u8Def = (uint8_t)0; const ValueType g_u32Def = (uint32_t)0; @@ -259,7 +259,7 @@ inline const char* GetTagTypeStrName(Tag tag) return std::get<2>(g_tagInfoMap.at(tag)); // secondary parameter 2 } -inline const Plugin::ValueType* GetTagDefValue(Tag tag) +inline const Plugins::ValueType* GetTagDefValue(Tag tag) { if (!HasTagInfo(tag)) { return nullptr; diff --git a/src/common/plugin_audio_tags.h b/src/common/plugin_audio_tags.h index fa5270c74acbd036c6b3a759f70e0ae8c224a018..8d336e959d8db5db9e6cb22000c2595780faa028 100644 --- a/src/common/plugin_audio_tags.h +++ b/src/common/plugin_audio_tags.h @@ -20,10 +20,10 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_COMMON_AUDIO_TAGS_H diff --git a/src/common/plugin_caps_builder.h b/src/common/plugin_caps_builder.h index 7392f1d6808b17216132e4502c16665b37491219..1ad9d92863acadf5624678e1fa832540431dc9d4 100644 --- a/src/common/plugin_caps_builder.h +++ b/src/common/plugin_caps_builder.h @@ -22,7 +22,7 @@ #include "plugin_video_tags.h" namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @brief CapabilityBuilder is used for easily building of Capability. * diff --git a/src/common/plugin_source_tags.h b/src/common/plugin_source_tags.h index 5381154ab5028ca28a819e7d886bfa9203f90e63..864cdd26614ea997b5d4bc1df541c32ffc575e55 100644 --- a/src/common/plugin_source_tags.h +++ b/src/common/plugin_source_tags.h @@ -20,7 +20,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @enum source input type. * @@ -35,7 +35,7 @@ enum struct SrcInputType : uint32_t { VID_SURFACE_RGB, ///< Video source input type of RGB video data VID_SURFACE_ES, ///< Video source input type of Raw encoded data }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_COMMON_SOURCE_TAG_H diff --git a/src/common/plugin_time.h b/src/common/plugin_time.h index 1e398b10d588e085c79a2b445017970705b4126d..c4b8bb6f6f1e259936d3414a0ce286ac87158a97 100644 --- a/src/common/plugin_time.h +++ b/src/common/plugin_time.h @@ -18,7 +18,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { #define HST_TIME_NONE ((int64_t)-1) #define HST_TIME_BASE ((int64_t)1) #define HST_NSECOND HST_TIME_BASE diff --git a/src/common/plugin_video_tags.h b/src/common/plugin_video_tags.h index 0b952899b9e9f12deeb421d03cdbae5fff1aab2c..1b6015461067e9f322a5a9277fb0268250d333d0 100644 --- a/src/common/plugin_video_tags.h +++ b/src/common/plugin_video_tags.h @@ -20,7 +20,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @enum Video Pixel Format. * @@ -81,7 +81,7 @@ enum struct VideoBitStreamFormat : uint32_t { HEVC, // H265 bit stream format ANNEXB, // H264, H265 bit stream format }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif // HISTREAMER_PLUGIN_COMMON_VIDEO_TAGS_H diff --git a/src/common/share_allocator.cpp b/src/common/share_allocator.cpp index 2d06bc858f979e10d714b9f2cb76d765f49b4a4c..629195f093917065e3c16e89a466770b0d9cdc9f 100644 --- a/src/common/share_allocator.cpp +++ b/src/common/share_allocator.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { ShareAllocator::ShareAllocator(ShareMemType shareMemType) : Allocator(MemoryType::SHARED_MEMORY), shareMemType_(shareMemType) { @@ -42,7 +42,7 @@ ShareMemType ShareAllocator::GetShareMemType() { return shareMemType_; } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif \ No newline at end of file diff --git a/src/common/share_allocator.h b/src/common/share_allocator.h index b2a3f9dd56756331f347066f5b5917bd681775a6..c5f8c7a457803e8196e41b7d8acf6f7b44369de3 100644 --- a/src/common/share_allocator.h +++ b/src/common/share_allocator.h @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { /** * @brief Enumerate the shared memory types. */ @@ -46,7 +46,7 @@ public: private: ShareMemType shareMemType_; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif diff --git a/src/common/share_memory.cpp b/src/common/share_memory.cpp index f799a840854ff823aa072ac810ac99cf564534af..ecaa51c3a5c73261a39b3774a386b76459eccd98 100644 --- a/src/common/share_memory.cpp +++ b/src/common/share_memory.cpp @@ -22,7 +22,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { ShareMemory::ShareMemory(size_t capacity, std::shared_ptr allocator, size_t align) : Memory(capacity, std::move(allocator), align, MemoryType::SHARED_MEMORY, false) { @@ -108,7 +108,7 @@ void ShareMemory::InitShareMemory(ShareMemType type) break; } } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif diff --git a/src/common/share_memory.h b/src/common/share_memory.h index 156af0cda0b68852a7f7991ca157d351728f8d0c..310ac68991f83a2b73a0df02afdc78a15acbb801 100644 --- a/src/common/share_memory.h +++ b/src/common/share_memory.h @@ -23,7 +23,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { class ShareMemory : public Memory { public: ~ShareMemory() override; @@ -49,7 +49,7 @@ private: int fd_; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS diff --git a/src/common/surface_allocator.cpp b/src/common/surface_allocator.cpp index 3408b05b622a764325b0e560eac98bf20b718219..5d509930566403495a2093704d6d2dd367ad0eec 100644 --- a/src/common/surface_allocator.cpp +++ b/src/common/surface_allocator.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { const std::unordered_map scaleTypeMap = { { VideoScaleType::VIDEO_SCALE_TYPE_FIT, ScalingMode::SCALING_MODE_SCALE_TO_WINDOW }, { VideoScaleType::VIDEO_SCALE_TYPE_FIT_CROP, ScalingMode::SCALING_MODE_SCALE_CROP} @@ -132,7 +132,7 @@ void SurfaceAllocator::UpdateSurfaceBufferScaleMode(sptr& surface MEDIA_LOG_E("update surface buffer scaling mode fail, ret: " PUBLIC_LOG_U64, static_cast(ret)); } } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif \ No newline at end of file diff --git a/src/common/surface_allocator.h b/src/common/surface_allocator.h index 04753331bd4e2d5dcc9da52c9908061891c2749e..17a276dd8768ab6788c733685d40b02e28443161 100644 --- a/src/common/surface_allocator.h +++ b/src/common/surface_allocator.h @@ -25,7 +25,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { class SurfaceAllocator : public Allocator { public: explicit SurfaceAllocator(sptr surface = nullptr); @@ -45,7 +45,7 @@ private: BufferRequestConfig requestConfig_; ScalingMode scalingMode_ {ScalingMode::SCALING_MODE_SCALE_TO_WINDOW}; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS diff --git a/src/common/surface_memory.cpp b/src/common/surface_memory.cpp index a9dab6693f5446b139dfae54df983a450ba3fe41..e582fd9337c45e70bbd8310ec19ebdfeeb806fab 100644 --- a/src/common/surface_memory.cpp +++ b/src/common/surface_memory.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { SurfaceMemory::SurfaceMemory(size_t capacity, std::shared_ptr allocator, size_t align) : Memory(capacity, std::move(allocator), align, MemoryType::SURFACE_MEMORY, false), fence_(-1), @@ -123,7 +123,7 @@ uint8_t* SurfaceMemory::GetRealAddr() const } return nullptr; } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS #endif \ No newline at end of file diff --git a/src/common/surface_memory.h b/src/common/surface_memory.h index 9ea64a01ec036a0f0f0d45880c3896fa1afbe69e..b779505578a36d1252a99d17706791d9781229b6 100644 --- a/src/common/surface_memory.h +++ b/src/common/surface_memory.h @@ -27,7 +27,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { class SurfaceMemory : public Memory { public: ~SurfaceMemory(); @@ -68,7 +68,7 @@ private: friend class Buffer; }; -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS diff --git a/src/meta/media_source.cpp b/src/meta/media_source.cpp index 8c8c3db6bb132d4b02798fce26213135eb25382b..1dee0dd7bf6d24814e6dcaae22f062c983f6b7fc 100644 --- a/src/meta/media_source.cpp +++ b/src/meta/media_source.cpp @@ -18,7 +18,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { MediaSource::MediaSource(std::string uri) : uri_(std::move(uri)), type_(SourceType::SOURCE_TYPE_URI) { @@ -57,7 +57,7 @@ std::shared_ptr MediaSource::GetDataSrc() const return dataSrc_; } #endif -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS diff --git a/src/meta/meta.cpp b/src/meta/meta.cpp index 5bc027188d2f47aa0093a01e1a46627eb42474f3..db5142eeec8792c433629af4457e7f478cab3a39 100644 --- a/src/meta/meta.cpp +++ b/src/meta/meta.cpp @@ -46,7 +46,7 @@ **/ namespace OHOS { namespace Media { -using namespace Plugin; +using namespace Plugins; #define DEFINE_METADATA_SETTER_GETTER_FUNC(EnumTypeName, ExtTypeName) \ static bool Set##EnumTypeName(Meta& meta, const TagType& tag, ExtTypeName& value) \ @@ -312,7 +312,7 @@ static std::map g_metadataDefaultValueMap = { {Tag::MEDIA_COVER, defaultVectorUInt8}, {Tag::AUDIO_VORBIS_IDENTIFICATION_HEADER, defaultVectorUInt8}, {Tag::AUDIO_VORBIS_SETUP_HEADER, defaultVectorUInt8}, - // vector + // vector {Tag::VIDEO_BIT_STREAM_FORMAT, defaultVectorVideoBitStreamFormat}}; Any GetDefaultAnyValue(const TagType& tag) diff --git a/src/plugin/plugin_buffer.cpp b/src/plugin/plugin_buffer.cpp index 256c042562800fefd1c3da79ee8b227a65e6a778..c0c720f8ca59c25e92c90640462e7fb8be0991ce 100644 --- a/src/plugin/plugin_buffer.cpp +++ b/src/plugin/plugin_buffer.cpp @@ -18,7 +18,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { Memory::Memory(size_t capacity, std::shared_ptr bufData, size_t align, MemoryType type) : memoryType(type), capacity(capacity), alignment(align), offset(0), size(0), allocator(nullptr), addr(std::move(bufData)) @@ -199,6 +199,6 @@ void Buffer::Reset() duration = 0; flag = 0; } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS diff --git a/src/plugin/plugin_factory.h b/src/plugin/plugin_factory.h index 1467286573ba8c74ca9958400d0c43fc4a1a83ac..6ed73a733abc1f2670916beaf0e582cffa498aa7 100644 --- a/src/plugin/plugin_factory.h +++ b/src/plugin/plugin_factory.h @@ -20,7 +20,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { template class AutoRegisterPlugin { public: diff --git a/src/plugin/plugin_loader.cpp b/src/plugin/plugin_loader.cpp index 199591edaba31913263545d42dafe2585c1e952e..5f0297700f82f09ecabdad930d00c6c06ed0a715 100644 --- a/src/plugin/plugin_loader.cpp +++ b/src/plugin/plugin_loader.cpp @@ -27,7 +27,7 @@ #include "common/log.h" -using namespace OHOS::Media::Plugin; +using namespace OHOS::Media::Plugins; std::shared_ptr PluginLoader::Create(const std::string& name, const std::string& path) { diff --git a/src/plugin/plugin_manager.cpp b/src/plugin/plugin_manager.cpp index 417b45634a35008d77354b6d1124dff9dcae4a39..2fe29c83e9ba7c68a713769ce7ed95bfdc69ba3c 100644 --- a/src/plugin/plugin_manager.cpp +++ b/src/plugin/plugin_manager.cpp @@ -19,7 +19,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { PluginManager::PluginManager() { Init(); @@ -74,6 +74,6 @@ void PluginManager::RegisterGenericPlugins(const std::vector& { pluginRegister_->RegisterGenericPlugins(vecPluginDef); } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS \ No newline at end of file diff --git a/src/plugin/plugin_register.cpp b/src/plugin/plugin_register.cpp index 60de9eb5818ac18230364fc6742a7c6db031c219..0829e35c4df431f28677fb0a41439b1c4353417e 100644 --- a/src/plugin/plugin_register.cpp +++ b/src/plugin/plugin_register.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace Media { -namespace Plugin { +namespace Plugins { PluginRegister::~PluginRegister() { @@ -409,6 +409,6 @@ bool PluginRegister::RegisterData::IsPluginExist(PluginType type, const std::str return (registerTable.find(type) != registerTable.end() && registerTable[type].find(name) != registerTable[type].end()); } -} // namespace Plugin +} // namespace Plugins } // namespace Media } // namespace OHOS \ No newline at end of file diff --git a/tests/unittest/format/avformat_unit_test.cpp b/tests/unittest/format/avformat_unit_test.cpp index d3b9c7abdf829e0482095d63d475f815547677ae..81a03655cbf40efcb6ca03d0ecae459e1ca0a5bd 100644 --- a/tests/unittest/format/avformat_unit_test.cpp +++ b/tests/unittest/format/avformat_unit_test.cpp @@ -508,12 +508,12 @@ void CheckFormatMap(Format::FormatDataMap &formatMap) iter = formatMap.find(INT_ENUM_TESTKEY); ASSERT_NE(iter, formatMap.end()); EXPECT_EQ(iter->second.type, FORMAT_TYPE_INT32); - EXPECT_EQ(iter->second.val.int32Val, static_cast(Plugin::VideoRotation::VIDEO_ROTATION_90)); + EXPECT_EQ(iter->second.val.int32Val, static_cast(Plugins::VideoRotation::VIDEO_ROTATION_90)); iter = formatMap.find(LONG_ENUM_TESTKEY); ASSERT_NE(iter, formatMap.end()); EXPECT_EQ(iter->second.type, FORMAT_TYPE_INT64); - EXPECT_EQ(iter->second.val.int64Val, static_cast(Plugin::AudioChannelLayout::STEREO)); + EXPECT_EQ(iter->second.val.int64Val, static_cast(Plugins::AudioChannelLayout::STEREO)); } /** * @tc.name: Format_GetFormatMap_001 @@ -537,8 +537,8 @@ HWTEST_F(AVFormatUnitTest, Format_GetFormatMap_001, TestSize.Level1) meta->SetData(DOUBLE_TESTKEY, DOUBLE_VALUE); meta->SetData(STRING_TESTKEY, STRING_VALUE); meta->SetData(BUFFER_TESTKEY, BUFFER_VALUE); - meta->SetData(INT_ENUM_TESTKEY, Plugin::VideoRotation::VIDEO_ROTATION_90); - meta->SetData(LONG_ENUM_TESTKEY, Plugin::AudioChannelLayout::STEREO); + meta->SetData(INT_ENUM_TESTKEY, Plugins::VideoRotation::VIDEO_ROTATION_90); + meta->SetData(LONG_ENUM_TESTKEY, Plugins::AudioChannelLayout::STEREO); format->SetMeta(meta); Format::FormatDataMap formatMap = format->GetFormatMap(); @@ -568,8 +568,8 @@ HWTEST_F(AVFormatUnitTest, Format_GetFormatMap_002, TestSize.Level1) meta->SetData(DOUBLE_TESTKEY, DOUBLE_VALUE); meta->SetData(STRING_TESTKEY, STRING_VALUE); meta->SetData(BUFFER_TESTKEY, BUFFER_VALUE); - meta->SetData(INT_ENUM_TESTKEY, Plugin::VideoRotation::VIDEO_ROTATION_90); - meta->SetData(LONG_ENUM_TESTKEY, Plugin::AudioChannelLayout::STEREO); + meta->SetData(INT_ENUM_TESTKEY, Plugins::VideoRotation::VIDEO_ROTATION_90); + meta->SetData(LONG_ENUM_TESTKEY, Plugins::AudioChannelLayout::STEREO); format->SetMeta(meta); meta = format->GetMeta(); @@ -625,8 +625,8 @@ HWTEST_F(AVFormatUnitTest, Format_GetValueType_001, TestSize.Level1) meta->SetData(DOUBLE_TESTKEY, DOUBLE_VALUE); meta->SetData(STRING_TESTKEY, STRING_VALUE); meta->SetData(BUFFER_TESTKEY, BUFFER_VALUE); - meta->SetData(INT_ENUM_TESTKEY, Plugin::VideoRotation::VIDEO_ROTATION_90); - meta->SetData(LONG_ENUM_TESTKEY, Plugin::AudioChannelLayout::STEREO); + meta->SetData(INT_ENUM_TESTKEY, Plugins::VideoRotation::VIDEO_ROTATION_90); + meta->SetData(LONG_ENUM_TESTKEY, Plugins::AudioChannelLayout::STEREO); format->SetMeta(std::move(meta)); CheckValueType(format); @@ -655,8 +655,8 @@ HWTEST_F(AVFormatUnitTest, Format_GetValueType_002, TestSize.Level1) meta->SetData(DOUBLE_TESTKEY, DOUBLE_VALUE); meta->SetData(STRING_TESTKEY, STRING_VALUE); meta->SetData(BUFFER_TESTKEY, BUFFER_VALUE); - meta->SetData(INT_ENUM_TESTKEY, Plugin::VideoRotation::VIDEO_ROTATION_90); - meta->SetData(LONG_ENUM_TESTKEY, Plugin::AudioChannelLayout::STEREO); + meta->SetData(INT_ENUM_TESTKEY, Plugins::VideoRotation::VIDEO_ROTATION_90); + meta->SetData(LONG_ENUM_TESTKEY, Plugins::AudioChannelLayout::STEREO); format->SetMeta(meta); meta = format->GetMeta(); diff --git a/tests/unittest/meta/any_func_unit_test.cpp b/tests/unittest/meta/any_func_unit_test.cpp index ad8594b5b239312733128ba3b86e210ba7f1153f..5b2a2ff83180875274f04534f78c1921dc4e4559 100644 --- a/tests/unittest/meta/any_func_unit_test.cpp +++ b/tests/unittest/meta/any_func_unit_test.cpp @@ -69,8 +69,8 @@ HWTEST_F(AnyInnerUnitTest, Any_Init, TestSize.Level1) int32_t valueOut = AnyCast(anyCopy); EXPECT_EQ(valueOut, valueIn); - Any anyInitValueType(Plugin::SrcInputType::AUD_MIC); - Plugin::SrcInputType valueOutSrcType = AnyCast(anyInitValueType); + Any anyInitValueType(Plugins::SrcInputType::AUD_MIC); + Plugins::SrcInputType valueOutSrcType = AnyCast(anyInitValueType); EXPECT_EQ(static_cast(valueOutSrcType), 1); } diff --git a/tests/unittest/meta/meta_func_unit_test.cpp b/tests/unittest/meta/meta_func_unit_test.cpp index a385113a6c4f378cdf6caef1997ee595247408b3..38edbc3c12f7ca00dac366b8c8d07343e9b22ccd 100644 --- a/tests/unittest/meta/meta_func_unit_test.cpp +++ b/tests/unittest/meta/meta_func_unit_test.cpp @@ -230,7 +230,7 @@ HWTEST_F(MetaInnerUnitTest, SetGet_MetaData_Int32_PlainInput, TestSize.Level1) HWTEST_F(MetaInnerUnitTest, SetGet_MetaData_Enum_As_Int32, TestSize.Level1) { int32_t valueOut = 0; - int32_t valueIn = static_cast(Plugin::VideoRotation::VIDEO_ROTATION_90); + int32_t valueIn = static_cast(Plugins::VideoRotation::VIDEO_ROTATION_90); SetMetaData(*metaIn, Tag::VIDEO_ROTATION, valueIn); GetMetaData(*metaIn, Tag::VIDEO_ROTATION, valueOut); EXPECT_EQ(valueOut, valueIn); @@ -262,8 +262,8 @@ HWTEST_F(MetaInnerUnitTest, SetGet_MetaData_Int32_Using_Parcel, TestSize.Level1) */ HWTEST_F(MetaInnerUnitTest, SetGet_MetaData_Enum_As_Int32_Using_Parcel, TestSize.Level1) { - Plugin::VideoRotation valueOut; - int32_t valueIn = static_cast(Plugin::VideoRotation::VIDEO_ROTATION_90); + Plugins::VideoRotation valueOut; + int32_t valueIn = static_cast(Plugins::VideoRotation::VIDEO_ROTATION_90); SetMetaData(*metaIn, Tag::VIDEO_ROTATION, valueIn); ASSERT_TRUE(metaIn->ToParcel(*parcel)); ASSERT_TRUE(metaOut->FromParcel(*parcel)); @@ -281,8 +281,8 @@ HWTEST_F(MetaInnerUnitTest, SetGet_MetaData_Enum_As_Int32_Using_Parcel, TestSize */ HWTEST_F(MetaInnerUnitTest, SetGet_MetaData_Enum_As_Int64_Using_Parcel, TestSize.Level1) { - Plugin::AudioChannelLayout valueOut; - int64_t valueIn = static_cast(Plugin::AudioChannelLayout::HOA_ORDER1_FUMA); + Plugins::AudioChannelLayout valueOut; + int64_t valueIn = static_cast(Plugins::AudioChannelLayout::HOA_ORDER1_FUMA); SetMetaData(*metaIn, Tag::AUDIO_CHANNEL_LAYOUT, valueIn); ASSERT_TRUE(metaIn->ToParcel(*parcel)); ASSERT_TRUE(metaOut->FromParcel(*parcel)); @@ -335,23 +335,23 @@ map testInt32Data = { {Tag::VIDEO_STRIDE, 17}, {Tag::VIDEO_DISPLAY_WIDTH, 19}, {Tag::VIDEO_DISPLAY_HEIGHT, 23}, - {Tag::SRC_INPUT_TYPE, static_cast(Plugin::SrcInputType::AUD_ES)}, - {Tag::AUDIO_SAMPLE_FORMAT, static_cast(Plugin::AudioSampleFormat::SAMPLE_S16LE)}, - {Tag::VIDEO_PIXEL_FORMAT, static_cast(Plugin::VideoPixelFormat::YUV411P)}, - {Tag::MEDIA_TYPE, static_cast(Plugin::MediaType::AUDIO)}, - {Tag::VIDEO_H264_PROFILE, static_cast(Plugin::VideoH264Profile::BASELINE)}, - {Tag::VIDEO_ROTATION, static_cast(Plugin::VideoRotation::VIDEO_ROTATION_90)}, - {Tag::VIDEO_COLOR_PRIMARIES, static_cast(Plugin::ColorPrimary::BT2020)}, - {Tag::VIDEO_COLOR_TRC, static_cast(Plugin::TransferCharacteristic::BT1361)}, - {Tag::VIDEO_COLOR_MATRIX_COEFF, static_cast(Plugin::MatrixCoefficient::BT2020_CL)}, - {Tag::VIDEO_H265_PROFILE, static_cast(Plugin::HEVCProfile::HEVC_PROFILE_MAIN_10_HDR10)}, - {Tag::VIDEO_H265_LEVEL, static_cast(Plugin::HEVCLevel::HEVC_LEVEL_41)}, - {Tag::VIDEO_CHROMA_LOCATION, static_cast(Plugin::ChromaLocation::BOTTOM)}, - {Tag::MEDIA_FILE_TYPE, static_cast(Plugin::FileType::AMR)}, - {Tag::VIDEO_ENCODE_BITRATE_MODE, static_cast(Plugin::VideoEncodeBitrateMode::CBR)}, + {Tag::SRC_INPUT_TYPE, static_cast(Plugins::SrcInputType::AUD_ES)}, + {Tag::AUDIO_SAMPLE_FORMAT, static_cast(Plugins::AudioSampleFormat::SAMPLE_S16LE)}, + {Tag::VIDEO_PIXEL_FORMAT, static_cast(Plugins::VideoPixelFormat::YUV411P)}, + {Tag::MEDIA_TYPE, static_cast(Plugins::MediaType::AUDIO)}, + {Tag::VIDEO_H264_PROFILE, static_cast(Plugins::VideoH264Profile::BASELINE)}, + {Tag::VIDEO_ROTATION, static_cast(Plugins::VideoRotation::VIDEO_ROTATION_90)}, + {Tag::VIDEO_COLOR_PRIMARIES, static_cast(Plugins::ColorPrimary::BT2020)}, + {Tag::VIDEO_COLOR_TRC, static_cast(Plugins::TransferCharacteristic::BT1361)}, + {Tag::VIDEO_COLOR_MATRIX_COEFF, static_cast(Plugins::MatrixCoefficient::BT2020_CL)}, + {Tag::VIDEO_H265_PROFILE, static_cast(Plugins::HEVCProfile::HEVC_PROFILE_MAIN_10_HDR10)}, + {Tag::VIDEO_H265_LEVEL, static_cast(Plugins::HEVCLevel::HEVC_LEVEL_41)}, + {Tag::VIDEO_CHROMA_LOCATION, static_cast(Plugins::ChromaLocation::BOTTOM)}, + {Tag::MEDIA_FILE_TYPE, static_cast(Plugins::FileType::AMR)}, + {Tag::VIDEO_ENCODE_BITRATE_MODE, static_cast(Plugins::VideoEncodeBitrateMode::CBR)}, // UINT8_T - {Tag::AUDIO_AAC_PROFILE, static_cast(Plugin::AudioAacProfile::ELD)}, - {Tag::AUDIO_AAC_STREAM_FORMAT, static_cast(Plugin::AudioAacStreamFormat::ADIF)}, + {Tag::AUDIO_AAC_PROFILE, static_cast(Plugins::AudioAacProfile::ELD)}, + {Tag::AUDIO_AAC_STREAM_FORMAT, static_cast(Plugins::AudioAacStreamFormat::ADIF)}, // Bool {Tag::VIDEO_COLOR_RANGE, 1}, {Tag::VIDEO_REQUEST_I_FRAME, 0}, @@ -395,8 +395,8 @@ map testInt64Data = { {Tag::MEDIA_FILE_SIZE, 1234567890007}, {Tag::MEDIA_POSITION, 1234567890008}, {Tag::MEDIA_TIME_STAMP, 1234567890009}, - {Tag::AUDIO_CHANNEL_LAYOUT, static_cast(Plugin::AudioChannelLayout::CH_10POINT2)}, - {Tag::AUDIO_OUTPUT_CHANNEL_LAYOUT, static_cast(Plugin::AudioChannelLayout::HOA_ORDER3_FUMA)} + {Tag::AUDIO_CHANNEL_LAYOUT, static_cast(Plugins::AudioChannelLayout::CH_10POINT2)}, + {Tag::AUDIO_OUTPUT_CHANNEL_LAYOUT, static_cast(Plugins::AudioChannelLayout::HOA_ORDER3_FUMA)} }; /**