[longomatch] Add initial player controller related files



commit a3ccd9e77339c7776748f1755e48ec2e0db64ea3
Author: Jorge Zapata <jorgeluis zapata gmail com>
Date:   Thu Mar 19 15:34:49 2015 +0100

    Add initial player controller related files

 .../Interfaces/Multimedia/IPlayerController.cs     |  111 ++++++++++++++++++++
 LongoMatch.Core/LongoMatch.Core.csproj             |    1 +
 LongoMatch.Multimedia/LongoMatch.Multimedia.csproj |    1 +
 LongoMatch.Multimedia/PlayerController.cs          |   57 ++++++++++
 4 files changed, 170 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs 
b/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
new file mode 100644
index 0000000..602115b
--- /dev/null
+++ b/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
@@ -0,0 +1,111 @@
+//
+//  Copyright (C) 2015 jl
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Core.Store;
+
+// IController -> Controller
+// Controller.Player.CurrentTime
+// Controller.Player.Open()
+// Controller.LoadPlay
+// Controller.LoadPlayListPlay
+// SetWindowHandle(MediaFile)
+// SetActiveMediaFiles(List<MediaFile> actives, List<IntPtr> windows)
+// EnableMediaFile(0, gpointer id)
+// EnableMediaFile(1, gpointer id)
+//
+/* MultiPlayerController : IPlayerController
+               * {
+                   List<IPlayer> players;
+
+                       SetActiveMediaFiles(List<MediaFile> actives, List<IntPtr> windows)
+                       {
+                               IPlayer == MultimediaBackend.GetPlayer();
+                               // sincronizar dos players
+                               Iplayer.Link(IPlayer);
+                       }
+               }
+/*
+ * class PlayerController : IPlayerController
+ * {
+ * 
+ * }
+ * 
+ * class OPEPlayerController : PlayerControler
+ * {
+ *   Open()
+ *   Play()
+ *   Pause()
+ *   EnableMediaFile();
+ * }
+ *  PalyerController : IPlayerController {
+ *   PlayerControler () {
+ *     this.player = Multimedia.getPlayer();
+ *   }
+ * }
+ * class MultiPlayerView()
+ * {
+ *    MultiPlayerView(IPlayerController controller)
+ * {
+ *             // eventos
++=
+
+       * }
+       * }
+       * 
+       * 
+       * /
+       //
+       /*
+       * 
+       * 
+       * /
+       // EnableMediaFile(int i, gpointer id)
+       // DisableMediaFile(int i)
+
+       void Open (MediaFileSet fileSet);
+void Close();
+void Play ();
+void Pause ();
+void TogglePlay ();
+void Seek (Time time, bool accurate);
+void StepForward();
+void StepBackward();
+void SeekToNextFrame();
+void SeekToPreviousFrame();
+void FramerateUp();
+void FramerateDown();
+//
+*/
+using LongoMatch.Core.Store.Playlists;
+
+namespace LongoMatch.Core.Interfaces.Multimedia
+{
+       public interface IPlayerController
+       {
+               /// <summary>
+               /// Gets the player.
+               /// </summary>
+               /// <returns>The player.</returns>
+               IPlayer GetPlayer();
+               // FIXME I have no idea what this functions do, why a CloseSegment() with no OpenSegment?
+               // why LoadPlay? Load and then Play?
+               void LoadPlay (MediaFileSet file, TimelineEvent play, Time seekTime, bool playing);
+               void LoadPlayListPlay (Playlist playlist, IPlaylistElement play);
+               void CloseSegment();
+       }
+}
\ No newline at end of file
diff --git a/LongoMatch.Core/LongoMatch.Core.csproj b/LongoMatch.Core/LongoMatch.Core.csproj
index fd49de9..5057601 100644
--- a/LongoMatch.Core/LongoMatch.Core.csproj
+++ b/LongoMatch.Core/LongoMatch.Core.csproj
@@ -137,6 +137,7 @@
     <Compile Include="Interfaces\IStorage.cs" />
     <Compile Include="Interfaces\IStorable.cs" />
     <Compile Include="Store\Templates\Team.cs" />
+    <Compile Include="Interfaces\Multimedia\IPlayerController.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Common\" />
diff --git a/LongoMatch.Multimedia/LongoMatch.Multimedia.csproj 
b/LongoMatch.Multimedia/LongoMatch.Multimedia.csproj
index e549cfc..f448ca7 100644
--- a/LongoMatch.Multimedia/LongoMatch.Multimedia.csproj
+++ b/LongoMatch.Multimedia/LongoMatch.Multimedia.csproj
@@ -50,6 +50,7 @@
     <Compile Include="Player\ObjectManager.cs" />
     <Compile Include="Utils\WindowHandle.cs" />
     <Compile Include="Utils\Devices.cs" />
+    <Compile Include="PlayerController.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="Capturer\" />
diff --git a/LongoMatch.Multimedia/PlayerController.cs b/LongoMatch.Multimedia/PlayerController.cs
new file mode 100644
index 0000000..9377edd
--- /dev/null
+++ b/LongoMatch.Multimedia/PlayerController.cs
@@ -0,0 +1,57 @@
+//
+//  Copyright (C) 2015 jl
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+using System;
+using LongoMatch.Core.Interfaces.Multimedia;
+
+namespace LongoMatch.Core.Store
+{
+       public class PlayerController : IPlayerController
+       {
+               IPlayer player;
+
+               public PlayerController ()
+               {
+                       player = Config.MultimediaToolkit.GetPlayer ();
+               }
+
+               ~PlayerController ()
+               {
+                       player.Dispose ();
+               }
+
+               #region IPlayerController implementation
+               IPlayer IPlayerController.GetPlayer ()
+               {
+                       return player;
+               }
+               void IPlayerController.LoadPlay (MediaFileSet file, TimelineEvent play, Time seekTime, bool 
playing)
+               {
+                       throw new NotImplementedException ();
+               }
+               void IPlayerController.LoadPlayListPlay (LongoMatch.Core.Store.Playlists.Playlist playlist, 
LongoMatch.Core.Interfaces.IPlaylistElement play)
+               {
+                       throw new NotImplementedException ();
+               }
+               void IPlayerController.CloseSegment ()
+               {
+                       throw new NotImplementedException ();
+               }
+               #endregion
+       }
+}
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]