mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-15 14:52:04 +00:00
fmp4mux: Crank clock for the first fragment in more tests
Due to how aggregator works, it depends on how buffers are pulled whether aggregate() is called again or it is waiting for a timeout or EOS: works: - pad 1: 4 buffers, pad 2: 4 buffers - aggregate ready: take all 4/4 buffers - pad 1: 1 buffers, pad 2: 1 buffer - aggregate ready: take all 1/1 buffers waits: - pad 1: 5 buffers, pad 2: 4 buffers - aggregate ready: take all 5/4 buffers - pad 1: 0 buffers, pad 2: 1 buffer - aggregate not ready: waiting for timeout or EOS Also don't manually set the clock time as that's unnecessary. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/274 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/999>
This commit is contained in:
parent
08799d242c
commit
a7c75f8066
1 changed files with 11 additions and 4 deletions
|
@ -77,6 +77,9 @@ fn test_buffer_flags_single_stream(cmaf: bool, set_dts: bool, caps: gst::Caps) {
|
|||
}
|
||||
}
|
||||
|
||||
// Crank the clock: this should bring us to the end of the first fragment
|
||||
h.crank_single_clock_wait().unwrap();
|
||||
|
||||
let header = h.pull().unwrap();
|
||||
assert_eq!(
|
||||
header.flags(),
|
||||
|
@ -312,6 +315,9 @@ fn test_buffer_flags_multi_stream() {
|
|||
}
|
||||
}
|
||||
|
||||
// Crank the clock: this should bring us to the end of the first fragment
|
||||
h1.crank_single_clock_wait().unwrap();
|
||||
|
||||
let header = h1.pull().unwrap();
|
||||
assert_eq!(
|
||||
header.flags(),
|
||||
|
@ -509,8 +515,7 @@ fn test_live_timeout() {
|
|||
}
|
||||
}
|
||||
|
||||
// Advance time and crank the clock: this should bring us to the end of the first fragment
|
||||
h1.set_time(5.seconds()).unwrap();
|
||||
// Crank the clock: this should bring us to the end of the first fragment
|
||||
h1.crank_single_clock_wait().unwrap();
|
||||
|
||||
let header = h1.pull().unwrap();
|
||||
|
@ -728,8 +733,7 @@ fn test_gap_events() {
|
|||
}
|
||||
}
|
||||
|
||||
// Advance time and crank the clock: this should bring us to the end of the first fragment
|
||||
h1.set_time(5.seconds()).unwrap();
|
||||
// Crank the clock: this should bring us to the end of the first fragment
|
||||
h1.crank_single_clock_wait().unwrap();
|
||||
|
||||
let header = h1.pull().unwrap();
|
||||
|
@ -1019,6 +1023,9 @@ fn test_single_stream_long_gops() {
|
|||
}
|
||||
}
|
||||
|
||||
// Crank the clock: this should bring us to the end of the first fragment
|
||||
h.crank_single_clock_wait().unwrap();
|
||||
|
||||
let header = h.pull().unwrap();
|
||||
assert_eq!(
|
||||
header.flags(),
|
||||
|
|
Loading…
Reference in a new issue