[longomatch] Make sure the scale value is properly calculated from the rate. This was corrupting the event playba
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Make sure the scale value is properly calculated from the rate. This was corrupting the event playba
- Date: Sat, 7 Feb 2015 10:12:49 +0000 (UTC)
commit 83f2ea1dfd670ae5dba47e751d9aad1d3e0be759
Author: Julien Moutte <julien fluendo com>
Date: Fri Feb 6 17:31:28 2015 +0100
Make sure the scale value is properly calculated from the rate.
This was corrupting the event playback rate stored and used for rendering.
LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
index 9df25e3..f81767a 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
@@ -393,7 +393,7 @@ namespace LongoMatch.Gui
}
segment.Start = new Time (-1);
segment.Stop = new Time (int.MaxValue);
- SetScaleValue (SCALE_FPS);
+ SetScaleValue (1);
//timescale.Sensitive = true;
loadedPlay = null;
}
@@ -523,7 +523,7 @@ namespace LongoMatch.Gui
if (readyToSeek) {
Log.Debug ("Player is ready to seek, seeking to " +
seekTime.ToMSecondsString ());
- SetScaleValue ((int)(rate * SCALE_FPS));
+ SetScaleValue (rate);
player.Rate = (double)rate;
Seek (seekTime, true);
if (playing) {
@@ -580,10 +580,14 @@ namespace LongoMatch.Gui
LoadImage (CurrentFrame, drawing);
}
- void SetScaleValue (int value)
+ void SetScaleValue (float rate)
{
emitRateScale = false;
- vscale1.Value = value;
+ if (rate > 1) {
+ vscale1.Value = rate - 1 + SCALE_FPS;
+ } else {
+ vscale1.Value = rate * SCALE_FPS;
+ }
emitRateScale = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]