[longomatch] Clean up the naming and define what has to be done



commit c76e7bc84828ad730a352a49a9b6b12d0c973587
Author: Jorge Zapata <jorgeluis zapata gmail com>
Date:   Thu Mar 19 16:18:44 2015 +0100

    Clean up the naming and define what has to be done

 LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs   |    8 ++
 .../Interfaces/Multimedia/IPlayerController.cs     |   86 ++------------------
 LongoMatch.Multimedia/PlayerController.cs          |   18 +++-
 3 files changed, 27 insertions(+), 85 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs 
b/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
index 4948630..6aa80c5 100644
--- a/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
+++ b/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
@@ -42,6 +42,8 @@ namespace LongoMatch.Core.Interfaces.Multimedia
                IntPtr WindowHandle {set;}
 
                bool Open (string mrl);
+               // EnableMediaFile(MediaFileSet files, List<IntPtr> windows);
+               // DisableMediaFile(MediaFileSet files);
                void Play();
                void Pause();
                void Stop();
@@ -51,5 +53,11 @@ namespace LongoMatch.Core.Interfaces.Multimedia
                bool SeekToPreviousFrame();
                Image GetCurrentFrame (int width=-1, int height=-1);
                void Expose ();
+               // Functions to add that belonged to IPlayerBin
+               // void Open (MediaFileSet fileSet);
+               // void Seek (Time time, bool accurate);
+               // void FramerateUp();
+               // void FramerateDown();
+               // void TogglePlay ();
        }
 }
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs 
b/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
index 602115b..be0f464 100644
--- a/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
+++ b/LongoMatch.Core/Interfaces/Multimedia/IPlayerController.cs
@@ -1,5 +1,5 @@
 //
-//  Copyright (C) 2015 jl
+//  Copyright (C) 2015 FLUENDO S.A.
 //
 //  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
@@ -18,79 +18,6 @@
 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
@@ -101,11 +28,10 @@ namespace LongoMatch.Core.Interfaces.Multimedia
                /// 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();
+               IPlayer Player { get; }
+
+               void LoadEvent (MediaFileSet file, TimelineEvent ev, Time seekTime, bool playing);
+               void LoadPlayListEvent (Playlist playlist, IPlaylistElement ev);
+               void UnloadCurrentEvent();
        }
 }
\ No newline at end of file
diff --git a/LongoMatch.Multimedia/PlayerController.cs b/LongoMatch.Multimedia/PlayerController.cs
index 9377edd..f55c086 100644
--- a/LongoMatch.Multimedia/PlayerController.cs
+++ b/LongoMatch.Multimedia/PlayerController.cs
@@ -17,6 +17,8 @@
 //
 using System;
 using LongoMatch.Core.Interfaces.Multimedia;
+using LongoMatch.Core.Store.Playlists;
+using LongoMatch.Core.Interfaces;
 
 namespace LongoMatch.Core.Store
 {
@@ -35,22 +37,28 @@ namespace LongoMatch.Core.Store
                }
 
                #region IPlayerController implementation
-               IPlayer IPlayerController.GetPlayer ()
+               public IPlayer Player
                {
-                       return player;
+                       get {
+                               return player;
+                       }
                }
-               void IPlayerController.LoadPlay (MediaFileSet file, TimelineEvent play, Time seekTime, bool 
playing)
+
+               public void LoadEvent (MediaFileSet file, TimelineEvent ev, Time seekTime, bool playing)
                {
                        throw new NotImplementedException ();
                }
-               void IPlayerController.LoadPlayListPlay (LongoMatch.Core.Store.Playlists.Playlist playlist, 
LongoMatch.Core.Interfaces.IPlaylistElement play)
+
+               public void LoadPlayListEvent (Playlist playlist, IPlaylistElement ev)
                {
                        throw new NotImplementedException ();
                }
-               void IPlayerController.CloseSegment ()
+
+               public void UnloadCurrentEvent()
                {
                        throw new NotImplementedException ();
                }
+
                #endregion
        }
 }


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