MP4 reader supports loading multi files

This commit is contained in:
xia-chu
2024-10-13 00:25:40 +08:00
parent e4025a6811
commit 61a93fab6a
6 changed files with 158 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ void MP4Reader::setup(const MediaTuple &tuple, const std::string &file_path, con
_file_path = File::absolutePath(_file_path, recordPath);
}
_demuxer = std::make_shared<MP4Demuxer>();
_demuxer = std::make_shared<MultiMP4Demuxer>();
_demuxer->openMP4(_file_path);
if (tuple.stream.empty()) {
@@ -164,7 +164,7 @@ void MP4Reader::startReadMP4(uint64_t sample_ms, bool ref_self, bool file_repeat
_file_repeat = file_repeat;
}
const MP4Demuxer::Ptr &MP4Reader::getDemuxer() const {
const MultiMP4Demuxer::Ptr &MP4Reader::getDemuxer() const {
return _demuxer;
}