From: <mis...@us...> - 2008-01-22 22:01:14
|
Revision: 1300 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1300&view=rev Author: misterd_sf Date: 2008-01-22 14:01:00 -0800 (Tue, 22 Jan 2008) Log Message: ----------- Better error protection Added group element Fixed some bugs in the OSD library Updated copyright Modified Paths: -------------- trunk/plugins/My MPlayer/ExternalOSDLibrary/BaseWindow.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/DialogWindow.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/BaseElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ButtonElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/CheckMarkElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/FadeLabelElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ImageElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/LabelElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ListElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ProgressControlElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/SliderElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/TextScrollUpElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ToggleButtonElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VerticalScrollbarElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VolumeBarElement.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/ExternalOSDLibrary.csproj trunk/plugins/My MPlayer/ExternalOSDLibrary/FullscreenWindow.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDForm.cs trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDWindow.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/AudioSubtitleHandler.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExternalOSDLibrary.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IMessageHandler.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IOSDHandler.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/InternalOSDHandler.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/SeekingHandler.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/VideoHandler.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_Share.cs trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.Designer.cs trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.cs trunk/plugins/My MPlayer/MPlayer_Installer/Installer.cs Added Paths: ----------- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/GroupElement.cs Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/BaseWindow.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/BaseWindow.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/BaseWindow.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 @@ -89,10 +89,11 @@ /// - GUIVolumeBar /// - GUILabelControl /// - GUIImage + /// - GUIGroup /// </summary> /// <param name="control">Control</param> /// <returns>Elmenet based on the GUIControl</returns> - protected BaseElement GenerateElement(GUIControl control) { + public static BaseElement GenerateElement(GUIControl control) { if (control.GetType() == typeof(GUIImage)) { return new ImageElement(control); } else if (control.GetType() == typeof(GUILabelControl)) { @@ -115,6 +116,8 @@ return new TextScrollUpElement(control); } else if (control.GetType() == typeof(GUIListControl)) { return new ListElement(control); + } else if (control.GetType() == typeof(GUIGroup)) { + return new GroupElement(control); } Log.Debug("VIDEOPLAYER_OSD FOUND UNEXPECTED TYPE: " + control.GetType().ToString()); return null; Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/DialogWindow.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/DialogWindow.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/DialogWindow.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/BaseElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/BaseElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/BaseElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ButtonElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ButtonElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ButtonElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/CheckMarkElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/CheckMarkElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/CheckMarkElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/FadeLabelElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/FadeLabelElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/FadeLabelElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 @@ -82,11 +82,11 @@ String text = GUIPropertyManager.Parse(_label.Label); SizeF sizeF = graph.MeasureString(text, _font); if (alignment == GUIControl.Alignment.ALIGN_LEFT) { - rectangle = new RectangleF((float)_label.Location.X, (float)_label.Location.Y, _label.Width, _label.Height); + rectangle = new RectangleF((float)_label.XPosition, (float)_label.YPosition, _label._width, Math.Max(sizeF.Height,_label._height)); } else if (alignment == GUIControl.Alignment.ALIGN_RIGHT) { - rectangle = new RectangleF((float)_label.Location.X - sizeF.Width, (float)_label.Location.Y, _label.Width, _label.Height); + rectangle = new RectangleF((float)_label.Location.X - sizeF.Width, (float)_label.Location.Y, _label.Width, Math.Max(sizeF.Height, _label.Height)); } else { - rectangle = new RectangleF((float)_label.Location.X - (sizeF.Width / 2), (float)_label.Location.Y - (sizeF.Height / 2), _label.Width, _label.Height); + rectangle = new RectangleF((float)_label.Location.X - (sizeF.Width / 2), (float)_label.Location.Y - (sizeF.Height / 2), _label.Width, Math.Max(sizeF.Height, _label.Height)); } graph.DrawString(text, _font, _brush, rectangle,StringFormat.GenericTypographic); } Added: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/GroupElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/GroupElement.cs (rev 0) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/GroupElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -0,0 +1,112 @@ +#region Copyright (C) 2006-2008 MisterD + +/* + * Copyright (C) 2006-2008 MisterD + * + * 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, 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 GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.Text; +using System.Windows; +using MediaPortal.GUI.Library; + +namespace ExternalOSDLibrary { + /// <summary> + /// This class represents a GUIGroup + /// </summary> + public class GroupElement : BaseElement { + #region variables + /// <summary> + /// GUICheckMarkControl + /// </summary> + private GUIGroup _group; + + /// <summary> + /// List of all children elements + /// </summary> + private List<BaseElement> _childrens; + + #endregion + + #region ctor + /// <summary> + /// Creates the element and retrieves all information from the control + /// </summary> + /// <param name="control">GUIControl</param> + public GroupElement(GUIControl control) + : base(control) { + _group = control as GUIGroup; + UIElementCollection childrens = _group.Children; + _childrens = new List<BaseElement>(); + GUIControl temp; + BaseElement element; + foreach (UIElement child in childrens) { + temp = child as GUIControl; + if (temp != null) { + element = BaseWindow.GenerateElement(temp); + if (element != null) { + _childrens.Add(element); + } + } + } + Log.Debug("VideoPlayerOSD: Found group element: " + _group.GetID); + } + #endregion + + #region implmenented abstract method + /// <summary> + /// Draws the element on the given graphics + /// </summary> + /// <param name="graph">Graphics</param> + public override void DrawElement(Graphics graph) { + if (_group.Visible) { + foreach (BaseElement child in _childrens) { + child.DrawElement(graph); + } + } + } + + /// <summary> + /// Disposes the object + /// </summary> + public override void Dispose() { + foreach (BaseElement child in _childrens) { + child.Dispose(); + } + } + + /// <summary> + /// Checks, if an update for the element is needed + /// </summary> + /// <returns>true, if an update is needed</returns> + protected override bool CheckElementSpecificForUpdate() { + bool result = false; + foreach (BaseElement child in _childrens) { + result = result | child.CheckForUpdate(); + } + return result; + } + #endregion + } +} Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ImageElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ImageElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ImageElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 @@ -67,9 +67,6 @@ /// <param name="graph">Graphics</param> public override void DrawElement(Graphics graph) { if (_image.Visible && !_image.FileName.Equals("black.bmp")) { - if (_image.FileName.Equals("video+2x.png")) { - Log.Debug("DISPLAYING 2X"); - } DrawElementAlternative(graph, GetImageRectangle()); } } Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/LabelElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/LabelElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/LabelElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ListElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ListElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ListElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 @@ -242,11 +242,11 @@ RectangleF rectangle; SizeF stringSize = graph.MeasureString(_label, _font); if (_alignment == GUIControl.Alignment.ALIGN_LEFT) { - rectangle = new RectangleF(_xPosition, _yPosition, _width, _height); + rectangle = new RectangleF(_xPosition, _yPosition, _width, Math.Max(stringSize.Height,_height)); } else if (_alignment == GUIControl.Alignment.ALIGN_RIGHT) { - rectangle = new RectangleF(_xPosition - stringSize.Width, _yPosition, _width, _height); + rectangle = new RectangleF(_xPosition - stringSize.Width, _yPosition, _width, Math.Max(stringSize.Height,_height)); } else { - rectangle = new RectangleF(_xPosition - (stringSize.Width / 2), _yPosition - (stringSize.Height / 2), _width, _height); + rectangle = new RectangleF(_xPosition - (stringSize.Width / 2), _yPosition - (stringSize.Height / 2), _width, Math.Max(stringSize.Height,_height)); } graph.DrawString(GUIPropertyManager.Parse(_label), _font, _brush, rectangle, StringFormat.GenericTypographic); } Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ProgressControlElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ProgressControlElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ProgressControlElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/SliderElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/SliderElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/SliderElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/TextScrollUpElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/TextScrollUpElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/TextScrollUpElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 @@ -83,11 +83,11 @@ SizeF textSize = graph.MeasureString(_label, _font); RectangleF rectangle; if (_textScrollUp.TextAlignment == GUIControl.Alignment.ALIGN_LEFT) { - rectangle = new RectangleF((float)_textScrollUp.Location.X, (float)_textScrollUp.Location.Y, _textScrollUp.Width, _textScrollUp.Height); + rectangle = new RectangleF((float)_textScrollUp.Location.X, (float)_textScrollUp.Location.Y, _textScrollUp.Width, Math.Max(textSize.Height,_textScrollUp.Height)); } else if (_textScrollUp.TextAlignment == GUIControl.Alignment.ALIGN_RIGHT) { - rectangle = new RectangleF((float)_textScrollUp.Location.X - textSize.Width, (float)_textScrollUp.Location.Y, _textScrollUp.Width, _textScrollUp.Height); + rectangle = new RectangleF((float)_textScrollUp.Location.X - textSize.Width, (float)_textScrollUp.Location.Y, _textScrollUp.Width, Math.Max(textSize.Height,_textScrollUp.Height)); } else { - rectangle = new RectangleF((float)_textScrollUp.Location.X - (textSize.Width / 2), (float)_textScrollUp.Location.Y - (textSize.Height / 2), _textScrollUp.Width, _textScrollUp.Height); + rectangle = new RectangleF((float)_textScrollUp.Location.X - (textSize.Width / 2), (float)_textScrollUp.Location.Y - (textSize.Height / 2), _textScrollUp.Width, Math.Max(textSize.Height,_textScrollUp.Height)); } graph.DrawString(GUIPropertyManager.Parse(_label), _font, _brush, rectangle, StringFormat.GenericTypographic); } Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ToggleButtonElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ToggleButtonElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/ToggleButtonElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VerticalScrollbarElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VerticalScrollbarElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VerticalScrollbarElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VolumeBarElement.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VolumeBarElement.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/Elements/VolumeBarElement.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/ExternalOSDLibrary.csproj =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/ExternalOSDLibrary.csproj 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/ExternalOSDLibrary.csproj 2008-01-22 22:01:00 UTC (rev 1300) @@ -53,6 +53,7 @@ </ItemGroup> <ItemGroup> <Compile Include="BaseWindow.cs" /> + <Compile Include="Elements\GroupElement.cs" /> <Compile Include="Elements\VerticalScrollbarElement.cs" /> <Compile Include="Elements\TextScrollUpElement.cs" /> <Compile Include="Elements\ListElement.cs" /> Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/FullscreenWindow.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/FullscreenWindow.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/FullscreenWindow.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 @@ -93,21 +93,46 @@ _controlList = _fullscreenWindow.controlList; GenerateElements(); GUIControl temp; + GUIControl temp2; + GUIGroup help; _cacheElements = new List<BaseElement>(); foreach (UIElement element in _controlList) { temp = element as GUIControl; - if (temp.GetID == LABEL_ID) { + if (temp != null) { + if (temp.GetType() == typeof(GUIGroup)) { + help = temp as GUIGroup; + foreach (UIElement uiElement in help.Children) { + temp2 = uiElement as GUIControl; + if (temp2 != null) { + checkElement(temp2); + } + } + } + checkElement(temp); + } + } + } + #endregion + + private void checkElement(GUIControl temp) { + if (temp.GetID == LABEL_ID) { + if (temp.GetType() == typeof(GUILabelControl)) { _label = new LabelElement(temp); + } else { + Log.Info("VIDEO OSD: TYPE LABEL NOT FOUND FOR LABEL_ID=10 IN FULLSCREEN WINDOW. FOUND: " + temp.GetType()); } - if (temp.GetID == BACKGROUND_ID) { + } + if (temp.GetID == BACKGROUND_ID) { + if (temp.GetType() == typeof(GUIImage)) { _background = new ImageElement(temp); + } else { + Log.Info("VIDEO OSD: TYPE IMAGE NOT FOUND FOR BACKGROUND_ID=0 IN FULLSCREEN WINDOW. FOUND: " + temp.GetType()); } - if (temp.GetID == PROGRESS_ID || (temp.GetID > PANEL_START && temp.GetID < PANEL_END)) { - _cacheElements.Add(GenerateElement(temp)); - } } + if (temp.GetID == PROGRESS_ID || (temp.GetID > PANEL_START && temp.GetID < PANEL_END)) { + _cacheElements.Add(GenerateElement(temp)); + } } - #endregion #region implemented abstract methods /// <summary> Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDController.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDForm.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDForm.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDForm.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDWindow.cs =================================================================== --- trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDWindow.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/ExternalOSDLibrary/OSDWindow.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/AudioSubtitleHandler.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/AudioSubtitleHandler.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/AudioSubtitleHandler.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/AudioSection.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/GeneralSection.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/StreamSection.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/SubtitleSection.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationPanel/VideoSection.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExternalOSDLibrary.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExternalOSDLibrary.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExternalOSDLibrary.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IMessageHandler.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IMessageHandler.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IMessageHandler.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IOSDHandler.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IOSDHandler.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/IOSDHandler.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/InternalOSDHandler.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/InternalOSDHandler.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/InternalOSDHandler.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 @@ -66,11 +66,16 @@ private OnActionHandler _actionHandler; /// <summary> - /// Exit Handler of the MP process + /// Exit Handler of the MPlayer process /// </summary> private EventHandler _exitHandler; /// <summary> + /// DataReceivedHandler of the MPlayer process to parse the output message of MPlayer + /// </summary> + private DataReceivedEventHandler _dataReceivedHandler; + + /// <summary> /// Configuration Manager /// </summary> private ConfigurationManager _configManager; @@ -107,7 +112,7 @@ /// </summary> public MPlayer_ExtPlayer() { _configManager = ConfigurationManager.getInstance(); - + } #endregion @@ -239,7 +244,8 @@ _exitHandler = new EventHandler(mplayerProcess_Exited); _mplayerProcess.Exited += _exitHandler; _mplayerProcess.Start(); - _mplayerProcess.OutputDataReceived += new DataReceivedEventHandler(mplayerProcess_OutputDataReceived); + _dataReceivedHandler = new DataReceivedEventHandler(mplayerProcess_OutputDataReceived); + _mplayerProcess.OutputDataReceived += _dataReceivedHandler; _mplayerProcess.BeginOutputReadLine(); _input = _mplayerProcess.StandardInput; result = true; @@ -274,6 +280,7 @@ if (_videoHandler.HasVideo) { _videoHandler.RemoveVideoWindowToForm(); } + _mplayerProcess.OutputDataReceived -= _dataReceivedHandler; _videoHandler.Dispose(); _audioSubtitleHandler.Dispose(); _playState = PlayState.Stopped; @@ -281,6 +288,14 @@ GUIWindowManager.OnNewAction -= _actionHandler; _mplayerProcess.Exited -= _exitHandler; _osdHandler.Dispose(); + int loop = 0; + while (!_mplayerProcess.HasExited && loop < 20) { + Thread.Sleep(50); + loop++; + } + if (!_mplayerProcess.HasExited) { + _mplayerProcess.Kill(); + } } /// <summary> @@ -395,13 +410,14 @@ public override void Release() { if (_playState == PlayState.Playing || _playState == PlayState.Paused) { SendCommand("quit"); + _mplayerProcess.OutputDataReceived -= _dataReceivedHandler; _videoHandler.Dispose(); _audioSubtitleHandler.Dispose(); GUIWindowManager.OnNewAction -= _actionHandler; _mplayerProcess.Exited -= _exitHandler; } } - #endregion + #endregion #region InitSystem /// <summary> @@ -411,7 +427,7 @@ private void initSystem(bool isVideo) { _playState = PlayState.Playing; if (_configManager.OsdMode == OSDMode.InternalMPlayer || !isVideo) { - _osdHandler = new InternalOSDHandler(this,true); + _osdHandler = new InternalOSDHandler(this, true); } else if (_configManager.OsdMode == OSDMode.ExternalOSDLibrary) { _osdHandler = new ExternalOSDLibrary(this); } @@ -464,15 +480,19 @@ /// <param name="sender">Sender object</param> /// <param name="e">Event arguments</param> private void mplayerProcess_OutputDataReceived(object sender, DataReceivedEventArgs e) { - String result = e.Data; - if (result != null) { - Log.Info("MPlayer: Data received: " + e.Data); - foreach (IMessageHandler messageHandler in _messageHandlers) { - messageHandler.HandleMessage(result); + try { + String result = e.Data; + if (result != null) { + Log.Info("MPlayer: Data received: " + e.Data); + foreach (IMessageHandler messageHandler in _messageHandlers) { + messageHandler.HandleMessage(result); + } + if (result.StartsWith("Exiting... (End of file)")) { + _playState = PlayState.Ended; + } } - if (result.StartsWith("Exiting... (End of file)")) { - _playState = PlayState.Ended; - } + } catch (Exception ex) { + Log.Error("MPlayer: exception occured while handling message", ex); } } #endregion Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/SeekingHandler.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/SeekingHandler.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/SeekingHandler.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/VideoHandler.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/VideoHandler.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/VideoHandler.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_GUIPlugin.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_Share.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_Share.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/MPlayer_Share.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,7 +1,7 @@ -#region Copyright (C) 2006-2007 MisterD +#region Copyright (C) 2006-2008 MisterD /* - * Copyright (C) 2006-2007 MisterD + * Copyright (C) 2006-2008 MisterD * * 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 Modified: trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.Designer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.Designer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,4 +1,28 @@ -namespace MPlayer { +#region Copyright (C) 2006-2008 MisterD + +/* + * Copyright (C) 2006-2008 MisterD + * + * 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, 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 GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +namespace MPlayer { partial class ConfigurationWizard { /// <summary> /// Erforderliche Designervariable. Modified: trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_Installer/ConfigurationWizard.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,3 +1,27 @@ +#region Copyright (C) 2006-2008 MisterD + +/* + * Copyright (C) 2006-2008 MisterD + * + * 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, 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 GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + using System; using System.Collections.Generic; using System.ComponentModel; Modified: trunk/plugins/My MPlayer/MPlayer_Installer/Installer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_Installer/Installer.cs 2008-01-22 19:32:21 UTC (rev 1299) +++ trunk/plugins/My MPlayer/MPlayer_Installer/Installer.cs 2008-01-22 22:01:00 UTC (rev 1300) @@ -1,3 +1,27 @@ +#region Copyright (C) 2006-2008 MisterD + +/* + * Copyright (C) 2006-2008 MisterD + * + * 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, 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 GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + using System; using System.Collections; using System.Collections.Generic; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |