[Pending] Remove unneeded video-windows from code (1 Viewer)

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Hi

    In The TVPlugin we have TVGuide.cs (mytvguide.xml), that contains some (leftover?) skin controls:

    [SkinControl(98)] protected GUIImage videoBackground;
    [SkinControl(99)] protected GUIVideoControl videoWindow;

    These controls are not used anywhere in the plugin. In fact, the only place where there is a GUIVideoControl is in TVHome.cs, but this has another ID and is not related to the one at hand.

    Why would I remove it?
    Simply because with every skin MP complains about the missing controls. Any skin I know uses the overlay-windows to display video in a corner (if needed).

    In addition to this, MediaPortal itself also has this leftover control two places; in GUIHomeBaseWindow.cs (myHome.xml) and in GUIBasicHome.cs (BasicHome.xml).

    Here MP even seems to initiate the controls on page load:

    GUIHomeBaseWindow.cs:
    Code:
    	protected override void OnPageLoad()
    	{
    	  base.OnPageLoad();
    	  //set video window position
    	  if (videoWindow != null)
    	  {
    		videoWindow.OnInit();
    	  }
    	}

    and GUIBasicHome.cs:
    Code:
    	  //set video window position
    	  if (_videoWindow != null)
    	  {
    		GUIGraphicsContext.VideoWindow = new Rectangle(_videoWindow.XPosition, _videoWindow.YPosition,
    													  _videoWindow.Width, _videoWindow.Height);
    	  }

    Why would it do that? Isn't the skin supposed to use the overlay windows to show video?

    As far as I can tell, removing these controls and the code with them gives no sideeffects when building and running MediaPortal. I'll be happy to supply patches, but want to get your take on why the code is even there.

    :D
     
    Last edited by a moderator:

    Users who are viewing this thread

    Top Bottom