 AtmoLight.MediaPortal1/Plugin.cs                 | 24 ++++++++++++++++-
 AtmoLight.MediaPortal1/Resources/language/de.xml |  1 +
 AtmoLight.MediaPortal1/Resources/language/en.xml |  1 +
 AtmoLight.MediaPortal1/Resources/language/fr.xml |  1 +
 AtmoLight.MediaPortal1/Resources/language/nl.xml |  1 +
 AtmoLight.MediaPortal1/Settings.cs               |  3 +++
 AtmoLight.MediaPortal1/SetupForm.Designer.cs     | 33 +++++++++++++++++-------
 AtmoLight.MediaPortal1/SetupForm.cs              |  3 +++
 8 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/AtmoLight.MediaPortal1/Plugin.cs b/AtmoLight.MediaPortal1/Plugin.cs
index 5b81a6e..ede4374 100644
--- a/AtmoLight.MediaPortal1/Plugin.cs
+++ b/AtmoLight.MediaPortal1/Plugin.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
 using System.Text;
 using System.Drawing;
 using System.Drawing.Imaging;
+using MediaPortal;
 using MediaPortal.GUI.Library;
 using MediaPortal.Profile;
 using MediaPortal.Player;
@@ -523,13 +524,34 @@ namespace AtmoLight
     /// <param name="arWidth">Aspect ratio width.</param>
     /// <param name="arHeight">Aspect ratio height.</param>
     /// <param name="pSurface">Surface.</param>
