[longomatch/newui: 30/157] Emit tick events to update timelines
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch/newui: 30/157] Emit tick events to update timelines
- Date: Mon, 1 Sep 2014 09:43:52 +0000 (UTC)
commit ec2221cf35ef18605bc19488038a1bbc4f21924b
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Aug 20 17:44:07 2014 +0200
Emit tick events to update timelines
And remove the unused SeekEvent
LongoMatch.Core/Interfaces/GUI/IPlayerBin.cs | 1 -
LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs | 17 ++++++-----------
LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs | 7 -------
LongoMatch.GUI.Multimedia/gtk-gui/objects.xml | 2 --
4 files changed, 6 insertions(+), 21 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/GUI/IPlayerBin.cs b/LongoMatch.Core/Interfaces/GUI/IPlayerBin.cs
index 3d5776d..0dc668f 100644
--- a/LongoMatch.Core/Interfaces/GUI/IPlayerBin.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IPlayerBin.cs
@@ -26,7 +26,6 @@ namespace LongoMatch.Interfaces.GUI
public interface IPlayerBin
{
event StateChangeHandler PlayStateChanged;
- event SeekEventHandler SeekEvent;
Time CurrentTime {get;}
Time StreamLength {get;}
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
index 7523a8c..d2c53c1 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerBin.cs
@@ -49,7 +49,6 @@ namespace LongoMatch.Gui
public event TickHandler Tick;
public event StateChangeHandler PlayStateChanged;
- public event SeekEventHandler SeekEvent;
const int THUMBNAIL_MAX_WIDTH = 100;
const int SCALE_FPS = 25;
@@ -247,8 +246,7 @@ namespace LongoMatch.Gui
{
DrawingsVisible = false;
player.Seek (time, accurate);
- if (SeekEvent != null)
- SeekEvent (time);
+ OnTick ();
}
public void SeekToNextFrame ()
@@ -256,8 +254,7 @@ namespace LongoMatch.Gui
DrawingsVisible = false;
if (player.CurrentTime < segment.Stop) {
player.SeekToNextFrame ();
- if (SeekEvent != null)
- SeekEvent (player.CurrentTime);
+ OnTick ();
}
}
@@ -401,10 +398,10 @@ namespace LongoMatch.Gui
ImageLoaded = false;
if (readyToSeek) {
Log.Debug ("Player is ready to seek, seeking to " +
- start.ToMSecondsString ());
+ seekTime.ToMSecondsString ());
SetScaleValue ((int)(rate * SCALE_FPS));
player.Rate = (double)rate;
- player.Seek (seekTime, true);
+ Seek (seekTime, true);
if (playing) {
Play ();
}
@@ -788,14 +785,12 @@ namespace LongoMatch.Gui
player.SeekToPreviousFrame ();
else
player.SeekToNextFrame ();
- if (SeekEvent != null)
- SeekEvent (CurrentTime);
+ OnTick ();
}
if (type == SeekType.Accurate || type == SeekType.Keyframe) {
player.Rate = (double)rate;
player.Seek (start, type == SeekType.Accurate);
- if (SeekEvent != null)
- SeekEvent (start);
+ OnTick ();
}
}
#endregion
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
b/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
index 3fcca97..60889c5 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerCapturerBin.cs
@@ -33,7 +33,6 @@ namespace LongoMatch.Gui
{
/* Player Events */
public event StateChangeHandler PlayStateChanged;
- public event SeekEventHandler SeekEvent;
public enum PlayerOperationMode {
Player,
@@ -277,12 +276,6 @@ namespace LongoMatch.Gui
if (PlayStateChanged != null)
PlayStateChanged (playing);
};
-
- playerbin.SeekEvent += delegate (Time pos) {
- if (SeekEvent != null)
- SeekEvent (pos);
- };
-
}
void LoadBackgroundPlayer (MediaFile file) {
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml b/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
index 6457e6c..cdd9b58 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/objects.xml
@@ -17,7 +17,6 @@
<itemgroup label="PlayerBin Signals">
<signal name="Tick" />
<signal name="PlayStateChanged" />
- <signal name="SeekEvent" />
</itemgroup>
</signals>
</object>
@@ -30,7 +29,6 @@
<signals>
<itemgroup label="IPlayerBin Signals">
<signal name="PlayStateChanged" />
- <signal name="SeekEvent" />
</itemgroup>
</signals>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]