统一 mp4 及 ts 录像信息定义

This commit is contained in:
wxf
2020-09-15 19:09:26 +08:00
parent b22a6e3dbd
commit 748bb8e488
7 changed files with 56 additions and 32 deletions

View File

@@ -20,24 +20,12 @@
#include "Util/TimeTicker.h"
#include "Common/MediaSink.h"
#include "MP4Muxer.h"
#include "RecordInfo.h"
using namespace toolkit;
namespace mediakit {
class MP4Info {
public:
time_t ui64StartedTime; //GMT标准时间单位秒
time_t ui64TimeLen;//录像长度,单位秒
off_t ui64FileSize;//文件大小单位BYTE
string strFilePath;//文件路径
string strFileName;//文件名称
string strFolder;//文件夹路径
string strUrl;//播放路径
string strAppName;//应用名称
string strStreamId;//流ID
string strVhost;//vhost
};
#ifdef ENABLE_MP4
class MP4Recorder : public MediaSinkInterface{
public:
@@ -72,7 +60,7 @@ private:
string _strFile;
string _strFileTmp;
Ticker _createFileTicker;
MP4Info _info;
RecordInfo _info;
bool _haveVideo = false;
MP4Muxer::Ptr _muxer;
list<Track::Ptr> _tracks;