[Rejected] Patch to expose recording status to skin (1 Viewer)

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    This is mainly my lack of understanding of the skin engine so bear with me...

    I have a feeling that tvOverlay is treated differently to normal because it is a layer rather than a standard window.

    What I don't get however is when you want the on window open animation to fire? Are you saying that you want to animate the control when a user opens other (normal) windows or just that you want it animated when a recording starts ?

    Or are you saying that what you would do is use a dummy image in tvoverlay.xml so nothing gets displayed and then display your own image based on the new condition?

    Perhaps (mainly for my benefit) it would help if you could post a skin file of what you want to use this new condition for
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #12
    This is mainly my lack of understanding of the skin engine so bear with me...

    I have a feeling that tvOverlay is treated differently to normal because it is a layer rather than a standard window.

    What I don't get however is when you want the on window open animation to fire? Are you saying that you want to animate the control when a user opens other (normal) windows or just that you want it animated when a recording starts ?

    Or are you saying that what you would do is use a dummy image in tvoverlay.xml so nothing gets displayed and then display your own image based on the new condition?

    Perhaps (mainly for my benefit) it would help if you could post a skin file of what you want to use this new condition for

    Yes, tvOverlay is loaded on start of MediaPortal and never shifts state. It is always on top of all other windows. It's a kind of a freak child ;)

    You cannot animate this screen or the control with ID 4 with or without my patch. But you can expose the state of the control, and therefore the recording status of MediaPortal.

    On all my (normal) screens I have included common.title.xml that contains this:

    Code:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <window>
    	<controls>
    
    		<control>
    			<type>image</type>
    			<id>0</id>
    			<posX>0</posX>
    			<posY>0</posY>
    			<width>377</width>
    			<height>41</height>
    			<texture>header_bg_left.png</texture>
    			<shouldCache>true</shouldCache>
    			<animation effect="fade" time="250">WindowOpen</animation>
    			<animation effect="fade" time="250">WindowClose</animation>
    		</control>
    		  
    		<control>
    			<description>Date Time</description>
    			<type>label</type>
    			<id>0</id>
    			<posX>20</posX>
    			<posY>2</posY>
    			<width>377</width>
    			<label>#header.label</label>
    			<font>main_medium</font>
    			<textcolor>ff666666</textcolor>
    			<animation effect="fade" time="250">WindowOpen</animation>
    			<animation effect="fade" time="250">WindowClose</animation>
    		</control>
    		
    		<control>
    			<description>rec logo</description>
    			<type>image</type>
    			<id>0</id>
    			<posX>345</posX>
    			<posY>0</posY>
    			<texture>header_isrec_left.png</texture>
    			<visible>string.equals(#TV.View.isrecording,yes)</visible>
    			<animation effect="fade" delay="200" time="100">WindowOpen</animation>
    			<animation effect="fade" time="100">WindowClose</animation>
    		</control>
    		
    	</controls>
    </window>

    Using my patch, I can now animate a copy of the recording status. I can make it fade, slide, pulse or whatever I want. The pulse animation catavolt is using is not restarted when you move between windows. You can see this if you change it to a slide animation. Unless you make it a pulse animation, it is only animate when MediaPortal is started AND when a recording is running.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    That makes sense to me and I can see the flexibility this would add. I will ask chemelli and catavolt to have another look.

    btw what is your tvoverlay.xml ? (as effectively you are bypassing the overlay using this condition and conditional visibility)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #14
    That makes sense to me and I can see the flexibility this would add. I will ask chemelli and catavolt to have another look.

    btw what is your tvoverlay.xml ? (as effectively you are bypassing the overlay using this condition and conditional visibility)

    tvOverlay.xml is not much different form the default one, I just removed the reference to the texture:

    Code:
    <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <window>
      <id>3002</id>
      <defaultcontrol>2</defaultcontrol>
      <allowoverlay>no</allowoverlay>
      <controls>
    
        <control>
          <description>rec logo</description>
          <type>image</type>
          <id>4</id>
          <texture>-</texture>
        </control>	
    	
      </controls>
    </window>

    Please note that the patch will not break existing functionality - it just extends a property that can be used all over the skin.

    :D

    EDIT: I'm not asking this to be in 1.2.0 Beta as we have a feature freeze, but it would be nice to have in 1.3.0. And as mentioned, I can work my way around it with the plugin.
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    If it was marked as Evaluate before feature freeze, then it might go to 1.2 beta. Why is still marked as Rejected? Shouldn't it be back to Evaluate? :)
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    I have read the entire thread thoroughly and reviewed your patch. As I understand it the problem is that WindowOpen and WindowClose animations do not work (are there other animations that do not work?). The expected behavior is to have WindowOpen/Close animations triggered when the TVOverlay layer's visibility changes (it does when recording state changes). In fact the code does queue the WindowOpen/Close animations when it recording starts/ends, so the question is why it does not work.

    But your patch does not solve that issue. Instead it works around the issue by exposing a new property, so that you can duplicate a specific control (what about the other controls in tvoverlay?) in every window that uses tvoverlay and use animations on that control.

    I would prefer to have a proper solution and with that in mind I would still reject this patch.
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    14,900
    11,121
    Königstein (Taunus)
    Home Country
    Germany Germany
    AW: Patch to expose recording status to skin

    You can expose a recording GFX anywhere in the skin when using the visibility condition <visible>string.equals(#TV.View.isrecording,yes)</visible> or even <visible>player.recording</visible>. This control may also be animated in all ways you want (e.g. I do this in my own skins in different screens), so there is absolutely no need for this patch.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #18
    Re: AW: Patch to expose recording status to skin

    You can expose a recording GFX anywhere in the skin when using the visibility condition <visible>string.equals(#TV.View.isrecording,yes)</visible> or even <visible>player.recording</visible>. This control may also be animated in all ways you want (e.g. I do this in my own skins in different screens), so there is absolutely no need for this patch.

    I would like you to check the source-code of both MediaPortal and the TVPlugin - none of them contains #TV.View.isrecording and my test shows no recording pin using either option.

    Maybe it works on singleseat but it definately doesn't in multiseat.

    Actually I'm pretty sure your examples are leftovers of TVE2. But please prove me wrong...

    EDIT:

    All the TV.View properties exposed can be searched, and there is no "isrecording":

    Code:
    Find all "#TV.View", Subfolders, Keep modified files open, Find Results 1, "Entire Solution"
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvFullScreen.cs(1195):        string channel = GUIPropertyManager.GetProperty("#TV.View.channel");
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvFullScreen.cs(1905):      movieDetails.SearchString = GUIPropertyManager.GetProperty("#TV.View.title");
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2463):        GUIPropertyManager.SetProperty("#TV.View.IsAC3", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2464):        GUIPropertyManager.SetProperty("#TV.View.IsMP1A", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2465):        GUIPropertyManager.SetProperty("#TV.View.IsMP2A", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2466):        GUIPropertyManager.SetProperty("#TV.View.IsAAC", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2467):        GUIPropertyManager.SetProperty("#TV.View.IsLATMAAC", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2473):            GUIPropertyManager.SetProperty("#TV.View.IsAC3",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2479):            GUIPropertyManager.SetProperty("#TV.View.IsMP1A",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2485):            GUIPropertyManager.SetProperty("#TV.View.IsMP2A",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2491):            GUIPropertyManager.SetProperty("#TV.View.IsAAC",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2497):            GUIPropertyManager.SetProperty("#TV.View.IsLATMAAC",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2523):        GUIPropertyManager.SetProperty("#TV.View.channel", displayName + " (" + GUILocalizeStrings.Get(604) + ")");
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2524):        GUIPropertyManager.SetProperty("#TV.View.title", g_Player.currentTitle);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2525):        GUIPropertyManager.SetProperty("#TV.View.compositetitle", g_Player.currentTitle);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2526):        GUIPropertyManager.SetProperty("#TV.View.description", g_Player.currentDescription);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2528):        GUIPropertyManager.SetProperty("#TV.View.start", startTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2529):        GUIPropertyManager.SetProperty("#TV.View.stop", endTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2532):          GUIPropertyManager.SetProperty("#TV.View.title", rec.Title);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2533):          GUIPropertyManager.SetProperty("#TV.View.compositetitle", TVUtil.GetDisplayTitle(rec));
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2534):          GUIPropertyManager.SetProperty("#TV.View.subtitle", rec.EpisodeName);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2535):          GUIPropertyManager.SetProperty("#TV.View.episode", rec.EpisodeNumber);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2539):        GUIPropertyManager.SetProperty("#TV.View.thumb", string.IsNullOrEmpty(strLogo) ? "defaultVideoBig.png" : strLogo);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2580):      GUIPropertyManager.SetProperty("#TV.View.title", GUILocalizeStrings.Get(736));          // no epg for this channel
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2581):      GUIPropertyManager.SetProperty("#TV.View.compositetitle", GUILocalizeStrings.Get(736)); // no epg for this channel
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2582):      GUIPropertyManager.SetProperty("#TV.View.start", String.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2583):      GUIPropertyManager.SetProperty("#TV.View.stop", String.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2584):      GUIPropertyManager.SetProperty("#TV.View.description", String.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2585):      GUIPropertyManager.SetProperty("#TV.View.subtitle", String.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2586):      GUIPropertyManager.SetProperty("#TV.View.episode", String.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2587):      GUIPropertyManager.SetProperty("#TV.View.genre", String.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2588):      GUIPropertyManager.SetProperty("#TV.View.Percentage", "0");
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2597):      GUIPropertyManager.SetProperty("#TV.View.channel", ch.DisplayName);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2605):      GUIPropertyManager.SetProperty("#TV.View.title", current.Title);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2606):      GUIPropertyManager.SetProperty("#TV.View.compositetitle", TVUtil.GetDisplayTitle(current));
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2607):      GUIPropertyManager.SetProperty("#TV.View.start",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2609):      GUIPropertyManager.SetProperty("#TV.View.stop",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2611):      GUIPropertyManager.SetProperty("#TV.View.description", current.Description);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2612):      GUIPropertyManager.SetProperty("#TV.View.subtitle", current.EpisodeName);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2613):      GUIPropertyManager.SetProperty("#TV.View.episode", current.EpisodeNumber);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2614):      GUIPropertyManager.SetProperty("#TV.View.genre", current.Genre);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2615):      GUIPropertyManager.SetProperty("#TV.View.remaining",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2623):      GUIPropertyManager.SetProperty("#TV.View.thumb", strLogo);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVHome.cs(2654):        GUIPropertyManager.SetProperty("#TV.View.Percentage", percentLivePoint.ToString());
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1503):          GUIPropertyManager.SetProperty("#TV.View.start", strTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1506):          GUIPropertyManager.SetProperty("#TV.View.stop", strTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1507):          GUIPropertyManager.SetProperty("#TV.View.remaining", Utils.SecondsToHMSString(prog.EndTime - prog.StartTime));
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1551):            GUIPropertyManager.SetProperty("#TV.View.thumb", strLogo);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1565):          GUIPropertyManager.SetProperty("#TV.View.compositetitle", title);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1566):          GUIPropertyManager.SetProperty("#TV.View.start", startTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1567):          GUIPropertyManager.SetProperty("#TV.View.stop", endTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1587):        GUIPropertyManager.SetProperty("#TV.View.start", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1588):        GUIPropertyManager.SetProperty("#TV.View.stop", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1589):        GUIPropertyManager.SetProperty("#TV.View.remaining", string.Empty);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1648):          GUIPropertyManager.SetProperty("#TV.View.Percentage", "0");
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1661):        GUIPropertyManager.SetProperty("#TV.View.Percentage", fPercent.ToString());
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1681):          GUIPropertyManager.SetProperty("#TV.View.channel", prog.ReferencedChannel().DisplayName);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1682):          GUIPropertyManager.SetProperty("#TV.View.start",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1684):          GUIPropertyManager.SetProperty("#TV.View.stop",
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1686):          GUIPropertyManager.SetProperty("#TV.View.remaining", Utils.SecondsToHMSString(prog.EndTime - prog.StartTime));
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1687):          GUIPropertyManager.SetProperty("#TV.View.genre", prog.Genre);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1688):          GUIPropertyManager.SetProperty("#TV.View.title", prog.Title);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1689):          GUIPropertyManager.SetProperty("#TV.View.compositetitle", TVUtil.GetDisplayTitle(prog));
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1690):          GUIPropertyManager.SetProperty("#TV.View.subtitle", prog.EpisodeName);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1691):          GUIPropertyManager.SetProperty("#TV.View.description", prog.Description);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1692):          GUIPropertyManager.SetProperty("#TV.View.episode", prog.EpisodeNumber);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1718):            GUIPropertyManager.SetProperty("#TV.View.Percentage", "0");
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1725):          GUIPropertyManager.SetProperty("#TV.View.Percentage", fPercent.ToString());
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1728):          GUIPropertyManager.SetProperty("#TV.View.channel", channelDisplayName);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1729):          GUIPropertyManager.SetProperty("#TV.View.start", startTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1730):          GUIPropertyManager.SetProperty("#TV.View.stop", endTime);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1731):          GUIPropertyManager.SetProperty("#TV.View.genre", rec.Genre);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1732):          GUIPropertyManager.SetProperty("#TV.View.title", rec.Title);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1733):          GUIPropertyManager.SetProperty("#TV.View.compositetitle", TVUtil.GetDisplayTitle(rec));
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1734):          GUIPropertyManager.SetProperty("#TV.View.description", rec.Description);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1735):          GUIPropertyManager.SetProperty("#TV.View.subtitle", rec.EpisodeName);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TvOSD.cs(1736):          GUIPropertyManager.SetProperty("#TV.View.episode", rec.EpisodeNumber);
      D:\MP Dev\mediaportal-27138\TvEngine3\TVLibrary\TvPlugin\TvPlugin\TVZapOSD.cs(464):      GUIPropertyManager.SetProperty("#TV.View.Percentage", fPercent.ToString());
      Matching lines: 78    Matching files: 4    Total files searched: 209
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #19
    I have read the entire thread thoroughly and reviewed your patch. As I understand it the problem is that WindowOpen and WindowClose animations do not work (are there other animations that do not work?). The expected behavior is to have WindowOpen/Close animations triggered when the TVOverlay layer's visibility changes (it does when recording state changes). In fact the code does queue the WindowOpen/Close animations when it recording starts/ends, so the question is why it does not work.

    But your patch does not solve that issue. Instead it works around the issue by exposing a new property, so that you can duplicate a specific control (what about the other controls in tvoverlay?) in every window that uses tvoverlay and use animations on that control.

    I would prefer to have a proper solution and with that in mind I would still reject this patch.

    I agree that if the problem can be solved in tvOverlay, it should be. But what other controls in tvOverlay are we talking about? Neither Blue3 or Blue3Wide has any other controls than the one with ID 4. And check the sourcecode that loads tvOverlay.xml, it has no other controls than ID 4... (it refers to GUILayerManager.cs which I believe contains the enum "LayerType" where it gets its ID).

    tvOverlay.cs:

    Code:
    #region Copyright (C) 2005-2010 Team MediaPortal
    
    // Copyright (C) 2005-2010 Team MediaPortal
    // https://www.team-mediaportal.com
    // 
    // MediaPortal 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 of the License, or
    // (at your option) any later version.
    // 
    // MediaPortal 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 MediaPortal. If not, see <http://www.gnu.org/licenses/>.
    
    #endregion
    
    using System;
    using MediaPortal.GUI.Library;
    using TvControl;
    
    namespace TvPlugin
    {
      /// <summary>
      /// 
      /// </summary>
      public class TvOverlay : GUIInternalOverlayWindow, IRenderLayer
      {
        private DateTime _updateTimer = DateTime.Now;
        private bool _lastStatus = false;
        private bool _didRenderLastTime = false;
    
        public TvOverlay()
        {
          GetID = (int)Window.WINDOW_TV_OVERLAY;
        }
    
        public override bool Init()
        {
          bool bResult = Load(GUIGraphicsContext.Skin + @"\tvOverlay.xml");
          GetID = (int)Window.WINDOW_TV_OVERLAY;
          GUILayerManager.RegisterLayer(this, GUILayerManager.LayerType.TvOverlay);
          return bResult;
        }
    
        public override void PreInit()
        {
          base.PreInit();
          AllocResources();
        }
    
        public override bool SupportsDelayedLoad
        {
          get { return false; }
        }
    
        #region IRenderLayer
    
        private void OnUpdateState(bool render)
        {
          if (_didRenderLastTime != render)
          {
            _didRenderLastTime = render;
            if (render)
            {
              QueueAnimation(AnimationType.WindowOpen);
            }
            else
            {
              QueueAnimation(AnimationType.WindowClose);
            }
          }
        }
    
        public bool ShouldRenderLayer()
        {
          if (GUIGraphicsContext.IsFullScreenVideo)
          {
            return false;
          }
          //{
          //  OnUpdateState(false);
          //  return base.IsAnimating(AnimationType.WindowClose);
          //}      
    
          TimeSpan ts = DateTime.Now - _updateTimer;
          if (ts.TotalMilliseconds < 1000)
          {
            return _lastStatus;
          }
    
          _lastStatus = TVHome.IsAnyCardRecording;
    
          _updateTimer = DateTime.Now;
          OnUpdateState(_lastStatus);
          if (!_lastStatus)
          {
            return base.IsAnimating(AnimationType.WindowClose);
          }
          else
          {
            return _lastStatus;
          }
        }
    
        public void RenderLayer(float timePassed)
        {
          if (GUIGraphicsContext.IsFullScreenVideo)
          {
            return;
          }
          Render(timePassed);
        }
    
        #endregion
      }
    }

    GUILayerManager.cs:

    Code:
    using System;
    
    namespace MediaPortal.GUI.Library
    {
      public class GUILayerManager
      {
        public GUILayerManager();
    
        public static IRenderLayer GetLayer(GUILayerManager.LayerType zOrder);
        public static void RegisterLayer(IRenderLayer renderer, GUILayerManager.LayerType zOrder);
        public static void Render(float timePassed);
    
        public static void UnRegisterLayer(IRenderLayer renderer);
    
        public enum LayerType
        {
          Gui = 0,
          MusicOverlay = 1,
          VideoOverlay = 2,
          TvOverlay = 3,
          Video = 4,
          WeatherOverlay = 5,
          TopOverlay = 6,
          Osd = 7,
          Topbar1 = 8,
          Topbar2 = 9,
          Dialog = 10,
          MiniEPG = 11,
        }
      }
    }
     

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    TVOverlay is also an IRenderLayer that is why it is registered in GUILayerManager and LayerType.TvOverlay is its layer id. All this is unrelated to control and window ids.

    Regardless of the above, a skinner may choose to insert more controls in tvoverlay.xml. E.g. a recording pin that animates on WindowOpen/Close and stays on as long as the layer is visible and a message in a frame (label and an image) that fade in and out on WindowOpen i.e. when the layer becomes visible. Furthermore, in the future controls could be added to TvOverlay if deemed necessary and then we will run into the same problem again.
     

    Users who are viewing this thread

    Top Bottom