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

@@ -38,15 +38,24 @@ Frame::Ptr Frame::getCacheAbleFrame(const Frame::Ptr &frame){
return std::make_shared<FrameCacheAble>(frame);
}
FrameStamp::FrameStamp(Frame::Ptr frame, Stamp &stamp, int modify_stamp)
{
FrameStamp::FrameStamp(Frame::Ptr frame) {
setIndex(frame->getIndex());
_frame = std::move(frame);
}
FrameStamp::FrameStamp(Frame::Ptr frame, Stamp &stamp, int modify_stamp)
: FrameStamp(std::move(frame)) {
// kModifyStampSystem时采用系统时间戳kModifyStampRelative采用相对时间戳 [AUTO-TRANSLATED:54dd5685]
// When using kModifyStampSystem, the system timestamp is used, and when using kModifyStampRelative, the relative timestamp is used.
stamp.revise(_frame->dts(), _frame->pts(), _dts, _pts, modify_stamp == ProtocolOption::kModifyStampSystem);
}
void FrameStamp::setStamp(int64_t dts, int64_t pts) {
_dts = dts;
_pts = pts;
}
TrackType getTrackType(CodecId codecId) {
switch (codecId) {
#define XX(name, type, value, str, mpeg_id, mp4_id) case name : return type;