[longomatch] Add a new event to notify streams out of scope



commit 59a79241164921079ff88354ef9d3a7dd44bcfb8
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Mar 30 14:56:00 2015 +0200

    Add a new event to notify streams out of scope

 LongoMatch.Core/Handlers/Multimedia.cs             |    1 +
 LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs   |    2 ++
 .../gtk-gui/LongoMatch.Gui.VideoWindow.cs          |    2 +-
 LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic       |    2 +-
 LongoMatch.GUI/gtk-gui/objects.xml                 |    2 ++
 LongoMatch.Services/Services/PlayerController.cs   |    6 ++++++
 6 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Core/Handlers/Multimedia.cs b/LongoMatch.Core/Handlers/Multimedia.cs
index 1613ad1..f7da99f 100644
--- a/LongoMatch.Core/Handlers/Multimedia.cs
+++ b/LongoMatch.Core/Handlers/Multimedia.cs
@@ -47,6 +47,7 @@ namespace LongoMatch.Core.Handlers
        public delegate void LoadDrawingsHandler (FrameDrawing frameDrawing);
        public delegate void ElementLoadedHandler (object element,bool hasNext);
        public delegate void MediaFileSetLoadedHandler (MediaFileSet fileset,List<int> camerasVisible = null);
+       public delegate void ScopeStateChangedHandler (int index,bool visible);
 
        public delegate void ErrorHandler (object sender,string message);
        public delegate void EosHandler (object sender);
diff --git a/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs 
b/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
index 5bbfefd..d10391e 100644
--- a/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
+++ b/LongoMatch.Core/Interfaces/Multimedia/IPlayer.cs
@@ -150,6 +150,8 @@ namespace LongoMatch.Core.Interfaces.Multimedia
        public interface IMultiPlayer: IPlayer
        {
 
+               event ScopeStateChangedHandler ScopeChangedEvent;
+
                /// <summary>
                /// Open a set of media files.
                /// </summary>
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.VideoWindow.cs 
b/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.VideoWindow.cs
index 44a72c0..1a8f1c1 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.VideoWindow.cs
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/LongoMatch.Gui.VideoWindow.cs
@@ -28,7 +28,7 @@ namespace LongoMatch.Gui
                        // Container child totalbox.Gtk.Box+BoxChild
                        this.messageLabel = new global::Gtk.Label ();
                        this.messageLabel.Name = "messageLabel";
-                       this.messageLabel.LabelProp = "Message label";
+                       this.messageLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("Out of scope");
                        this.totalbox.Add (this.messageLabel);
                        global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.totalbox 
[this.messageLabel]));
                        w2.Position = 1;
diff --git a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
index 7a3b51b..648adfa 100644
--- a/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI.Multimedia/gtk-gui/gui.stetic
@@ -915,7 +915,7 @@
         <child>
           <widget class="Gtk.Label" id="messageLabel">
             <property name="MemberName" />
-            <property name="LabelProp">Message label</property>
+            <property name="LabelProp" translatable="yes">Out of scope</property>
           </widget>
           <packing>
             <property name="Position">1</property>
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index dc74c16..dffc6d3 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -307,6 +307,8 @@
     <itemgroups>
       <itemgroup label="VideoWindow Properties">
         <property name="Ready" />
+        <property name="Ratio" />
+        <property name="Visible" />
       </itemgroup>
     </itemgroups>
     <signals>
diff --git a/LongoMatch.Services/Services/PlayerController.cs 
b/LongoMatch.Services/Services/PlayerController.cs
index 8b35821..2e45ec3 100644
--- a/LongoMatch.Services/Services/PlayerController.cs
+++ b/LongoMatch.Services/Services/PlayerController.cs
@@ -805,6 +805,7 @@ namespace LongoMatch.Services
                        if (supportMultipleCameras) {
                                try {
                                        player = multiPlayer = Config.MultimediaToolkit.GetMultiPlayer ();
+                                       multiPlayer.ScopeChangedEvent += HandleScopeChangedEvent;
                                } catch {
                                        Log.Error ("Player with support for multiple cameras not found");
                                }
@@ -940,6 +941,11 @@ namespace LongoMatch.Services
                        });
                }
 
+               void HandleScopeChangedEvent (int index, bool visible)
+               {
+                       ViewPorts [index].MessageVisible = !visible;
+               }
+
                #endregion
 
                #region Callbacks


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