mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-20 22:29:50 +08:00
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/bluenviron/mediamtx/internal/formatprocessor"
|
||||
"github.com/bluenviron/mediamtx/internal/logger"
|
||||
"github.com/bluenviron/mediamtx/internal/rpicamera"
|
||||
"github.com/bluenviron/mediamtx/internal/stream"
|
||||
)
|
||||
|
||||
func paramsFromConf(cnf *conf.PathConf) rpicamera.Params {
|
||||
@@ -82,7 +83,7 @@ func (s *rpiCameraSource) run(ctx context.Context, cnf *conf.PathConf, reloadCon
|
||||
}},
|
||||
}
|
||||
medias := media.Medias{medi}
|
||||
var stream *stream
|
||||
var stream *stream.Stream
|
||||
|
||||
onData := func(dts time.Duration, au [][]byte) {
|
||||
if stream == nil {
|
||||
@@ -98,7 +99,7 @@ func (s *rpiCameraSource) run(ctx context.Context, cnf *conf.PathConf, reloadCon
|
||||
stream = res.stream
|
||||
}
|
||||
|
||||
stream.writeUnit(medi, medi.Formats[0], &formatprocessor.UnitH264{
|
||||
stream.WriteUnit(medi, medi.Formats[0], &formatprocessor.UnitH264{
|
||||
PTS: dts,
|
||||
AU: au,
|
||||
NTP: time.Now(),
|
||||
|
Reference in New Issue
Block a user