mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-05 23:56:54 +08:00
update gohlslib (#1583)
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/aler9/rtsp-simple-server/internal/formatprocessor"
|
||||
"github.com/aler9/rtsp-simple-server/internal/logger"
|
||||
"github.com/bluenviron/gohlslib"
|
||||
hlslogger "github.com/bluenviron/gohlslib/pkg/logger"
|
||||
)
|
||||
|
||||
type hlsSourceParent interface {
|
||||
@@ -24,12 +23,6 @@ type hlsSource struct {
|
||||
parent hlsSourceParent
|
||||
}
|
||||
|
||||
type hlsLoggerWrapper func(level logger.Level, format string, args ...interface{})
|
||||
|
||||
func (w hlsLoggerWrapper) Log(level hlslogger.Level, format string, args ...interface{}) {
|
||||
w(logger.Level(level), format, args)
|
||||
}
|
||||
|
||||
func newHLSSource(
|
||||
parent hlsSourceParent,
|
||||
) *hlsSource {
|
||||
@@ -55,7 +48,9 @@ func (s *hlsSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf chan
|
||||
c := &gohlslib.Client{
|
||||
URI: cnf.Source,
|
||||
Fingerprint: cnf.SourceFingerprint,
|
||||
Logger: hlsLoggerWrapper(s.Log),
|
||||
Log: func(level gohlslib.LogLevel, format string, args ...interface{}) {
|
||||
s.Log(logger.Level(level), format, args...)
|
||||
},
|
||||
}
|
||||
|
||||
c.OnTracks(func(tracks []format.Format) error {
|
||||
|
Reference in New Issue
Block a user