mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-12-02 00:12:33 +08:00
完善写mp4文件
This commit is contained in:
parent
6c0d89f417
commit
13a6d3ac16
@ -147,11 +147,12 @@ void Mp4Maker::onTrackFrame(const Frame::Ptr &frame) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mp4Maker::onAllTrackReady() {
|
void Mp4Maker::onTrackReady(const Track::Ptr & track){
|
||||||
//保存所有的track,为创建MP4MuxerFile做准备
|
//保存所有的track,为创建MP4MuxerFile做准备
|
||||||
_tracks.emplace_back(getTrack(TrackVideo));
|
_tracks.emplace_back(track);
|
||||||
_tracks.emplace_back(getTrack(TrackAudio));
|
if(track->getTrackType() == TrackVideo){
|
||||||
_haveVideo = getTrack(TrackVideo).operator bool();
|
_haveVideo = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace mediakit */
|
} /* namespace mediakit */
|
||||||
|
@ -71,9 +71,11 @@ private:
|
|||||||
void onTrackFrame(const Frame::Ptr &frame) override ;
|
void onTrackFrame(const Frame::Ptr &frame) override ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所有Track准备好了
|
* 某track已经准备好,其ready()状态返回true,
|
||||||
|
* 此时代表可以获取其例如sps pps等相关信息了
|
||||||
|
* @param track
|
||||||
*/
|
*/
|
||||||
void onAllTrackReady() override;
|
void onTrackReady(const Track::Ptr & track) override;
|
||||||
private:
|
private:
|
||||||
void createFile();
|
void createFile();
|
||||||
void closeFile();
|
void closeFile();
|
||||||
|
Loading…
Reference in New Issue
Block a user