Add optional customized_path parameter for startRecord

This commit is contained in:
Gemfield
2020-01-02 12:47:12 +08:00
parent 84de9720b5
commit e31c1ee207
7 changed files with 29 additions and 18 deletions

View File

@@ -58,8 +58,9 @@ string HlsMakerImp::onOpenSegment(int index) {
string segment_name , segment_path;
{
auto strDate = getTimeStr("%Y-%m-%d");
auto strTime = getTimeStr("%H-%M-%S");
segment_name = StrPrinter << strDate + "/" + strTime << "_" << index << ".ts";
auto strHour = getTimeStr("%H");
auto strTime = getTimeStr("%M-%S");
segment_name = StrPrinter << strDate + "/" + strHour + "/" + strTime << "_" << index << ".ts";
segment_path = _path_prefix + "/" + segment_name;
if(isLive()){
_segment_file_paths.emplace(index,segment_path);