The 'new-pref' property sets the preference to use the new (next) instead of the old (previous) buffer. The default is set to 0.5 to get a similar behaviour as before the change. Value 0.0 makes sure that only frames are shown where it's known that the frame content is visible at that time, always show the old frame until the new frame timestamp is reached. Then, if the next buffer replaces the previous buffer the new buffer is pushed as often as possible until PTS is reached. Before the new buffer was only pushed once the new next buffer arrived. Use GstClockTimeDiff because it's known that the current buffer time is inside the time interval of previous buffer and next buffer the calculation can be done with building absolute values. Special macros are not needed here. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8579>
26 lines
938 B
Plaintext
26 lines
938 B
Plaintext
# Common metadatas to check the videorate element behavior with different
|
|
# framerate specified by previously setting variables with:
|
|
# ```
|
|
# set-global, rate=<test-rate>
|
|
# ```
|
|
# and then `include, location="check-rate-prop.meta" to setup the test with this
|
|
# file
|
|
|
|
meta,
|
|
handles-states=true,
|
|
ignore-eos=true,
|
|
args = {
|
|
"videotestsrc pattern=ball animation-mode=frames ! video/x-raw,format=I420,framerate=30/1,width=320,height=240 ! videorate name=videorate rate=$(rate) ! fakesink sync=true qos=true",
|
|
},
|
|
configs = {
|
|
"$(validateflow), pad=videorate:sink, buffers-checksum=as-id, ignored-event-types={ tag }",
|
|
"$(validateflow), pad=videorate:src, buffers-checksum=as-id, ignored-event-types={ tag }",
|
|
}
|
|
|
|
play
|
|
seek, start=0.0, stop=0.3, flags=accurate+flush, rate=1.0
|
|
crank-clock, expected-elapsed-time=0.0
|
|
crank-clock, repeat=9
|
|
check-position, expected-position=300000000
|
|
stop, on-message=eos
|