mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
parent
3c703052f6
commit
500d18b6c6
10 changed files with 287 additions and 79 deletions
|
|
@ -18,6 +18,8 @@ import (
|
|||
"github.com/bluenviron/mediamtx/internal/stream"
|
||||
)
|
||||
|
||||
var timeNow = time.Now
|
||||
|
||||
// Source is a RTMP static source.
|
||||
type Source struct {
|
||||
ReadTimeout conf.Duration
|
||||
|
|
@ -86,7 +88,8 @@ func (s *Source) runReader(ctx context.Context, u *url.URL, fingerprint string)
|
|||
}
|
||||
|
||||
r := &rtmp.Reader{
|
||||
Conn: conn,
|
||||
Conn: conn,
|
||||
TimeNow: timeNow,
|
||||
}
|
||||
err = r.Initialize()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue