[Pending] - Remove unneeded video-windows from code

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by pilehave, October 14, 2011.

    • Premium Supporter

    pilehave Community Skin Designer

    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 (text):

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

          //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

Share This Page

Users Viewing Thread (Users: 0, Guests: 0)

Running the latest version?

V1.3.0 FINAL - released March 2013
Releasenews | Download
Changelog
 | Requirements
HTPC
Team-MediaPortal
 
About
Contact |  Press
Partners