hls保存ts文件时根据日期、时间保存

This commit is contained in:
xiongziliang
2019-12-12 22:58:31 +08:00
parent ee66d945e8
commit 5fe5dd9de6
4 changed files with 22 additions and 33 deletions

View File

@@ -49,9 +49,9 @@ protected:
void onWriteSegment(const char *data, int len) override;
void onWriteHls(const char *data, int len) override;
private:
string fullPath(int index);
std::shared_ptr<FILE> makeFile(const string &file,bool setbuf = false);
private:
map<int /*index*/,string/*file_path*/> _segment_file_paths;
std::shared_ptr<FILE> _file;
std::shared_ptr<char> _file_buf;
string _path_prefix;