• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 #ifndef OHOS_CJ_AVSESSION_MEDIA_DESCRIPTION_H
17 #define OHOS_CJ_AVSESSION_MEDIA_DESCRIPTION_H
18 
19 #include <map>
20 #include <string>
21 
22 #include "singleton.h"
23 #include "cj_avsession_prototypes.h"
24 
25 namespace OHOS::AVSession {
26 
27 class FfiMediaDescriptionHelper {
28     DECLARE_DELAYED_SINGLETON(FfiMediaDescriptionHelper);
29 public:
30     DISALLOW_COPY_AND_MOVE(FfiMediaDescriptionHelper);
31     int32_t GetMediaDescriptionDisplayTags(CAVMediaDescription &mediaDescription);
32     int32_t SetMediaDescriptionDisplayTags(const CAVMediaDescription &mediaDescription);
33 
34     int32_t GetMediaDescriptionDataSrc(CAVMediaDescription &mediaDescription);
35     int32_t SetMediaDescriptionDataSrc(const CAVMediaDescription &mediaDescription);
36 
37 private:
38     std::map<std::string, int32_t> displayTagsMap;
39     std::map<std::string, CAVDataSrcDescriptor> dataSrcMap;
40 };
41 
42 #define FFI_MD_HELPER OHOS::DelayedSingleton<FfiMediaDescriptionHelper>::GetInstance()
43 
44 } // namespace AVSession::OHOS
45 
46 #endif // OHOS_CJ_AVSESSION_MEDIA_DESCRIPTION_H