提炼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

@@ -53,15 +53,16 @@ void MP4Recorder::createFile() {
+ strTime + ".mp4";
try {
_muxer = std::make_shared<MP4Muxer>(strFileTmp.data());
for(auto &track :_tracks){
_muxer = std::make_shared<MP4Muxer>();
_muxer->openMP4(strFileTmp);
for (auto &track :_tracks) {
//添加track
_muxer->addTrack(track);
}
_strFileTmp = strFileTmp;
_strFile = strFile;
_createFileTicker.resetTime();
}catch(std::exception &ex) {
} catch (std::exception &ex) {
WarnL << ex.what();
}
}