From 252709eeb98550a83c46a134d55f11234f377640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=8E=E7=91=9E=E7=85=9C?= Date: Mon, 6 Jan 2025 15:39:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9Edemuxer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 明瑞煜 --- interface/inner_api/meta/media_types.h | 3 + interface/inner_api/plugin/plugin_list.h | 6 ++ src/plugin/plugin_list.cpp | 76 +++++++++++++++++------- 3 files changed, 63 insertions(+), 22 deletions(-) diff --git a/interface/inner_api/meta/media_types.h b/interface/inner_api/meta/media_types.h index 246719f2..afe920a4 100644 --- a/interface/inner_api/meta/media_types.h +++ b/interface/inner_api/meta/media_types.h @@ -144,6 +144,9 @@ enum class FileType : int32_t { MPEGTS = 102, MKV = 103, FLV = 104, + AVI = 105, + MPEGPS =106, + MOV = 107, AMR = 201, AAC = 202, MP3 = 203, diff --git a/interface/inner_api/plugin/plugin_list.h b/interface/inner_api/plugin/plugin_list.h index b1c6c2ce..14e46892 100644 --- a/interface/inner_api/plugin/plugin_list.h +++ b/interface/inner_api/plugin/plugin_list.h @@ -60,6 +60,12 @@ private: void AddMovDemuxerPlugin(); void AddMp3DemuxerPlugin(); void AddMpegDemuxerPlugin(); + void AddMpegtsDemuxerPlugin(); + void AddAviDemuxerPlugin(); + void AddSrtDemuxerPlugin(); + void AddWebvttDemuxerPlugin(); + void AddOggDemuxerPlugin(); + void AddWavDemuxerPlugin(); void AddFFmpegDemuxerPlugins(); void AddMpegAudioDecoderPlugin(); void AddAacAudioDecoderPlugin(); diff --git a/src/plugin/plugin_list.cpp b/src/plugin/plugin_list.cpp index f0821b80..7b302483 100644 --- a/src/plugin/plugin_list.cpp +++ b/src/plugin/plugin_list.cpp @@ -299,22 +299,30 @@ void PluginList::AddMpegDemuxerPlugin() pluginDescriptionList_.push_back(mpegDemuxerPlugin); } -void PluginList::AddFFmpegDemuxerPlugins() +void PluginList::AddMpegtsDemuxerPlugin() { - AddAacDemuxerPlugin(); - AddAmrDemuxerPlugin(); - AddAmrnbDemuxerPlugin(); - AddAmrwbDemuxerPlugin(); - AddApeDemuxerPlugin(); - AddAsfDemuxerPlugin(); - AddAsfoDemuxerPlugin(); - AddFlacDemuxerPlugin(); - AddFlvDemuxerPlugin(); - AddMatroskaDemuxerPlugin(); - AddMovDemuxerPlugin(); - AddMp3DemuxerPlugin(); - AddMpegDemuxerPlugin(); + PluginDescription mpegtsDemuxerPlugin; + mpegtsDemuxerPlugin.pluginName = "avdemux_mpegts"; + mpegtsDemuxerPlugin.packageName = "FFmpegDemuxer"; + mpegtsDemuxerPlugin.pluginType = PluginType::DEMUXER; + mpegtsDemuxerPlugin.cap = ""; + mpegtsDemuxerPlugin.rank = DEFAULT_RANK; + pluginDescriptionList_.push_back(mpegtsDemuxerPlugin); +} +void PluginList::AddAviDemuxerPlugin() +{ + PluginDescription aviDemuxerPlugin; + aviDemuxerPlugin.pluginName = "avdemux_avi"; + aviDemuxerPlugin.packageName = "FFmpegDemuxer"; + aviDemuxerPlugin.pluginType = PluginType::DEMUXER; + aviDemuxerPlugin.cap = ""; + aviDemuxerPlugin.rank = DEFAULT_RANK; + pluginDescriptionList_.push_back(aviDemuxerPlugin); +} + +void PluginList::AddSrtDemuxerPlugin() +{ PluginDescription srtDemuxerPlugin; srtDemuxerPlugin.pluginName = "avdemux_srt"; srtDemuxerPlugin.packageName = "FFmpegDemuxer"; @@ -322,7 +330,10 @@ void PluginList::AddFFmpegDemuxerPlugins() srtDemuxerPlugin.cap = ""; srtDemuxerPlugin.rank = DEFAULT_RANK; pluginDescriptionList_.push_back(srtDemuxerPlugin); +} +void PluginList::AddWebvttDemuxerPlugin() +{ PluginDescription vttDemuxerPlugin; vttDemuxerPlugin.pluginName = "avdemux_webvtt"; vttDemuxerPlugin.packageName = "FFmpegDemuxer"; @@ -330,15 +341,10 @@ void PluginList::AddFFmpegDemuxerPlugins() vttDemuxerPlugin.cap = ""; vttDemuxerPlugin.rank = DEFAULT_RANK; pluginDescriptionList_.push_back(vttDemuxerPlugin); +} - PluginDescription mpegtsDemuxerPlugin; - mpegtsDemuxerPlugin.pluginName = "avdemux_mpegts"; - mpegtsDemuxerPlugin.packageName = "FFmpegDemuxer"; - mpegtsDemuxerPlugin.pluginType = PluginType::DEMUXER; - mpegtsDemuxerPlugin.cap = ""; - mpegtsDemuxerPlugin.rank = DEFAULT_RANK; - pluginDescriptionList_.push_back(mpegtsDemuxerPlugin); - +void PluginList::AddOggDemuxerPlugin() +{ PluginDescription oggDemuxerPlugin; oggDemuxerPlugin.pluginName = "avdemux_ogg"; oggDemuxerPlugin.packageName = "FFmpegDemuxer"; @@ -346,7 +352,10 @@ void PluginList::AddFFmpegDemuxerPlugins() oggDemuxerPlugin.cap = ""; oggDemuxerPlugin.rank = DEFAULT_RANK; pluginDescriptionList_.push_back(oggDemuxerPlugin); +} +void PluginList::AddWavDemuxerPlugin() +{ PluginDescription wavDemuxerPlugin; wavDemuxerPlugin.pluginName = "avdemux_wav"; wavDemuxerPlugin.packageName = "FFmpegDemuxer"; @@ -356,6 +365,29 @@ void PluginList::AddFFmpegDemuxerPlugins() pluginDescriptionList_.push_back(wavDemuxerPlugin); } +void PluginList::AddFFmpegDemuxerPlugins() +{ + AddAacDemuxerPlugin(); + AddAmrDemuxerPlugin(); + AddAmrnbDemuxerPlugin(); + AddAmrwbDemuxerPlugin(); + AddApeDemuxerPlugin(); + AddAsfDemuxerPlugin(); + AddAsfoDemuxerPlugin(); + AddFlacDemuxerPlugin(); + AddFlvDemuxerPlugin(); + AddMatroskaDemuxerPlugin(); + AddMovDemuxerPlugin(); + AddMp3DemuxerPlugin(); + AddMpegDemuxerPlugin(); + AddMpegtsDemuxerPlugin(); + AddAviDemuxerPlugin(); + AddSrtDemuxerPlugin(); + AddWebvttDemuxerPlugin(); + AddOggDemuxerPlugin(); + AddWavDemuxerPlugin(); +} + void PluginList::AddMpegAudioDecoderPlugin() { PluginDescription mpegAudioDecoderPlugin; -- Gitee From 89ac39959186b2f07bea67a444cf95af87266c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=8E=E7=91=9E=E7=85=9C?= Date: Mon, 6 Jan 2025 07:51:44 +0000 Subject: [PATCH 2/2] update interface/inner_api/meta/media_types.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 明瑞煜 --- interface/inner_api/meta/media_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/inner_api/meta/media_types.h b/interface/inner_api/meta/media_types.h index afe920a4..b533e96b 100644 --- a/interface/inner_api/meta/media_types.h +++ b/interface/inner_api/meta/media_types.h @@ -145,7 +145,7 @@ enum class FileType : int32_t { MKV = 103, FLV = 104, AVI = 105, - MPEGPS =106, + MPEGPS = 106, MOV = 107, AMR = 201, AAC = 202, -- Gitee