1 2 /* 3 * Copyright (c) 2023-2024 Huawei Device Co., Ltd. 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef HISTREAMER_ABILITY_TOOL_H 18 #define HISTREAMER_ABILITY_TOOL_H 19 20 #include <string> 21 #include <atomic> 22 23 #include "single_instance.h" 24 namespace OHOS { 25 namespace DistributedHardware { 26 enum class HISTREAM_PLUGIN_TYPE : uint8_t { 27 AUDIO_ENCODER, 28 AUDIO_DECODER, 29 VIDEO_ENCODER, 30 VIDEO_DECODER 31 }; 32 33 class HiStreamerQueryTool { 34 DECLARE_SINGLE_INSTANCE(HiStreamerQueryTool); 35 public: 36 std::string QueryHiStreamerPluginInfo(HISTREAM_PLUGIN_TYPE type); 37 private: 38 std::atomic<bool> isInit = false; 39 void Init(); 40 }; 41 } 42 } 43 #endif