提炼MP4相关接口和代码

This commit is contained in:
xiongziliang
2020-09-20 19:45:04 +08:00
parent 2dd1046131
commit 071d0a9fd1
9 changed files with 179 additions and 61 deletions

View File

@@ -29,7 +29,8 @@ MP4Reader::MP4Reader(const string &strVhost,const string &strApp, const string &
strFileName = File::absolutePath(strFileName,recordPath);
}
_demuxer = std::make_shared<MP4Demuxer>(strFileName.data());
_demuxer = std::make_shared<MP4Demuxer>();
_demuxer->openMP4(strFileName);
_mediaMuxer.reset(new MultiMediaSourceMuxer(strVhost, strApp, strId, _demuxer->getDurationMS() / 1000.0, true, true, false, false));
auto tracks = _demuxer->getTracks(false);
if(tracks.empty()){