-    private void AtmolightPlugin_OnNewFrame(short width, short height, short arWidth, short arHeight, uint pSurface)
+    /// <param name="FrameSource">Source of frame, see enums FrameGrabber.FrameSource</param>/// 
+    private void AtmolightPlugin_OnNewFrame(short width, short height, short arWidth, short arHeight, uint pSurface, FrameGrabber.FrameSource FrameSource)
     {
       if (coreObject.GetCurrentEffect() != ContentEffect.MediaPortalLiveMode || !coreObject.IsConnected() ||
           !coreObject.IsAtmoLightOn() || width == 0 || height == 0)
       {
         return;
       }
+	  
+      //Drop any frames?
+      if (Settings.trueGrabbing)
+      {
+          //GUI grabbing while video is minimized activated 
+          if (g_Player.Playing && (!GUIGraphicsContext.IsFullScreenVideo) && (FrameSource == FrameGrabber.FrameSource.Video))
+          {
+            //Drop Video frames when user has set TrueGrabbing & video is playing minimized -> just GUI frames will pass
+            return;
+          }
+      }
+      else
+      {
+          //GUI grabbing while video is minimized deactivated 
+          if((g_Player.Playing) && (FrameSource == FrameGrabber.FrameSource.GUI))
+          {
+              //Drop GUI frames when user has NOT set TrueGrabbing & video is playing -> just video frames will pass
+            return;
+          }
+      }	  
 
       // Low CPU setting.
       // Skip frame if LowCPUTime has not yet passed since last frame.
diff --git a/AtmoLight.MediaPortal1/Resources/language/de.xml b/AtmoLight.MediaPortal1/Resources/language/de.xml
index aafb4c0..16493c9 100644
--- a/AtmoLight.MediaPortal1/Resources/language/de.xml
+++ b/AtmoLight.MediaPortal1/Resources/language/de.xml
@@ -75,6 +75,7 @@
     <string name="Delay">LED Verzögerung</string>
     <string name="DelayAt">ms Verzögerung bei</string>
     <string name="RestartOnError">Auto. wiederverbingung bei Fehler</string>
+    <string name="TrueGrabbing">Verwende Nutzeroberflächen Daten in MediaPortal Live Modus wenn Video minimiert ist</string>    
     <string name="RefreshRate">Hz</string>
     <string name="BlackbarDetection">Schw. Balken Erkennung alle</string>
     <string name="BlackbarDetectionThreshold">ms, mit Schwelle</string>
diff --git a/AtmoLight.MediaPortal1/Resources/language/en.xml b/AtmoLight.MediaPortal1/Resources/language/en.xml
index 7ae8712..2f9e2a2 100644
--- a/AtmoLight.MediaPortal1/Resources/language/en.xml
+++ b/AtmoLight.MediaPortal1/Resources/language/en.xml
@@ -75,6 +75,7 @@
     <string name="Delay">LED Delay</string>
     <string name="DelayAt">ms delay at</string>
     <string name="RestartOnError">Auto-Reconnect on Error</string>
+    <string name="TrueGrabbing">Use GUI data when video is minimized in MediaPortal Live Mode</string>        
     <string name="RefreshRate">Hz</string>
     <string name="BlackbarDetection">Blackbar detection every</string>
     <string name="BlackbarDetectionThreshold">ms, with Threshold</string>
diff --git a/AtmoLight.MediaPortal1/Resources/language/fr.xml b/AtmoLight.MediaPortal1/Resources/language/fr.xml
index f15ea23..a80142e 100644
--- a/AtmoLight.MediaPortal1/Resources/language/fr.xml
+++ b/AtmoLight.MediaPortal1/Resources/language/fr.xml
@@ -74,6 +74,7 @@
     <string name="Delay">LED Délais</string>
     <string name="DelayAt">ms Délais à</string>
     <string name="RestartOnError">Reconnections-Auto si Erreur</string>
+    <string name="TrueGrabbing">Utiliser les données de l'interface graphique lorsque la vidéo est minimisée dans MediaPortal mode Live</string>    
     <string name="RefreshRate">Hz</string>
     <string name="BlackbarDetection">Blackbar Detection toute les</string>
     <string name="BlackbarDetectionThreshold">ms, avec Seuil</string>
diff --git a/AtmoLight.MediaPortal1/Resources/language/nl.xml b/AtmoLight.MediaPortal1/Resources/language/nl.xml
index ab02e98..6c36739 100644
--- a/AtmoLight.MediaPortal1/Resources/language/nl.xml
+++ b/AtmoLight.MediaPortal1/Resources/language/nl.xml
@@ -74,6 +74,7 @@
     <string name="Delay">LED Vertraging</string>
     <string name="DelayAt">ms vertraging op</string>
     <string name="RestartOnError">Automatisch herverbinden bij foutmelding</string>
+    <string name="TrueGrabbing">Gebruik GUI data wanneer de video is geminimaliseerd in MediaPortal Live-modus</string>       
     <string name="RefreshRate">Hz</string>
     <string name="BlackbarDetection">Zwarte balk detectie elke</string>
     <string name="BlackbarDetectionThreshold">ms, met Beperking</string>
diff --git a/AtmoLight.MediaPortal1/Settings.cs b/AtmoLight.MediaPortal1/Settings.cs
index e59cd87..d9f8d42 100644
--- a/AtmoLight.MediaPortal1/Settings.cs
+++ b/AtmoLight.MediaPortal1/Settings.cs
@@ -31,6 +31,7 @@ namespace AtmoLight
     public static int staticColorGreen;
     public static int staticColorBlue;
     public static bool restartOnError;
+    public static bool trueGrabbing;
     public static bool blackbarDetection;
     public static int blackbarDetectionTime;
     public static int blackbarDetectionThreshold;
@@ -235,6 +236,7 @@ namespace AtmoLight
         staticColorGreen = reader.GetValueAsInt("atmolight", "StaticColorGreen", 0);
         staticColorBlue = reader.GetValueAsInt("atmolight", "StaticColorBlue", 0);
         restartOnError = reader.GetValueAsBool("atmolight", "RestartOnError", true);
+        trueGrabbing = reader.GetValueAsBool("atmolight", "TrueGrabbing", true);
         delayReferenceRefreshRate = reader.GetValueAsInt("atmolight", "DelayRefreshRate", 50);
         blackbarDetection = reader.GetValueAsBool("atmolight", "BlackbarDetection", false);
         blackbarDetectionTime = reader.GetValueAsInt("atmolight", "BlackbarDetectionTime", 1000);
@@ -342,6 +344,7 @@ namespace AtmoLight
         reader.SetValue("atmolight", "StaticColorGreen", staticColorGreen);
         reader.SetValue("atmolight", "StaticColorBlue", staticColorBlue);
         reader.SetValueAsBool("atmolight", "RestartOnError", restartOnError);
+        reader.SetValueAsBool("atmolight", "TrueGrabbing", trueGrabbing);
         reader.SetValue("atmolight", "DelayRefreshRate", delayReferenceRefreshRate);
         reader.SetValueAsBool("atmolight", "BlackbarDetection", blackbarDetection);
         reader.SetValue("atmolight", "BlackbarDetectionTime", blackbarDetectionTime);
diff --git a/AtmoLight.MediaPortal1/SetupForm.Designer.cs b/AtmoLight.MediaPortal1/SetupForm.Designer.cs
index d2ee4ff..3429482 100644
--- a/AtmoLight.MediaPortal1/SetupForm.Designer.cs
+++ b/AtmoLight.MediaPortal1/SetupForm.Designer.cs
@@ -103,6 +103,7 @@
       this.tbBlackbarDetectionThreshold = new System.Windows.Forms.TextBox();
       this.tbpowerModeChangedDelay = new System.Windows.Forms.TextBox();
       this.ckRestartOnError = new System.Windows.Forms.CheckBox();
+      this.ckTrueGrabbing = new System.Windows.Forms.CheckBox();
       this.grpCaptureDimensions = new System.Windows.Forms.GroupBox();
       this.lblHintCaptureDimensions = new System.Windows.Forms.Label();
       this.lblCaptureHeight = new System.Windows.Forms.Label();
@@ -256,6 +257,7 @@
       this.openFileDialog4 = new System.Windows.Forms.OpenFileDialog();
       this.openFileDialog5 = new System.Windows.Forms.OpenFileDialog();
       this.ckMonitorScreensaverState = new System.Windows.Forms.CheckBox();
+      this.ckTrueGrabbing = new System.Windows.Forms.CheckBox();
       this.tabPageHyperion.SuspendLayout();
       this.grpHyperionPrioritySettings.SuspendLayout();
       this.grpHyperionNetworkSettings.SuspendLayout();
@@ -616,7 +618,7 @@
       this.grpTargets.Controls.Add(this.ckHyperionEnabled);
       this.grpTargets.Location = new System.Drawing.Point(10, 10);
       this.grpTargets.Name = "grpTargets";
-      this.grpTargets.Size = new System.Drawing.Size(350, 150);
+      this.grpTargets.Size = new System.Drawing.Size(350, 103);
       this.grpTargets.TabIndex = 19;
       this.grpTargets.TabStop = false;
       this.grpTargets.Text = "Hardware selection";
@@ -646,7 +648,7 @@
       // ckBoblightEnabled
       // 
       this.ckBoblightEnabled.AutoSize = true;
-      this.ckBoblightEnabled.Location = new System.Drawing.Point(12, 98);
+      this.ckBoblightEnabled.Location = new System.Drawing.Point(94, 25);
       this.ckBoblightEnabled.Name = "ckBoblightEnabled";
       this.ckBoblightEnabled.Size = new System.Drawing.Size(64, 17);
       this.ckBoblightEnabled.TabIndex = 22;
@@ -657,7 +659,7 @@
       // ckHueEnabled
       // 
       this.ckHueEnabled.AutoSize = true;
-      this.ckHueEnabled.Location = new System.Drawing.Point(12, 121);
+      this.ckHueEnabled.Location = new System.Drawing.Point(94, 50);
       this.ckHueEnabled.Name = "ckHueEnabled";
       this.ckHueEnabled.Size = new System.Drawing.Size(46, 17);
       this.ckHueEnabled.TabIndex = 21;
@@ -691,7 +693,7 @@
       // ckHyperionEnabled
       // 
       this.ckHyperionEnabled.AutoSize = true;
-      this.ckHyperionEnabled.Location = new System.Drawing.Point(100, 25);
+      this.ckHyperionEnabled.Location = new System.Drawing.Point(94, 75);
       this.ckHyperionEnabled.Name = "ckHyperionEnabled";
       this.ckHyperionEnabled.Size = new System.Drawing.Size(68, 17);
       this.ckHyperionEnabled.TabIndex = 2;
@@ -701,6 +703,7 @@
       // 
       // grpMode
       // 
+      this.grpMode.Controls.Add(this.ckTrueGrabbing);
       this.grpMode.Controls.Add(this.grpVUMeter);
       this.grpMode.Controls.Add(this.cbMPExit);
       this.grpMode.Controls.Add(this.lblMPExit);
@@ -714,9 +717,9 @@
       this.grpMode.Controls.Add(this.lblMusic);
       this.grpMode.Controls.Add(this.cbVideo);
       this.grpMode.Controls.Add(this.lblVidTvRec);
-      this.grpMode.Location = new System.Drawing.Point(10, 165);
+      this.grpMode.Location = new System.Drawing.Point(10, 119);
       this.grpMode.Name = "grpMode";
-      this.grpMode.Size = new System.Drawing.Size(350, 330);
+      this.grpMode.Size = new System.Drawing.Size(350, 376);
       this.grpMode.TabIndex = 7;
       this.grpMode.TabStop = false;
       this.grpMode.Text = "Effect Settings";
@@ -729,7 +732,7 @@
       this.grpVUMeter.Controls.Add(this.lblVUMeterMinHue);
       this.grpVUMeter.Controls.Add(this.tbVUMeterMindB);
       this.grpVUMeter.Controls.Add(this.lblVUMeterMindB);
-      this.grpVUMeter.Location = new System.Drawing.Point(5, 270);
+      this.grpVUMeter.Location = new System.Drawing.Point(4, 318);
       this.grpVUMeter.Name = "grpVUMeter";
       this.grpVUMeter.Size = new System.Drawing.Size(340, 50);
       this.grpVUMeter.TabIndex = 29;
@@ -816,7 +819,7 @@
       // 
       this.grpGIF.Controls.Add(this.btnSelectGIF);
       this.grpGIF.Controls.Add(this.tbGIF);
-      this.grpGIF.Location = new System.Drawing.Point(5, 215);
+      this.grpGIF.Location = new System.Drawing.Point(4, 263);
       this.grpGIF.Name = "grpGIF";
       this.grpGIF.Size = new System.Drawing.Size(340, 50);
       this.grpGIF.TabIndex = 26;
@@ -851,7 +854,7 @@
       this.grpStaticColor.Controls.Add(this.tbRed);
       this.grpStaticColor.Controls.Add(this.lblGreen);
       this.grpStaticColor.Controls.Add(this.lblBlue);
-      this.grpStaticColor.Location = new System.Drawing.Point(5, 160);
+      this.grpStaticColor.Location = new System.Drawing.Point(4, 208);
       this.grpStaticColor.Name = "grpStaticColor";
       this.grpStaticColor.Size = new System.Drawing.Size(340, 50);
       this.grpStaticColor.TabIndex = 25;
@@ -1060,6 +1063,17 @@
       this.grpPluginOption.TabStop = false;
       this.grpPluginOption.Text = "Plugin options";
       // 
+      // ckTrueGrabbing
+      //
+      this.ckTrueGrabbing.Checked = true;
+      this.ckTrueGrabbing.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.ckTrueGrabbing.Location = new System.Drawing.Point(13, 161);
+      this.ckTrueGrabbing.Name = "ckTrueGrabbing";
+      this.ckTrueGrabbing.Size = new System.Drawing.Size(329, 40);
+      this.ckTrueGrabbing.TabIndex = 33;
+      this.ckTrueGrabbing.Text = "Use GUI and video framedata in MPLiveMode (MP 1.12 and up)";
+      this.ckTrueGrabbing.UseVisualStyleBackColor = true;	  	  
+      // 
       // lblpowerModeChangedDelayMS
       // 
       this.lblpowerModeChangedDelayMS.AutoSize = true;
@@ -2761,6 +2775,7 @@
     private System.Windows.Forms.Label lblVidTvRec;
     private System.Windows.Forms.GroupBox grpPluginOption;
     private System.Windows.Forms.CheckBox ckRestartOnError;
+    private System.Windows.Forms.CheckBox ckTrueGrabbing;
     private System.Windows.Forms.GroupBox grpCaptureDimensions;
     private System.Windows.Forms.Label lblHintCaptureDimensions;
     private System.Windows.Forms.Label lblCaptureHeight;
diff --git a/AtmoLight.MediaPortal1/SetupForm.cs b/AtmoLight.MediaPortal1/SetupForm.cs
index d6c8aa3..9bb9159 100644
--- a/AtmoLight.MediaPortal1/SetupForm.cs
+++ b/AtmoLight.MediaPortal1/SetupForm.cs
@@ -90,6 +90,7 @@ namespace AtmoLight
       ckStartAtmoWin.Checked = Settings.startAtmoWin;
       ckExitAtmoWin.Checked = Settings.exitAtmoWin;
       ckRestartOnError.Checked = Settings.restartOnError;
+      ckTrueGrabbing.Checked = Settings.trueGrabbing;
       ckBlackbarDetection.Checked = Settings.blackbarDetection;
       ckAtmowinEnabled.Checked = Settings.atmoWinTarget;
       ckHyperionEnabled.Checked = Settings.hyperionTarget;
@@ -203,6 +204,7 @@ namespace AtmoLight
       ckLowCpu.Text = Localization.Translate("SetupForm", "LowCPU");
       ckDelay.Text = Localization.Translate("SetupForm", "Delay");
       ckRestartOnError.Text = Localization.Translate("SetupForm", "RestartOnError");
+      ckTrueGrabbing.Text = Localization.Translate("SetupForm", "TrueGrabbing");	  
       lblRefreshRate.Text = Localization.Translate("SetupForm", "RefreshRate");
       ckBlackbarDetection.Text = Localization.Translate("SetupForm", "BlackbarDetection");
       lblBlackarDetectionMS.Text = Localization.Translate("SetupForm", "BlackbarDetectionThreshold");
@@ -802,6 +804,7 @@ namespace AtmoLight
       Settings.startAtmoWin = ckStartAtmoWin.Checked;
       Settings.exitAtmoWin = ckExitAtmoWin.Checked;
       Settings.restartOnError = ckRestartOnError.Checked;
+      Settings.trueGrabbing = ckTrueGrabbing.Checked;
       Settings.blackbarDetection = ckBlackbarDetection.Checked;
       Settings.blackbarDetectionTime = int.Parse(tbBlackbarDetectionTime.Text);
       Settings.delayReferenceRefreshRate = int.Parse(tbRefreshRate.Text);
