forked from External/mediamtx
update gohlslib (#1583)
This commit is contained in:
parent
32d6cb4435
commit
51a1cb9c78
4 changed files with 11 additions and 16 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue