fix: multiple record

This commit is contained in:
langhuihui
2024-05-17 17:12:57 +08:00
parent cfa781bce2
commit 3398f50bad
9 changed files with 48 additions and 39 deletions

9
raw.go
View File

@@ -31,6 +31,15 @@ func (r *RawRecorder) Start(streamPath string) error {
}
return r.start(r, streamPath, SUBTYPE_RAW)
}
func (r *RawRecorder) StartWithFileName(streamPath string, fileName string) error {
r.ID = streamPath + "/raw/" + fileName
if r.IsAudio {
r.ID += "_audio"
}
return r.start(r, streamPath, SUBTYPE_RAW)
}
func (r *RawRecorder) Close() (err error) {
if r.File != nil {
err = r.File.Close()