mirror of
https://github.com/datarhei/core.git
synced 2025-10-06 08:27:08 +08:00
Fix parser tests
This commit is contained in:
@@ -184,15 +184,16 @@ func TestParserLogHistory(t *testing.T) {
|
|||||||
|
|
||||||
d, _ := time.ParseDuration("3m58s440ms")
|
d, _ := time.ParseDuration("3m58s440ms")
|
||||||
require.Equal(t, Progress{
|
require.Equal(t, Progress{
|
||||||
Frame: 5968,
|
Initialized: true,
|
||||||
FPS: 0, // is calculated with averager
|
Frame: 5968,
|
||||||
Quantizer: 19.4,
|
FPS: 0, // is calculated with averager
|
||||||
Size: 453632,
|
Quantizer: 19.4,
|
||||||
Time: d.Seconds(),
|
Size: 453632,
|
||||||
Bitrate: 0, // is calculated with averager
|
Time: d.Seconds(),
|
||||||
Speed: 0.999,
|
Bitrate: 0, // is calculated with averager
|
||||||
Drop: 3522,
|
Speed: 0.999,
|
||||||
Dup: 87463,
|
Drop: 3522,
|
||||||
|
Dup: 87463,
|
||||||
}, history[i].Progress)
|
}, history[i].Progress)
|
||||||
|
|
||||||
if i != 0 {
|
if i != 0 {
|
||||||
@@ -250,15 +251,16 @@ func TestParserLogMinimalHistoryLength(t *testing.T) {
|
|||||||
|
|
||||||
d, _ := time.ParseDuration("3m58s440ms")
|
d, _ := time.ParseDuration("3m58s440ms")
|
||||||
require.Equal(t, Progress{
|
require.Equal(t, Progress{
|
||||||
Frame: 5968,
|
Initialized: true,
|
||||||
FPS: 0, // is calculated with averager
|
Frame: 5968,
|
||||||
Quantizer: 19.4,
|
FPS: 0, // is calculated with averager
|
||||||
Size: 453632,
|
Quantizer: 19.4,
|
||||||
Time: d.Seconds(),
|
Size: 453632,
|
||||||
Bitrate: 0, // is calculated with averager
|
Time: d.Seconds(),
|
||||||
Speed: 0.999,
|
Bitrate: 0, // is calculated with averager
|
||||||
Drop: 3522,
|
Speed: 0.999,
|
||||||
Dup: 87463,
|
Drop: 3522,
|
||||||
|
Dup: 87463,
|
||||||
}, history[i].Progress)
|
}, history[i].Progress)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,15 +269,16 @@ func TestParserLogMinimalHistoryLength(t *testing.T) {
|
|||||||
|
|
||||||
d, _ := time.ParseDuration("3m58s440ms")
|
d, _ := time.ParseDuration("3m58s440ms")
|
||||||
require.Equal(t, Progress{
|
require.Equal(t, Progress{
|
||||||
Frame: 5968,
|
Initialized: true,
|
||||||
FPS: 0, // is calculated with averager
|
Frame: 5968,
|
||||||
Quantizer: 19.4,
|
FPS: 0, // is calculated with averager
|
||||||
Size: 453632,
|
Quantizer: 19.4,
|
||||||
Time: d.Seconds(),
|
Size: 453632,
|
||||||
Bitrate: 0, // is calculated with averager
|
Time: d.Seconds(),
|
||||||
Speed: 0.999,
|
Bitrate: 0, // is calculated with averager
|
||||||
Drop: 3522,
|
Speed: 0.999,
|
||||||
Dup: 87463,
|
Drop: 3522,
|
||||||
|
Dup: 87463,
|
||||||
}, history[i].Progress)
|
}, history[i].Progress)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -810,6 +813,7 @@ func TestParserProgressPlayout(t *testing.T) {
|
|||||||
progress := parser.Progress()
|
progress := parser.Progress()
|
||||||
|
|
||||||
require.Equal(t, Progress{
|
require.Equal(t, Progress{
|
||||||
|
Initialized: true,
|
||||||
Input: []ProgressIO{
|
Input: []ProgressIO{
|
||||||
{
|
{
|
||||||
Address: "playout:https://cdn.livespotting.com/vpu/e9slfpe3/z60wzayk.m3u8",
|
Address: "playout:https://cdn.livespotting.com/vpu/e9slfpe3/z60wzayk.m3u8",
|
||||||
|
Reference in New Issue
Block a user