[longomatch] Remove Close from the IPlayback API and use Dispose
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Remove Close from the IPlayback API and use Dispose
- Date: Tue, 31 Mar 2015 17:33:34 +0000 (UTC)
commit bd7e0e9516f4777b3ef8a55e462f2fb055926e8c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Mar 24 19:30:17 2015 +0100
Remove Close from the IPlayback API and use Dispose
LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs | 4 ++--
LongoMatch.Services/Services/PlayerController.cs | 19 +++++++------------
2 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
b/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
index 6d83102..a79a95d 100644
--- a/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
+++ b/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
@@ -58,8 +58,6 @@ namespace LongoMatch.Core.Interfaces.Multimedia
void Stop ();
- void Close ();
-
bool Seek (Time time, bool accurate = false, bool synchronous = false);
bool SeekToNextFrame ();
@@ -77,6 +75,8 @@ namespace LongoMatch.Core.Interfaces.Multimedia
event StateChangeHandler StateChange;
event ReadyToSeekHandler ReadyToSeek;
+ void Close ();
+
bool Open (List<string> mrls);
bool Open (string mrl);
diff --git a/LongoMatch.Services/Services/PlayerController.cs
b/LongoMatch.Services/Services/PlayerController.cs
index 5e2976e..ff5eff0 100644
--- a/LongoMatch.Services/Services/PlayerController.cs
+++ b/LongoMatch.Services/Services/PlayerController.cs
@@ -181,9 +181,16 @@ namespace LongoMatch.Services
public void Dispose ()
{
+ Log.Debug ("Disposing PlayerController");
IgnoreTicks = true;
timer.Dispose ();
+ player.Error -= HandleError;
+ player.StateChange -= HandleStateChange;
+ player.Eos -= HandleEndOfStream;
+ player.ReadyToSeek -= HandleReadyToSeek;
+ ReconfigureTimeout (0);
player.Dispose ();
+ FileSet = null;
}
public void Ready ()
@@ -240,18 +247,6 @@ namespace LongoMatch.Services
Playing = false;
}
- public void Close ()
- {
- Log.Debug ("Close");
- player.Error -= HandleError;
- player.StateChange -= HandleStateChange;
- player.Eos -= HandleEndOfStream;
- player.ReadyToSeek -= HandleReadyToSeek;
- ReconfigureTimeout (0);
- player.Dispose ();
- FileSet = null;
- }
-
public void TogglePlay ()
{
Log.Debug ("Toggle playback");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]