[Bug] Dshowhelper don't use the good screen to compute freqs (1 Viewer)

technick

Portal Pro
May 6, 2009
566
155
Home Country
France France
Hi Scythe42,

this patch work partially, it retrieve refresh rate of the (good ?) screen (not the 60hz of the touch screen).... but it's not the good refresh rate :)

It's not a problem of 1 or 2 screens, ou can make the test with 1 screen only, it change nothing.

-If I use 24p as default refresh rate it retrieve always 24hz, it's look like it retrieve the refresh rate before the script change it and not after.

-If I don't use the defaut refresh rate it retrieve the refresh before the script change it but if I stop the video (the refresh don't change) and re-run the video it keep the 1st refresh rate found :-/

In this sample I use 2 screens, setup windows to 50 hz and play a bluray mkv at 24hz. The screen goes to 24hz but the detected refresh rate is 50hz. (tested on a 26046 build)

View attachment 64447
 

Scythe42

Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    50
    Berlin
    Home Country
    Germany Germany
    Was a small bug, I forgot to increment the counter for the active display. So it got the RR from display number + 1, which probably does not exist and therefore we fallback to Direct3D RR detection which returns the RR rate when MP was started (nasty habit of D3D to not seeing RR changes of an application)

    The refresh rate is taken directly from the driver when playback begins, so RR change always happens first. It's just a matter of MP getting the right display and passing it to the EVR presenter. I just added the passing of GUIGraphicsContext.currentScreenNumber to the EVR presenter.

    I see in the Log that the display the EVR presenter is running on is "0" (close to the top of evr.log). This is strange, as I expected it to be "1" in your case or else it would be the same as without the patch. Maybe the GUIGraphicsContext.currentScreenNumber doesn't contain the right screen, which would be a different bug that needs to be fixed as well.

    Or do you run the GUI on one screen and play the movie on another? In this case GUIGraphicsContext.currentScreenNumber is correct and I need to get the screen for playback from somewhere else.

    I fixed the small bug with the +1. Please try again.

    If this still does not work properly, I'll create a small command line utility that outputs all the active display path so I can see what the driver sees to debug this further.

    We'll get there but it might require some more iterations as I can't connect multiple displays to my dev machine.
     

    Attachments

    • rr_v2.zip
      1,006.2 KB

    technick

    Portal Pro
    May 6, 2009
    566
    155
    Home Country
    France France
    Now it retrieve the 60hz of the touch screen :-/

    Everything is playing on the windows screen 2, the PC boot on the screen 1 (touchscreen) then the desktop is display on the screen 2 (TV).


    Displaychanger see this : I have 2 graphic cards so 4 screens



    View attachment 64451
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    50
    Berlin
    Home Country
    Germany Germany
    Thanks for testing and posting the DisplayChanger output. I'll check with some other Devs why GUIGraphicsContext.currentScreenNumber doesn't provide the correct screen number here.
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    50
    Berlin
    Home Country
    Germany Germany
    The dshelper patch was ok. But there's more broken on the C# side in regards to multi display support. I need to dig a bit deeper into that code to see if it's fixable in a reasonable amount of time.
     

    Users who are viewing this thread

    Top Bottom