• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-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 #ifndef HISTREAMER_FFMPEG_TRACK_META_H
17 #define HISTREAMER_FFMPEG_TRACK_META_H
18 
19 #include <memory>
20 #include <vector>
21 #include "plugin/common/plugin_tags.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 #include "libavformat/avformat.h"
27 #include "libavcodec/avcodec.h"
28 #ifdef __cplusplus
29 };
30 #endif
31 
32 namespace OHOS {
33 namespace Media {
34 namespace Plugin {
35 namespace Ffmpeg {
36 void ConvertRawAudioStreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context,
37                                      TagMap& meta);
38 
39 void ConvertMP1StreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context, TagMap& meta);
40 
41 void ConvertMP2StreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context, TagMap& meta);
42 
43 void ConvertMP3StreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context, TagMap& meta);
44 
45 void ConvertAACStreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context, TagMap& meta);
46 
47 void ConvertAACLatmStreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context,
48                                     TagMap& meta);
49 
50 #ifdef VIDEO_SUPPORT
51 void ConvertAVCStreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context, TagMap& meta);
52 #endif
53 
54 void ConvertAVStreamToMetaInfo(const AVStream& avStream, const std::shared_ptr<AVCodecContext>& context, TagMap& meta);
55 } // namespace Ffmpeg
56 } // namespace Plugin
57 } // namespace Media
58 } // namespace OHOS
59 #endif // HISTREAMER_FFMPEG_TRACK_META_H
60