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

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    Problem:
    You cannot animate the control (ID 4) in TVOverlay.xml, because this window never reads animations or acts upon conditional visibility.

    Solution:
    Expose recording status to skin globally. This way you can animate controls based on recording status.

    This small patch will set #TV.View.isrecording to "yes" or "no", depending on the recording status, set directly from the TVOverlay.cs file.

    This patch does not change default behaviour. It is compied against TV-Server (TVPlugin) SVN 26774 but nothing here has changed in decades ;)

    Code:
    Index: TVOverlay.cs
    ===================================================================
    --- TVOverlay.cs	(revision 26810)
    +++ TVOverlay.cs	(working copy)
    @@ -67,10 +67,12 @@
             if (render)
             {
               QueueAnimation(AnimationType.WindowOpen);
    +          GUIPropertyManager.SetProperty("#TV.View.isrecording", "yes");
             }
             else
             {
               QueueAnimation(AnimationType.WindowClose);
    +          GUIPropertyManager.SetProperty("#TV.View.isrecording", "no");
             }
           }
         }
     

    Attachments

    • TVOverlay.patch
      540 bytes

    catavolt

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

    Hmm, very interesting. I have pulse animated recording pngs all over my skins, and it works without any problems. They are shown animated (pulsing) in TV OSDs, TVGuide, MiniEPG and all other screens. So what is your problem then? My Code:

    <control>
    <description>rec logo</description>
    <type>image</type>
    <id>4</id>
    <posX>1320</posX>
    <posY>5</posY>
    <height>40</height>
    <width>40</width>
    <texture>tv_is_recording.png</texture>
    <visible>!control.isvisible(12)+!control.isvisible(777)+!control.isvisible(10)</visible>
    <animation effect="zoom" start="100,100" end="110,110" time="500" condition="true" pulse="true">conditional</animation>
    </control>
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #3
    I just want an animation to occur when changing window, this can normally be done with

    Code:
    <animation effect="fade" time="250">WindowOpen</animation>
    <animation effect="fade" time="250">WindowClose</animation>

    but this doesn't apply to the control(s) in TVOverlay.xml since this window is always open. Your pulse animation can not be executed when the user moves from one window to another.

    What I want to do is to avoid setting a texture in control ID 4, but instead use my own control different places in the skin. #TV.View.isrecording would allow me to do that.
     

    catavolt

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

    Understand. With my solution the pulsing recording.png is always shown in all screens. Never treid it with WindowOpen animation.
     

    catavolt

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

    Hi Simone, if you are testing the latest Blue4Wide, there I have it implemented that way that it shows a pulse animated recording png in the top left corner of all screens, if a recording is going on ;)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #8
    so no need for code changes ? Nice.

    **Rejected**

    Simone

    I think you misunderstand this. Please read the thread and reconsider my patch. Currently you cannot animate the recording status on WindowOpen or WindowClose (or anything else). The animation starts when MP is started and that's it.
     

    jameson_uk

    Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I think there has been a little confusion as to what the patch does.

    I have deleted a few posts that were a little heated.

    Basically you are setting this new skin property when the TV overlay is loaded and then unsetting it when it is destroyed?

    I am not sure where you are trying to set the animations on control 4
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #10
    I think there has been a little confusion as to what the patch does.

    I have deleted a few posts that were a little heated.

    Basically you are setting this new skin property when the TV overlay is loaded and then unsetting it when it is destroyed?

    I am not sure where you are trying to set the animations on control 4

    I'll try and explain again:

    Problem
    tvOverlay.xml contains one control, a recording status with ID 4. As a skinner, you have no control over when this is shown. The file is loaded when MediaPortal starts. Therefore you cannot have:

    - an animation on the control that is conditional, say, shown on WindowOpen and shown on WindowClose
    - controls showing or hiding with a condition on whether control ID 4 is visible or not. Because it always is

    We all know that hardcoded labels or ID's are indesirable for a number of reasons. At least I hope that you know...basically they're the root of many problems for skinners. Think about it, this control with ID 4 can't be used anywhere else in the skin, not even in a plugin. Imagine the time a new skinner can spend on tracking down an issue like this.

    Anyways, the main problem is the missing conditions.

    Solution
    See post 1.

    What set me of is that neither chemelli or catavolt seemed to get the point, I don't want a pulse animation, as I clearly wrote if your read the thread.

    All of this is really of no matter to me as I have applied a fix in my own plugin. It just seems like a bad idea to fix all of the holes in MediaPortal with plugins, instead of doing it right the first time.

    If you still thinks what I'm saying is rubbish, please try and add an animation to the control in tvOverlay.xml that is run on WindowOpen. Or better yet, add your own controls to the file and see if they will run on WindowOpen. They won't.
     

    Users who are viewing this thread

    Top Bottom