mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-26 23:05:55 +08:00
fix: snap manual mode
This commit is contained in:
@@ -17,7 +17,7 @@ snap:
|
||||
snapsavepath: "snaps" # 截图保存路径
|
||||
filter: ".*" # 截图流过滤器,支持正则表达式
|
||||
snapiframeinterval: 3 # 间隔多少帧截图
|
||||
snapmode: 1 # 截图模式:0-时间间隔,1-关键帧间隔
|
||||
snapmode: 1 # 截图模式:0-时间间隔,1-关键帧间隔 2-HTTP请求模式(手动触发)
|
||||
snapquerytimedelta: 3 # 查询截图时允许的最大时间差(秒)
|
||||
```
|
||||
|
||||
|
@@ -222,6 +222,13 @@ func (t *Transformer) Start() (err error) {
|
||||
}
|
||||
|
||||
func (t *Transformer) Go() error {
|
||||
// 检查snapmode是否有效
|
||||
if t.snapMode != 0 && t.snapMode != 1 {
|
||||
t.Debug("invalid snap mode, skip snapshot",
|
||||
"mode", t.snapMode,
|
||||
)
|
||||
return nil
|
||||
}
|
||||
// 1. 通过 TransformJob 获取 Subscriber
|
||||
subscriber := t.TransformJob.Subscriber
|
||||
|
||||
|
Reference in New Issue
Block a user