Plugin: RefreshRateChanger (1 Viewer)

kilik360

MP Donator
  • Premium Supporter
  • September 3, 2010
    576
    235
    Home Country
    Canada Canada
    Country flag
    I was pretty sure that I found the "Holy Grail" to help you @morpheus_xx nailed that problem. Not earing anything from you after my new discovery says it all.
     

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,752
    7,115
    Home Country
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #82
    You know that I currently switch the rendering engine to D2D, this takes my full time. I this regard, could you please test the testbuild with refresh rate changer? Would be good to know if the problem is still present with DX11
     

    kilik360

    MP Donator
  • Premium Supporter
  • September 3, 2010
    576
    235
    Home Country
    Canada Canada
    Country flag
    Can you test the attached version?
    Of course, it's my job !

    Well... what can I say. I tested your files and I can't see anything wrong ! The 60hz RRC problem is officially DONE !

    CONGRATS morpheux_xx !

    Honnestly, I danced in front of my TV yesterday and my girlfriend was like... WTF !?!?
    I said morpheus did it !! morpheus did it honey !! LOL.

    thanks morpheus, i'll send proper log this evening with/without the patch to let you see.

    A small step for MP2, but a great step for BETA !
     

    kilik360

    MP Donator
  • Premium Supporter
  • September 3, 2010
    576
    235
    Home Country
    Canada Canada
    Country flag
    Here's my logs.

    There's one last thing that has not been cured with the patch, it's when the video go throught the end, RRC try to switch back to 60hz (GUI) but stays at 24hz.
    But If I stop myself the video before the end, RRC act like it should and switch to 60hz succesfully (GUI).

    • in bad.rrc.7z, I stopped the video myself and GUI switch to 60hz
    • in good.rrc.7z, I let the video play throught the end and the switch failed and the TV stays at 24hz, started a new video to see how it goes in the log...
    EDIT: I forgot to mention that the fix works for MP2 Dx11 version too !!!
     

    Attachments

    • bad.rrc.7z
      14.5 KB · Views: 66
    • good.rrc.7z
      17.5 KB · Views: 72

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,752
    7,115
    Home Country
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #88
    Fine!

    The remaining issue is maybe related to the Atmolight plugin (I think I mentioned it before). At least there are some exceptions logged (taken from the "bad.rrc.7z"):
    [2015-01-15 20:41:43,086] [25144 ] [AMQ 'ScreenManager'] [DEBUG] - ScreenManager: Disabling background screen rendering
    [2015-01-15 20:41:43,087] [25145 ] [DX Render] [ERROR] - AtmoLight: Exception: Object reference not set to an instance of an object.
    [2015-01-15 20:41:43,090] [25148 ] [AMQ 'ScreenManager'] [DEBUG] - ScreenManager: Disabling background screen rendering
    [2015-01-15 20:41:43,092] [25150 ] [DX Render] [ERROR] - AtmoLight: Exception: Object reference not set to an instance of an object.
    [2015-01-15 20:41:43,096] [25154 ] [AMQ 'SynchronizeToPrimaryPlayer'] [DEBUG] - RefreshRateChanger.SetDisplayConfig(...): Successfully switched to 24000/1001
    [2015-01-15 20:41:43,117] [25175 ] [DX Render] [ERROR] - AtmoLight: Exception: Object reference not set to an instance of an object.

    But this log also tells about a "Stop" key press and a sucessful switch back to 60 Hz:
    [2015-01-15 20:42:11,552] [53609 ] [GenericPCQueue] [DEBUG] - IrInputPlugin: Received Message 'RemoteEvent' Stop
    [2015-01-15 20:42:11,553] [53610 ] [GenericPCQueue] [DEBUG] - IrInputPlugin: Mapped Key 'Stop' to '[Stop]'
    [2015-01-15 20:42:11,556] [53613 ] [AMQ 'PlayerBackgroundManager'] [DEBUG] - ScreenManager: Setting background screen 'default-background'...
    [2015-01-15 20:42:11,558] [53615 ] [AMQ 'PlayerBackgroundManager'] [DEBUG] - ScreenManager: Loading screen from file path 'C:\Program Files (x86)\Team MediaPortal\MP2-Client\Plugins\SkinBase\Skin\default\backgrounds\default-background.xaml'...
    [2015-01-15 20:42:11,558] [53615 ] [AMQ 'ScreenManager'] [DEBUG] - ScreenManager: Enabling background screen rendering
    [2015-01-15 20:42:11,557] [53614 ] [InputMgr ] [DEBUG] - VideoPlayer: Stop
    [2015-01-15 20:42:11,565] [53622 ] [InputMgr ] [DEBUG] - VideoPlayer: Stop playing
    [2015-01-15 20:42:11,935] [53992 ] [InputMgr ] [DEBUG] - VideoPlayer: Graph state after stop command: Stopped
    [2015-01-15 20:42:12,014] [54071 ] [InputMgr ] [INFO ] - Releasing filter DirectShow.FilterGraph, remaining references: 1
    [2015-01-15 20:42:12,018] [54075 ] [AMQ 'Plugin'] [INFO ] - AtmoLight: Playback stopped.
    [2015-01-15 20:42:12,018] [54075 ] [AMQ 'SynchronizeToPrimaryPlayer'] [INFO ] - SkinEngine MainForm: SynchronizeToVideoPlayerFramerate: Restore default rendering, no new Player!
    [2015-01-15 20:42:12,021] [54078 ] [AMQ 'Plugin'] [DEBUG] - AtmoLight: LEDs can be activated.
    [2015-01-15 20:42:12,022] [54079 ] [AMQ 'Plugin'] [DEBUG] - AtmoLight: Effect "MediaPortalLiveMode" is already active. Nothing to do.
    [2015-01-15 20:42:12,023] [54080 ] [AMQ 'PlayerContextManager'] [DEBUG] - ThreadPool.CheckThreadIncrementRequired(): Incrementing thread count 1 with 1
    [2015-01-15 20:42:12,023] [54080 ] [AMQ 'SynchronizeToPrimaryPlayer'] [DEBUG] - RefreshRateChanger.SetDisplayConfig(...): SDC_VALIDATE of 60000/1001 succesful
    ...
    [2015-01-15 20:42:12,166] [54223 ] [AMQ 'ScreenManager'] [DEBUG] - ScreenManager: Showing screen 'BrowseMediaNavigation'
    [2015-01-15 20:42:12,558] [54615 ] [AMQ 'SynchronizeToPrimaryPlayer'] [DEBUG] - RefreshRateChanger.SetDisplayConfig(...): Successfully switched to 60000/1001
    [2015-01-15 20:42:12,772] [54829 ] [DX Render] [DEBUG] - ScreenManager: Closing screen 'FullscreenContentVideo'
    [2015-01-15 20:42:12,803] [54860 ] [AMQ 'SynchronizeToPrimaryPlayer'] [INFO ] - GraphicsDevice: DirectX initialized 1920x1080 (format: X8R8G8B8 25 Hz)
    [2015-01-15 20:42:12,835] [54892 ] [AMQ 'SynchronizeToPrimaryPlayer'] [INFO ] - GraphicsDevice: DirectX initialized 1920x1080 (format: X8R8G8B8 59 Hz)
    [2015-01-15 20:42:13,531] [55588 ] [AtmoLight GetAtmoLiveViewSource] [DEBUG] - AtmoLight: AtmoWinHandler - AtmoWin Liveview Source is not lvsExternal
    [2015-01-15 20:42:13,533] [55590 ] [AtmoLight GetAtmoLiveViewSource] [DEBUG] - AtmoLight: AtmoWinHandler - Changing AtmoWin Liveview Source to: lvsExternal
    [2015-01-15 20:42:13,580] [55637 ] [AtmoLight GetAtmoLiveViewSource] [INFO ] - AtmoLight: AtmoWinHandler - Successfully changed AtmoWin Liveview Source to: lvsExternal

    Btw, there is an open issue with PiP player I need to explain:
    When changing refresh rates, the original one is remembered. But if player end in another order, they might restore a wrong refresh rate. Example:

    Source situation idle: 60Hz
    1) -> playback Primary Video: 23fps -> remembers "60", switches to 23
    2) -> playback Secondary Video: 25fps -> remembers current "23", switching to "25"

    You see, if now 1) ends before, screen switches back to "60" (remembered primary rate). If 2) stops thereafter, it restores its remembered "23", which is different than our starting point.

    This can only be solve by remaining a shared history of refresh rate switches and each player pops out his source rates on stop until list is empty.
     

    kilik360

    MP Donator
  • Premium Supporter
  • September 3, 2010
    576
    235
    Home Country
    Canada Canada
    Country flag
    I don't know if it's important to you but you can edit your first post with the good one !
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Country flag
    Had another look at this. The AtmoLight errors result from the source surface being null between refreshrate changes.
    This is the code im using:

    Code:
            if (ServiceRegistration.Get<IPlayerContextManager>().IsVideoContextActive)
            {
              player = ServiceRegistration.Get<IPlayerContextManager>().PrimaryPlayerContext.CurrentPlayer as ISharpDXVideoPlayer;
              surfaceSource = player.Surface;
            }
            else
            {
              surfaceSource = SkinContext.Device.GetRenderTarget(0);
            }

    At the point where the error happens the else clause is used and

    Code:
    SkinContext.Device.GetRenderTarget(0)

    returns null instead of a surface.
    I would add a check and if it returns null just return the method if you dont have any better solution. But im not sure how this would influence the refreshrate changer or other parts of mp2. If this happens right now, the exception gets catched and the method returns alrady, just with an error message in the logs.
    Btw. i could only see this error come up on video start not on video end or stop.
     

    Users who are viewing this thread

    Similar threads

    If it keeps annoying me enough I'll have to help you with that :whistle: That's weird, because video locks up first with audio still playing for a few more seconds before MediaPortal restarts, but this will give me a few more avenues to test for. The main difference is that when I was on 1.19-1.21 without this issue that it was HTPC...
    If it keeps annoying me enough I'll have to help you with that :whistle: That's weird, because video locks up first with audio...
    I've been dealing with weird crashes. The display would go into a checkerboard, or mainly a giant purple banner across the screen...
    Replies
    8
    Views
    652
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common user requirements out of the box. Aside from its support for Live TV and Radio, it offers a complete media server for music, movies, and TV shows. Info is automatically downloaded from various sources to...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    Replies
    0
    Views
    766
    • Sticky
    Just for your information: couldn't find the ns*.tmp file...
    Just for your information: couldn't find the ns*.tmp file...
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the...
    Replies
    39
    Views
    1K
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me over the edge for sure.;)
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me...
    We are proud to present MediaPortal 2.3 MediaPortal 2.3 is a full-blown media center software that addresses the most common user...
    Replies
    4
    Views
    2K
    I thinks this is the first time I've installed MP on all my machines without a single IO error 32. Good work guys, thanks!
    I thinks this is the first time I've installed MP on all my machines without a single IO error 32. Good work guys, thanks!
    We have just released MediaPortal 1.26 - Winter is coming... Highlights of this release Bugfixes: [MP1-5031] - Fix Invalid File...
    Replies
    1
    Views
    1K
    Top Bottom