[longomatch/fakelive: 21/24] Fix timing in fake capturer
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/fakelive: 21/24] Fix timing in fake capturer
- Date: Thu, 4 Mar 2010 21:43:42 +0000 (UTC)
commit 9f3ad2ff28bd3beb3cf02b05d75084fbce7dc412
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Mar 3 22:21:18 2010 +0100
Fix timing in fake capturer
CesarPlayer/Capturer/FakeCapturer.cs | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/CesarPlayer/Capturer/FakeCapturer.cs b/CesarPlayer/Capturer/FakeCapturer.cs
index 6fa99f8..a453ffa 100644
--- a/CesarPlayer/Capturer/FakeCapturer.cs
+++ b/CesarPlayer/Capturer/FakeCapturer.cs
@@ -48,9 +48,9 @@ namespace LongoMatch.Video.Capturer
if (!started)
return 0;
else if (playing)
- return (ellapsed + (DateTime.Now - lastStart)).Milliseconds;
+ return (int)(ellapsed + (DateTime.Now - lastStart)).TotalMilliseconds;
else
- return ellapsed.Milliseconds;
+ return (int)ellapsed.TotalMilliseconds;
}
}
@@ -69,8 +69,9 @@ namespace LongoMatch.Video.Capturer
}
public void Start(){
- timerID = GLib.Timeout.Add(1000, OnTick);
+ timerID = GLib.Timeout.Add(100, OnTick);
lastStart = DateTime.Now;
+ playing = true;
started = true;
}
@@ -115,7 +116,7 @@ namespace LongoMatch.Video.Capturer
return true;
}
- protected virtual bool OnTick(){
+ protected virtual bool OnTick(){
if (EllapsedTime != null)
EllapsedTime(CurrentTime);
return true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]