mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
parent
c055c13442
commit
c21c969a8c
10 changed files with 79 additions and 287 deletions
|
|
@ -83,6 +83,9 @@ func TestSource(t *testing.T) {
|
|||
err = w.WriteH264(2*time.Second, 2*time.Second, [][]byte{{5, 2, 3, 4}})
|
||||
require.NoError(t, err)
|
||||
|
||||
err = w.WriteH264(3*time.Second, 3*time.Second, [][]byte{{5, 2, 3, 4}})
|
||||
require.NoError(t, err)
|
||||
|
||||
break
|
||||
}
|
||||
}()
|
||||
|
|
@ -101,16 +104,6 @@ func TestSource(t *testing.T) {
|
|||
|
||||
source += "localhost/teststream"
|
||||
|
||||
n := 0
|
||||
timeNow = func() time.Time {
|
||||
d := time.Date(2009, 5, 20, 22, 15, 25, 427000, time.Local).Add(time.Duration(n) * 2 * time.Second)
|
||||
n++
|
||||
return d
|
||||
}
|
||||
defer func() {
|
||||
timeNow = time.Now
|
||||
}()
|
||||
|
||||
te := test.NewSourceTester(
|
||||
func(p defs.StaticSourceParent) defs.StaticSource {
|
||||
return &Source{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue