🐛 FIX: 自动录制没有进入当前录制列表中

This commit is contained in:
dexter
2022-10-11 19:15:02 +08:00
parent 55c1611d83
commit 2594e446df
7 changed files with 48 additions and 32 deletions

8
raw.go
View File

@@ -14,11 +14,17 @@ type RawRecorder struct {
Recorder
}
func (r *RawRecorder) Start(streamPath string) error {
r.Record = &recordConfig.Raw
r.ID = streamPath + "/raw"
return plugin.Subscribe(streamPath, r)
}
func (r *RawRecorder) OnEvent(event any) {
r.Recorder.OnEvent(event)
switch v := event.(type) {
case *RawRecorder:
go r.Start()
go r.start()
case *track.Video:
if r.Ext == "." {
if v.CodecID == codec.CodecID_H264 {