• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "codec_plugins_capability.h"
17 #include "media_log.h"
18 
19 namespace {
20     constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, LOG_DOMAIN, "CodecPluginsCapability"};
21 }
22 
23 namespace OHOS {
24 namespace Media {
GetInstance()25 CodecPluginsCapability& CodecPluginsCapability::GetInstance()
26 {
27     static CodecPluginsCapability instance;
28     return instance;
29 }
30 
CodecPluginsCapability()31 CodecPluginsCapability::CodecPluginsCapability()
32 {
33     MEDIA_LOGD("0x%{public}06" PRIXPTR " Instances create", FAKE_POINTER(this));
34 }
35 
~CodecPluginsCapability()36 CodecPluginsCapability::~CodecPluginsCapability()
37 {
38     MEDIA_LOGD("0x%{public}06" PRIXPTR " Instances destroy", FAKE_POINTER(this));
39 }
40 
RegisterCapabilitys(std::vector<CapabilityData> data)41 void CodecPluginsCapability::RegisterCapabilitys(std::vector<CapabilityData> data)
42 {
43     capabilityDataArray_.insert(capabilityDataArray_.end(), data.begin(), data.end());
44 }
45 
GetCodecPluginsCapability()46 std::vector<CapabilityData> CodecPluginsCapability::GetCodecPluginsCapability()
47 {
48     return capabilityDataArray_;
49 }
50 } // namespace Media
51 } // namespace OHOS