mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-05 10:58:11 +08:00
Add hls_delay feature (#3158)
This commit is contained in:
@@ -307,6 +307,7 @@ namespace Hls {
|
||||
const string kSegmentDuration = HLS_FIELD "segDur";
|
||||
const string kSegmentNum = HLS_FIELD "segNum";
|
||||
const string kSegmentKeep = HLS_FIELD "segKeep";
|
||||
const string kSegmentDelay = HLS_FIELD "segDelay";
|
||||
const string kSegmentRetain = HLS_FIELD "segRetain";
|
||||
const string kFileBufSize = HLS_FIELD "fileBufSize";
|
||||
const string kBroadcastRecordTs = HLS_FIELD "broadcastRecordTs";
|
||||
@@ -317,6 +318,7 @@ static onceToken token([]() {
|
||||
mINI::Instance()[kSegmentDuration] = 2;
|
||||
mINI::Instance()[kSegmentNum] = 3;
|
||||
mINI::Instance()[kSegmentKeep] = false;
|
||||
mINI::Instance()[kSegmentDelay] = 0;
|
||||
mINI::Instance()[kSegmentRetain] = 5;
|
||||
mINI::Instance()[kFileBufSize] = 64 * 1024;
|
||||
mINI::Instance()[kBroadcastRecordTs] = false;
|
||||
|
||||
@@ -349,6 +349,8 @@ extern const std::string kSegmentDuration;
|
||||
extern const std::string kSegmentNum;
|
||||
// 如果设置为0,则不保留切片,设置为1则一直保留切片
|
||||
extern const std::string kSegmentKeep;
|
||||
// HLS切片延迟个数,大于0将生成hls_delay.m3u8文件,0则不生成
|
||||
extern const std::string kSegmentDelay;
|
||||
// HLS切片从m3u8文件中移除后,继续保留在磁盘上的个数
|
||||
extern const std::string kSegmentRetain;
|
||||
// HLS文件写缓存大小
|
||||
|
||||
Reference in New Issue
Block a user