mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
samples: Fix Tutorial4 by making it actually seek at some point.
Thanks to "tomislavtustonic" for the bug report and patch. Also make the seek "Flushing" as the C tutorial. https://bugzilla.gnome.org/show_bug.cgi?id=796184
This commit is contained in:
parent
936e5b8f32
commit
c40730fe93
1 changed files with 4 additions and 4 deletions
|
@ -66,11 +66,11 @@ namespace GstreamerSharp
|
|||
}
|
||||
|
||||
// Print current position and total duration
|
||||
Console.WriteLine ("Position {0} / {1}", new TimeSpan (current), new TimeSpan (duration));
|
||||
Console.Write("Position {0} / {1}\r", new TimeSpan (current), new TimeSpan (duration));
|
||||
|
||||
if (seekEnabled && seekDone && current > 10L * Constants.SECOND) {
|
||||
Console.WriteLine ("Readed 10s, performing seek...");
|
||||
playbin.SeekSimple (fmt, SeekFlags.KeyUnit, 30L * Constants.SECOND);
|
||||
if (seekEnabled && !seekDone && current > 10L * Constants.SECOND) {
|
||||
Console.WriteLine ("\nRead 10s, performing seek...");
|
||||
playbin.SeekSimple (fmt, SeekFlags.KeyUnit | SeekFlags.Flush, 30L * Constants.SECOND);
|
||||
seekDone = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue