[longomatch] Document IPlayerController and rename some functions



commit e1eadb74ae4d95ff1c5c1985853ae2b97d28b9c9
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Mar 23 16:50:41 2015 +0100

    Document IPlayerController and rename some functions

 LongoMatch.Core/Interfaces/IPlayerController.cs  |   95 ++++++++++++++++++++--
 LongoMatch.GUI.Multimedia/Gui/PlayerView.cs      |    2 +-
 LongoMatch.Services/Services/PlayerController.cs |    4 +-
 LongoMatch.Services/Services/PlaylistManager.cs  |    2 +-
 4 files changed, 91 insertions(+), 12 deletions(-)
---
diff --git a/LongoMatch.Core/Interfaces/IPlayerController.cs b/LongoMatch.Core/Interfaces/IPlayerController.cs
index 1295974..1639adb 100644
--- a/LongoMatch.Core/Interfaces/IPlayerController.cs
+++ b/LongoMatch.Core/Interfaces/IPlayerController.cs
@@ -37,46 +37,125 @@ namespace LongoMatch.Core.Interfaces
                event ElementLoadedHandler ElementLoadedEvent;
                event PARChangedHandler PARChangedEvent;
 
+               /// <summary>
+               /// The file set currently openned by the player.
+               /// </summary>
                MediaFileSet FileSet { get; }
 
+               /// <summary>
+               /// <c>true</c> if a <see cref="MediaFileSet"/> is currently opened.
+               /// </summary>
+               bool Opened { get; }
+
+               /// <summary>
+               /// Gets the current miniature frame.
+               /// </summary>
                Image CurrentMiniatureFrame { get; }
 
+               /// <summary>
+               /// Gets the current frame.
+               /// </summary>
                Image CurrentFrame { get; }
 
+               /// <summary>
+               /// The time to step in <see cref="StepForward"/> and <see cref="StepBackward"/>.
+               /// </summary>
                Time Step { get; set; }
 
+               /// <summary>
+               /// When set to <c>true</c> clock ticks will be ignored.
+               /// This can be used by the view to prevent updates after a seek
+               /// when seeking through the seek bar.
+               /// </summary>
                bool IgnoreTicks { get; set; }
 
-               bool Opened { get; }
-
+               /// <summary>
+               /// The cameras' layout set by the view
+               /// </summary>
                object CamerasLayout { get; set; }
 
+               /// <summary>
+               /// The list of visible cameras.
+               /// </summary>
                List<int> CamerasVisible { get; set; }
 
+               /// <summary>
+               /// Open the specified fileSet.
+               /// </summary>
                void Open (MediaFileSet fileSet);
 
+               /// <summary>
+               /// Increases the framerate.
+               /// </summary>
                void FramerateUp ();
 
+               /// <summary>
+               /// Decreases the framerate.
+               /// </summary>
                void FramerateDown ();
 
+               /// <summary>
+               /// Step the amount in <see cref="Step"/> forward.
+               /// </summary>
                void StepForward ();
 
+               /// <summary>
+               /// Step the amount in <see cref="Step"/> backward.
+               /// </summary>
                void StepBackward ();
 
+               /// <summary>
+               /// Changes the playback state pause/playing.
+               /// </summary>
                void TogglePlay ();
 
-               void LoadEvent (MediaFileSet file, TimelineEvent play, Time seekTime, bool playing);
-
-               void LoadPlayListEvent (Playlist playlist, IPlaylistElement play);
-
+               /// <summary>
+               /// Loads a timeline event.
+               /// </summary>
+               /// <param name="file">The file set for this event.</param>
+               /// <param name="evt">The timeline event.</param>
+               /// <param name="seekTime">Seek time.</param>
+               /// <param name="playing">If set to <c>true</c> playing.</param>
+               void LoadEvent (MediaFileSet file, TimelineEvent evt, Time seekTime, bool playing);
+
+               /// <summary>
+               /// Loads a playlist event.
+               /// </summary>
+               /// <param name="playlist">The playlist for this event.</param>
+               /// <param name="element">The event to load.</param>
+               void LoadPlaylistEvent (Playlist playlist, IPlaylistElement element);
+
+               /// <summary>
+               /// Unloads the current event.
+               /// </summary>
                void UnloadCurrentEvent ();
 
-               void SeekRelative (double pos);
-
+               /// <summary>
+               /// Seek the specified absolute position.
+               /// </summary>
+               /// <param name="time">The position to seek to.</param>
+               /// <param name="accurate">If set to <c>true</c> performs an accurate, otherwise a keyframe 
seek.</param>
+               /// <param name="synchronous">If set to <c>true</c> performs a synchronous seek.</param>
+               /// <param name="throttled">If set to <c>true</c> performs a throttled seek.</param>
                bool Seek (Time time, bool accurate = false, bool synchronous = false, bool throttled = 
false);
 
+               /// <summary>
+               /// Performs a seek to proportional the duration of the event loaded.
+               /// </summary>
+               /// <param name="pos">Position.</param>
+               void Seek (double pos);
+
+
+               /// <summary>
+               /// Jump the next element in the playlist if a <see cref="IPlaylistElement"/> is loaded.
+               /// </summary>
                void Next ();
 
+               /// <summary>
+               /// Jump to the previous element if a <see cref="IPlaylistElement"/> is loaded,
+               /// to the beginning of the event if a <see cref="TimelineEvent"/> is loaded or
+               /// to the beginning of the stream of no element is loaded.
+               /// </summary>
                void Previous ();
 
                void Ready ();
diff --git a/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs b/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
index 1ba37ee..7370aae 100644
--- a/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
+++ b/LongoMatch.GUI.Multimedia/Gui/PlayerView.cs
@@ -412,7 +412,7 @@ namespace LongoMatch.Gui
                void HandleTimescaleValueChanged (object sender, System.EventArgs e)
                {
                        if (seeking) {
-                               Player.SeekRelative (timescale.Value);
+                               Player.Seek (timescale.Value);
                        }
                }
 
diff --git a/LongoMatch.Services/Services/PlayerController.cs 
b/LongoMatch.Services/Services/PlayerController.cs
index 875545a..9b0bb78 100644
--- a/LongoMatch.Services/Services/PlayerController.cs
+++ b/LongoMatch.Services/Services/PlayerController.cs
@@ -302,7 +302,7 @@ namespace LongoMatch.Services
                        return Seek (time, accurate, synchronous, false);
                }
 
-               public void SeekRelative (double pos)
+               public void Seek (double pos)
                {
                        Time seekPos, timePos, duration;
                        bool accurate;
@@ -414,7 +414,7 @@ namespace LongoMatch.Services
                        player.Expose ();
                }
 
-               public void LoadPlayListEvent (Playlist playlist, IPlaylistElement element)
+               public void LoadPlaylistEvent (Playlist playlist, IPlaylistElement element)
                {
                        Log.Debug (string.Format ("Loading playlist element \"{0}\"", element.Description));
 
diff --git a/LongoMatch.Services/Services/PlaylistManager.cs b/LongoMatch.Services/Services/PlaylistManager.cs
index f3aefb6..766a369 100644
--- a/LongoMatch.Services/Services/PlaylistManager.cs
+++ b/LongoMatch.Services/Services/PlaylistManager.cs
@@ -122,7 +122,7 @@ namespace LongoMatch.Services
                        if (element != null) {
                                playlist.SetActive (element);
                        }
-                       player.LoadPlayListEvent (playlist, element);
+                       player.LoadPlaylistEvent (playlist, element);
                }
 
                void HandleLoadPlayEvent (TimelineEvent play)


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