Plugin: RefreshRateChanger (1 Viewer)

kilik360

MP Donator
  • Premium Supporter
  • September 3, 2010
    574
    232
    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,400
    6,972
    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
    574
    232
    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
    574
    232
    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

    morpheus_xx

    Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,400
    6,972
    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
    574
    232
    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
    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 (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    joecrow 1.25.0 Radio Time plugin fails after Resume from Sleep with MP 1.25 Bugreports 4
    P MP2: US user, OTA - can NOT get SchedulesDirect plugin to work on MP1 or MP2 --> how do I get OTA schedule? General 5
    E aktuelle englische Forums Webseite von - Showtime Plugin v3 Plugins & Erweiterungen 4
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    joecrow MultiShortcut Plugin (Uavailable) in DWHD skin General Support 58
    vapourEyes Building TV Plugin General Development (no feature request here!) 49
    Golf4 Nach Windows-Updates läuft TV-Plugin nicht mehr Allgemeines Support- und Diskussionsforum 0
    joecrow How about a Launcher plugin for MP1? MediaPortal 1 6
    D [solved] TVServer Plugin must be missing something. General Development (no feature request here!) 1
    framug Nouveau plugin XmlTvFR pour récupérer le guide télé français Kazer / ZguideTv (WebEPGfr) 11
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    D Where should plugins be located on hard drive? General Support 0
    D how to disengage from one version of a plugin to use another Newcomers Forum 0
    cbr954rr How to disable a pre-configured plugin? General 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    framug [Rejected] Fix PowerScheduler plugin for MP2 single seat Submit: Code Patches 9
    doskabouter [Question] Stale plugins Developer Discussions 9
    M MP1 stops responding after Starting Plugins General Support 14
    Terra LAVFilter Plugin cannot be updated (MP1.23) MediaPortal 1 Plugins 10
    L Mediaportal 1.21 and Windows 10: user schedules de-activated when powerscheduler plugin is selected General Support 1
    C Can the XmlTv Plugin handle 600+ channels? General 3
    M Online Video Plugin V.2.32 keine Installtion unter MediaPortal 1.22 ? TV / Streaming 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    C where is the Online Videos plugin General Support 1
    Similar threads

























    Top Bottom