[Pending] - Remove unneeded video-windows from code

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

  1. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    April 2, 2008
    Likes Received:
    Technical consultant, marketing
    +517 / 0
    Home Country:
    Denmark Denmark

    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:

    Code (Text):
    2.     protected override void OnPageLoad()
    3.     {
    4.       base.OnPageLoad();
    5.       //set video window position
    6.       if (videoWindow != null)
    7.       {
    8.         videoWindow.OnInit();
    9.       }
    10.     }
    and GUIBasicHome.cs:
    Code (Text):
    2.       //set video window position
    3.       if (_videoWindow != null)
    4.       {
    5.         GUIGraphicsContext.VideoWindow = new Rectangle(_videoWindow.XPosition, _videoWindow.YPosition,
    6.                                                       _videoWindow.Width, _videoWindow.Height);
    7.       }
    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.


    Last edited by a moderator: March 15, 2013

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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.


  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!