[DISCUSSION] Patch WMC to run on Windows 10 final & possible alternatives

Discussion in 'Windows 10' started by ricktendo64, May 8, 2015.

  1. Graznok

    Graznok MDL Member

    Jan 29, 2013
    214
    120
    10
    #3761 Graznok, Feb 21, 2016
    Last edited by a moderator: Apr 20, 2017
    New attempt:

    ehshell.dll
    Code:
    // Microsoft.MediaCenter.Playback.MediaSession
    private void LoadMediaItem(IMediaItem mediaItem)
    {
        if ((mediaItem is BroadcastMediaItem && !(mediaItem is RadioMediaItem)) || mediaItem is DvdMediaItem || mediaItem is VcdMediaItem || mediaItem is VideoUriMediaItem)
        {
            if (Capabilities.IsUISessionRemoted && !Capabilities.IsExtenderDevice())
            {
                Log.TraceInfo("MediaSession:LoadMediaItem: RDC Session");
                this.UpdateFullScreen();
                this._mediaItemDenial = MediaSession._rdcDenial;
                this.FirstDenialChanged(mediaItem);
                return;
            }
            if (UiSession.Default.DeviceType == DeviceType.Gdi && !Capabilities.IsExtenderDevice())
            {
                Log.TraceInfo("MediaSession:LoadMediaItem: GDI Mode");
                this.UpdateFullScreen();
                this._mediaItemDenial = MediaSession._gdiDenial;
                this.FirstDenialChanged(mediaItem);
                return;
            }
    
            [...]
    
    }
    Bypassing those two conditions makes Media Center to show home menu without playing the video (when opening a .wtv file).
     
  2. TOFnow

    TOFnow MDL Junior Member

    Sep 10, 2015
    68
    7
    0
    I have the same experience on two machines, x64 and x86. Both running smoothly on 10586.104 and v12 WMC. Fortunately I imaged the good x64 before playing. The x86 is lower priority and all else works so I'm leaving 14267 on it.

    Getting the shortcut to ehshell.exe to work at all took several uninstalls, reboots, etc to get it working and when it did, I could never get it to recognize the HDhomerun Prime tuners even after a re-install and re-scan of the cable programs. No big deal since I've two others that work fine on 10586.104

    Just letting you know because, well, misery loves company! ;)
     
  3. crash2009

    crash2009 MDL Expert

    Dec 8, 2015
    1,369
    199
    60
  4. crash2009

    crash2009 MDL Expert

    Dec 8, 2015
    1,369
    199
    60
  5. Graznok

    Graznok MDL Member

    Jan 29, 2013
    214
    120
    10
    #3766 Graznok, Feb 22, 2016
    Last edited by a moderator: Apr 20, 2017
    ServiceBus.UIFramework.PageBasedUCPService
    ChooseRenderingMode
    Code:
    private RenderingInfo ChooseRenderingMode(UCPService.Options options, ICapabilities caps)
    {
        Platform platform = this.ChooseRenderingPlatform(options, caps);
        DeviceType deviceType = this.ChooseRenderingGraphicsDevice(options, caps, platform);
        SoundDeviceType sndType = this.ChooseRenderingSoundDevice(options, caps, platform);
        bool flag = this.ChooseRenderingRemotingMode(options, caps, platform);
        RenderingInfo result;
        if (flag)
        {
            TransportProtocols protocol;
            string stSessionName;
            bool fSwapByteOrder;
            bool fSplitDesktopMode;
            this.ChooseRemoteRenderingRemotingSettings(options, caps, platform, out protocol, out stSessionName, out fSwapByteOrder, out fSplitDesktopMode);
            result = new RenderingInfo(platform, deviceType, sndType, protocol, stSessionName, fSwapByteOrder, fSplitDesktopMode);
        }
        else
        {
            result = new RenderingInfo(platform, deviceType, sndType);
        }
        try
        {
            UCPUtility.LogDataPoint(LogService.LogId.DATAID_DEVICE_TYPE, Convert.ToUInt32(deviceType, CultureInfo.InvariantCulture));
        }
        catch (Exception)
        {
        }
        return result;
    }

    ChooseRenderingPlatform
    Code:
    private Platform ChooseRenderingPlatform(UCPService.Options options, ICapabilities caps)
    {
        Platform result = Platform.Min;
        if (caps.IsRemoteUIRenderingSupported && caps.IsRemoteUIRendererBigEndian)
        {
            result = Platform.Xenon;
        }
        if (options.GetFlag("xenon"))
        {
            result = Platform.Xenon;
        }
        return result;
    }

    ChooseRenderingGraphicsDevice
    Code:
    private DeviceType ChooseRenderingGraphicsDevice(UCPService.Options options, ICapabilities caps, Platform platform)
    {
        DeviceType deviceType;
        if (platform == Platform.Xenon)
        {
            deviceType = DeviceType.XeDirectX9;
        }
        else
        {
            if (caps.IsRemoteUIRenderingSupported)
            {
                deviceType = DeviceType.NtDirectX9;
            }
            else if (caps.IsGDIRendererUsed)
            {
                deviceType = DeviceType.Gdi;
            }
            else
            {
                deviceType = DeviceType.NtDirectX9;
            }
            if (options.GetFlag("gdi"))
            {
                deviceType = DeviceType.Gdi;
            }
            else if (options.GetFlag("dx9"))
            {
                deviceType = DeviceType.NtDirectX9;
            }
            else if (options.GetFlag("nogfx"))
            {
                deviceType = DeviceType.None;
            }
        }
        if (!this.PreCheckDisplaySettings(deviceType))
        {
            deviceType = DeviceType.Gdi;
        }
        return deviceType;
    }

    ChooseRenderingSoundDevice
    Code:
    private SoundDeviceType ChooseRenderingSoundDevice(UCPService.Options options, ICapabilities caps, Platform platform)
    {
        SoundDeviceType result;
        if (platform == Platform.Xenon)
        {
            result = SoundDeviceType.XAudio;
        }
        else
        {
            if (Capabilities.IsUISessionRemoted && Capabilities.Current.IsUISoundSupported)
            {
                result = SoundDeviceType.Extender;
            }
            else if (SoundManager.IsDeviceSupported(platform, SoundDeviceType.DirectX9))
            {
                result = SoundDeviceType.DirectX9;
            }
            else
            {
                result = SoundDeviceType.Min;
            }
            if (options.GetFlag("dsound9"))
            {
                result = SoundDeviceType.DirectX9;
            }
            else if (options.GetFlag("winapi"))
            {
                result = SoundDeviceType.Min;
            }
            else
            {
                options.GetFlag("nosnd");
            }
        }
        return result;
    }

    ChooseRenderingRemotingMode
    Code:
    private bool ChooseRenderingRemotingMode(UCPService.Options options, ICapabilities caps, Platform platform)
    {
        bool result = platform == Platform.Xenon;
        if (options.GetValue("remote") != null)
        {
            result = true;
        }
        return result;
    }

    ChooseRemoteRenderingRemotingSettings
    Code:
    private void ChooseRemoteRenderingRemotingSettings(UCPService.Options options, ICapabilities caps, Platform platform, out TransportProtocols protocol, out string stSessionInfo, out bool fReverseByteOrder, out bool fSplitDesktop)
    {
        if (platform == Platform.Xenon)
        {
            protocol = TransportProtocols.Min;
            stSessionInfo = "SPLASH";
            fReverseByteOrder = true;
            fSplitDesktop = true;
        }
        else
        {
            protocol = TransportProtocols.TCP;
            stSessionInfo = "0.0.0.0";
            fReverseByteOrder = false;
            fSplitDesktop = false;
        }
        if (options.GetValue("remote") != null)
        {
            protocol = TransportProtocols.TCP;
            stSessionInfo = options.GetValue("remote");
            fReverseByteOrder = (platform == Platform.Xenon);
            fSplitDesktop = (platform == Platform.Xenon);
        }
    }
     
  6. crash2009

    crash2009 MDL Expert

    Dec 8, 2015
    1,369
    199
    60
    #3767 crash2009, Feb 22, 2016
    Last edited by a moderator: Apr 20, 2017
    Mr. Graznok, you are truly amazing!
     
  7. DanB_DE

    DanB_DE MDL Novice

    Sep 11, 2015
    9
    1
    0
    #3768 DanB_DE, Feb 22, 2016
    Last edited: Feb 22, 2016
    For me too !!

    There are two different extender UI´s starting with W7:

    The one for Pica HW V2 Extenders (Links DMA,HP and Samsung), Ceton Echo (own HW) and for Xbox 360 (Xenon).

    Pica V2 / Ceton Echo:

    - Animations are not everywhere available and if , not so fluid then on the host

    Xbox 360:

    - mostly same UI experience as on the host. The Image used for the Xbox 360 is downloaded from the host everytime it starts. This image
    is optimized for the xenon proc of the xbox 360.

    I found this information regarding RDP and Extender:


    The RDP session is done over port 3390 instead of the regular port 3389. Connecting using regular user credentials results in an automatic logout right after being logged in. One can get the login screen, however, if the username “ Mcx1-<computer> ” where <computer> is the name of the Media Center PC. Doing so, I can get a login screen where the username has been changed to a UUID instead. My guess is that the UUID identifies the extender attempting to connect, and that the password has been negotiated during the initial pairing process.

    Videos are not played using RDP’s Multimedia Redirection extension or RemoteFX. Instead, they are played using RTSP. Videos also appear to be transcoded on-the-fly by the Media Center such that the extender can play them.

    The RDP session uses Standard RDP security, not TLS or NLA. Since the list of virtual channels advertised by the RDP client is sent before the exchange is encrypted, we can see which virtual channels are being used:
    •devcaps
    •avctrl
    •mcxsess
    •splash

    I am not aware of documentation for these virtual channel extensions, but some of the above open specifications mention RDP as a possible transport protocol. It is possible that some of these extensions are publicly documented, but I didn’t have the time to look into them more in depth.

    From : Google -> FreeRDP Windows-Media-Center

    If someone (Graznok ? ;-) )will find a way to open softsled (Extender) for x86 clients a dream for a lot a people will come true. btw I am the guy that Crash2009 is mentioning some times. i discovered
    a full working RDP session in 2011 by random. ;-) (Hello Crash2009)
     
  8. DanB_DE

    DanB_DE MDL Novice

    Sep 11, 2015
    9
    1
    0
    Hi Graznok,

    sorry for my late reply. Life was not working as expected. But now i am back on track.
    Can send a PM behause i have not 5 Posts yet, so i answer here.

    I still have an Linksys DMA Extender in my basement. it will only work with W7 (actually ;-)).
    If it still will help you, i will get it tomorrow from the basement, test if it works and send it two you.
    There was an Issue with Links Extenders, there trying to download / check for a firmware update, but linksys has removed the servers,
    so there was an freeze / loop issue, i have to test it before i send it to you.

    Dan
    #
     
  9. hwaynew

    hwaynew MDL Novice

    Feb 7, 2016
    22
    0
    0
    #3770 hwaynew, Feb 22, 2016
    Last edited: Feb 23, 2016
    Has anyone been able to get the guide in WMC working in this latest WMC patch? Thanks. Hope this is the right thread for this question. BTW, I am using a Hauppauge 9550Q USB stick, and am getting OTA channels using an antennae. Windows 10 Pro latest build, 14267.
     
  10. crash2009

    crash2009 MDL Expert

    Dec 8, 2015
    1,369
    199
    60
    2 Amazing's in the same day. Oh, you are that Dan, glad to meet you finally. I have been talking about you and your discovery quite a lot. Also have been collecting some bits and pieces in the link to Extender Project, in my signature.

    Thanks for giving us some hope regarding the Ceton Echo.
     

    Attached Files:

  11. crash2009

    crash2009 MDL Expert

    Dec 8, 2015
    1,369
    199
    60
    #3772 crash2009, Feb 22, 2016
    Last edited: Feb 22, 2016
    Me too Graznok. I will send you a Ceton Echo if you need it.

    Assembled "Of Course" and including the software.
     

    Attached Files:

  12. Gareth North

    Gareth North MDL Junior Member

    Jan 27, 2016
    68
    21
    0
    Media Center

    Hi All Media Center Lovers,

    Interesting to see all the chunks of code that may be the key to solving Extender connection issues on Windows 10. If only I had the skillset to be able to help on this. Wouldn't it be truly fantastic if all these Media Center issues and restrictions we've been putting up with for all these years could be absolutely blitzed once and for all. How ironic that Microsoft not porting it themselves to windows 10 kicked all this off.

    Extenders fully working (all 3 different types) would be an amazing achievement. I could never understand why Microsoft dropped the non 360 extenders from Windows 8.1 it seemed a crazy decision. I firmly believe there has been a conspiracy to tank this whole software which truly was ahead of its time and if it hadn't of been abandoned would of truly ruled the home for years. I truly cannot understand the appeal of Kodi and its Klunky List obsessed interface.

    My ultimate dream would be to have x2 Installers. One that you install on the Windows 10 server PC (the one with the tuner cards in) like the 12.7 version we have now. Then an Installer which you could install on another PC which gives you media center but in an extender version that hooks into the server machine exactly like extenders do now. But which you would have more options to playback MKV's that aren't limited to AC3 Sound and no subtitles.

    I've been trying to see if I can transition to an Intel NUC instead of my xbox's but its not going well! Not having Centralised recordings is a real problem for the wife. I've tried automating the copying of my recordings off the NUC back onto the server's recorded tv folder using Recorded TV Manager 4.1 but it seems such a silly solution. Was going to try Recorded TV broker software but h**p://babgvant.com is down at the moment. I don't suppose anyone has a copy? T-S suggested software that turns a network drive into looking like a local hard drive but no joy in finding software to do the job.

    For those who want to breathe new life into there Media Center setup. I have uploaded to my website what I think is the most beautiful Media Center theme there is that you can just drop into place by taking ownership of the ehres.dll in your ehome directory and drop mine in place (you don't need media center studio or Panchou Media center themer app) as I've saved every element of the theme into the dll. Its a concoction of the around the mountains theme that never really took of as it was never converted into a studio theme when it was offered on hack windows 7 media center and the Modern 8 metro inspired theme where a lot of work was done to redesign all the icons. Took me 2 hole days to merge together. I've been using it for 2 years and its tested fully on my extenders! Let me know if you like it. For 6.3.9600.16384

    bolexh16user.net/ehres.dll

    Picture of how it looks here:-

    bolexh16user.net/MediaCenter.jpg

    Best Regards and good luck in the reverse engineering!

    Gareth
     
  13. crash2009

    crash2009 MDL Expert

    Dec 8, 2015
    1,369
    199
    60
  14. crash2009

    crash2009 MDL Expert

    Dec 8, 2015
    1,369
    199
    60
    #3775 crash2009, Feb 22, 2016
    Last edited: Feb 23, 2016
    We have the beginnings of that now. Its a little rough around the edges, but it works. The recent project starts on or just before Post # 3509 Look for 1-Click-Install. This will allow you to connect to the server, using Remote Desktop Connection from either Win10 or Win7.

    My oh my, how times fly! I thought that was last week. It started Feb 8.

    Your theme looks great, and I like the idea of not having to use additional software.
     
  15. hamslammer

    hamslammer MDL Novice

    Feb 15, 2015
    10
    0
    0
    Beautiful theme, i'm loving it, thanks for sharing.
     
  16. dhjohns

    dhjohns MDL Guru

    Sep 5, 2013
    3,262
    1,733
    120
    I like your theme! I found that if someone does not like the background picture it can be changed with Windows Media Center Themer, yet all the icons remain untouched! Good Job!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. Gareth North

    Gareth North MDL Junior Member

    Jan 27, 2016
    68
    21
    0
    Hi All,

    Glad those who have tried it like the "Around the Mountains" theme. The best way to maipulate it or create a new theme from scratch without having to permanently use additonal software like Pachous Media Center Themer is to download a copy of Restorator (do a google search for the name) which comes with a 30 day trial open my ehres.dll in it and it will list all the resources of the dll in a tree structure on the left. I forget the folder with all the images in but have a rummage and you'll find it and every image I've had to swap replace to get it to work has a different icon on it in the tree!!!. You can then swap out any key picture you like and resave the dll.

    If anyone has a copy of Recorded TV Broker please message me!

    Anyway enough of themes... I give the forum back to the reverse engineers.... and await with baited breath.

    Best Regards

    Gareth
     
  18. Graznok

    Graznok MDL Member

    Jan 29, 2013
    214
    120
    10
    #3779 Graznok, Feb 23, 2016
    Last edited by a moderator: Apr 20, 2017
    @DavidinCT

    Keeping my last ehshell.dll RDP-patch, try the following:
    Code:
    0x182112      28 32 63 00 06 2D
                  16 00 00 00 00 2C
    This will prevent Media Center from droping Extenders when it doesn't see a remote session.
     
  19. Graznok

    Graznok MDL Member

    Jan 29, 2013
    214
    120
    10
    About my previous UI issues with HDMI (I'm not speaking about E-AC3 problem, just UI), it appears that enabling secondary HDMI monitor before launching Media Center doesn't cause this problem. No hangs since three days!