[longomatch] Differenciate timing info from the player and the capturer
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Differenciate timing info from the player and the capturer
- Date: Wed, 5 Nov 2014 19:00:34 +0000 (UTC)
commit bed0123adc36b78da714e6ca7f73ba2e08b1a659
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Oct 29 20:12:21 2014 +0100
Differenciate timing info from the player and the capturer
LongoMatch.Core/Interfaces/GUI/ICapturerBin.cs | 4 +-
LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs | 20 ++++----
LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs | 48 ++++++++++++-------
LongoMatch.Services/Services/EventsManager.cs | 2 +-
4 files changed, 43 insertions(+), 31 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/GUI/ICapturerBin.cs b/LongoMatch.Core/Interfaces/GUI/ICapturerBin.cs
index 7033221..dfcd7ed 100644
--- a/LongoMatch.Core/Interfaces/GUI/ICapturerBin.cs
+++ b/LongoMatch.Core/Interfaces/GUI/ICapturerBin.cs
@@ -26,9 +26,9 @@ namespace LongoMatch.Core.Interfaces.GUI
{
public interface ICapturerBin
{
- Time CurrentTime {get;}
+ Time CurrentCaptureTime {get;}
bool Capturing {get;}
- Image CurrentMiniatureFrame {get;}
+ Image CurrentCaptureFrame {get;}
CaptureSettings CaptureSettings {get;}
List<string> PeriodsNames {set;}
List<Period> Periods { get; set; }
diff --git a/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs b/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
index caa7d37..301ad1c 100644
--- a/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/CapturerBin.cs
@@ -132,7 +132,7 @@ namespace LongoMatch.Gui
get;
}
- public Time CurrentTime {
+ public Time CurrentCaptureTime {
get {
int timeDiff;
@@ -187,8 +187,8 @@ namespace LongoMatch.Gui
{
GLib.Source.Remove (timeoutID);
if (currentPeriod != null) {
- currentPeriod.StopTimer (CurrentTime);
- accumTime = CurrentTime;
+ currentPeriod.StopTimer (CurrentCaptureTime);
+ accumTime = CurrentCaptureTime;
Log.Debug ("Stop period stop=", accumTime.ToMSecondsString ());
}
currentTimeNode = null;
@@ -205,8 +205,8 @@ namespace LongoMatch.Gui
public void PausePeriod ()
{
if (currentPeriod != null) {
- Log.Debug ("Pause period at currentTime=", CurrentTime.ToMSecondsString ());
- currentPeriod.PauseTimer (CurrentTime);
+ Log.Debug ("Pause period at currentTime=",
CurrentCaptureTime.ToMSecondsString ());
+ currentPeriod.PauseTimer (CurrentCaptureTime);
}
currentTimeNode = null;
pausebutton.Visible = false;
@@ -216,8 +216,8 @@ namespace LongoMatch.Gui
public void ResumePeriod ()
{
- Log.Debug ("Resume period at currentTime=", CurrentTime.ToMSecondsString ());
- currentTimeNode = currentPeriod.Resume (CurrentTime);
+ Log.Debug ("Resume period at currentTime=", CurrentCaptureTime.ToMSecondsString ());
+ currentTimeNode = currentPeriod.Resume (CurrentCaptureTime);
pausebutton.Visible = true;
resumebutton.Visible = false;
Capturing = true;
@@ -253,12 +253,12 @@ namespace LongoMatch.Gui
bool UpdateTime ()
{
if (currentTimeNode != null) {
- currentTimeNode.Stop = CurrentTime;
+ currentTimeNode.Stop = CurrentCaptureTime;
}
hourlabel.Markup = EllapsedTime.Hours.ToString ("d2");
minuteslabel.Markup = EllapsedTime.Minutes.ToString ("d2");
secondslabel.Markup = EllapsedTime.Seconds.ToString ("d2");
- Config.EventsBroker.EmitCapturerTick (CurrentTime);
+ Config.EventsBroker.EmitCapturerTick (CurrentCaptureTime);
return true;
}
@@ -314,7 +314,7 @@ namespace LongoMatch.Gui
Capturer = null;
}
- public Image CurrentMiniatureFrame {
+ public Image CurrentCaptureFrame {
get {
if (Capturer == null)
return null;
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
b/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
index 09be19a..c8ed49a 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
@@ -66,6 +66,12 @@ namespace LongoMatch.Gui
base.OnDestroyed ();
}
+ public IPlayerBin Player {
+ get {
+ return playerbin;
+ }
+ }
+
public PlayerOperationMode Mode {
set {
mode = value;
@@ -107,24 +113,6 @@ namespace LongoMatch.Gui
}
#region Common
- public Time CurrentTime {
- get {
- if (mode == PlayerOperationMode.Player)
- return playerbin.CurrentTime;
- else
- return capturerbin.CurrentTime;
- }
- }
-
- public Image CurrentMiniatureFrame {
- get {
- if (mode == PlayerOperationMode.Player)
- return playerbin.CurrentMiniatureFrame;
- else
- return capturerbin.CurrentMiniatureFrame;
- }
- }
-
public void Close () {
playerbin.Close ();
capturerbin.Close ();
@@ -134,6 +122,18 @@ namespace LongoMatch.Gui
#region Capturer
+ public Time CurrentCaptureTime {
+ get {
+ return capturerbin.CurrentCaptureTime;
+ }
+ }
+
+ public Image CurrentCaptureFrame {
+ get {
+ return capturerbin.CurrentCaptureFrame;
+ }
+ }
+
public CaptureSettings CaptureSettings {
get {
return capturerbin.CaptureSettings;
@@ -188,6 +188,12 @@ namespace LongoMatch.Gui
#region Player
+ public Time CurrentTime {
+ get {
+ return playerbin.CurrentTime;
+ }
+ }
+
public bool Playing {
get {
return playerbin.Playing;
@@ -218,6 +224,12 @@ namespace LongoMatch.Gui
}
}
+ public Image CurrentMiniatureFrame {
+ get {
+ return playerbin.CurrentMiniatureFrame;
+ }
+ }
+
public bool Opened {
get {
return playerbin.Opened;
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index 23e910d..6794ca7 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -249,7 +249,7 @@ namespace LongoMatch.Services
/* Get the current frame and get a thumbnail from it */
if (projectType == ProjectType.CaptureProject ||
projectType == ProjectType.URICaptureProject) {
- frame = capturer.CurrentMiniatureFrame;
+ frame = capturer.CurrentCaptureFrame;
} else if (projectType == ProjectType.FileProject) {
frame = framesCapturer.GetFrame (tagtime, true, Constants.MAX_THUMBNAIL_SIZE,
Constants.MAX_THUMBNAIL_SIZE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]