mirror of
https://github.com/Monibuca/plugin-record.git
synced 2025-10-07 01:33:14 +08:00
适配引擎的升级
This commit is contained in:
16
raw.go
16
raw.go
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
. "m7s.live/engine/v4"
|
||||
"m7s.live/engine/v4/codec"
|
||||
"m7s.live/engine/v4/common"
|
||||
"m7s.live/engine/v4/track"
|
||||
)
|
||||
|
||||
@@ -36,22 +37,19 @@ func (r *RawRecorder) OnEvent(event any) {
|
||||
r.Ext = ".h265"
|
||||
}
|
||||
}
|
||||
case VideoDeConf:
|
||||
annexB := v.GetAnnexB()
|
||||
annexB.WriteTo(r)
|
||||
case *VideoFrame:
|
||||
case common.ParamaterSets:
|
||||
v.WriteAnnexBTo(r)
|
||||
case VideoFrame:
|
||||
if r.Fragment != 0 && r.newFile {
|
||||
r.newFile = false
|
||||
r.Close()
|
||||
if file, err := r.CreateFileFn(filepath.Join(r.Stream.Path, strconv.FormatInt(time.Now().Unix(), 10)+r.Ext), false); err == nil {
|
||||
r.SetIO(file)
|
||||
if r.Video.Track != nil {
|
||||
annexB := VideoDeConf(r.Video.Track.DecoderConfiguration).GetAnnexB()
|
||||
annexB.WriteTo(r)
|
||||
if r.Video != nil {
|
||||
r.Video.ParamaterSets.WriteAnnexBTo(r)
|
||||
}
|
||||
}
|
||||
}
|
||||
annexB := v.GetAnnexB()
|
||||
annexB.WriteTo(r)
|
||||
v.WriteAnnexBTo(r)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user