[Evaluate] - MP Tray extended - monitors and audio devices switch (using remote)

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by yoavain, October 19, 2012.

  1. yoavain
    • Premium Supporter

    yoavain Extension Dev

    Joined:
    May 24, 2009
    Messages:
    426
    Likes Received:
    304
    Gender:
    Male
    Occupation:
    Senior Software Engineer
    Ratings:
    +467 / 0
    Home Country:
    Israel Israel
    Show System Specs
    (Decided to give it another try, since the first one was in the wrong forum)

    I'm running MP on a PC with 2 monitors and 2 audio output devices. Every time I go to the living room to start MP with the remote, I first need to switch displays. Then I have to switch from my speakers to the SPDIF output.

    I've decided to extend MPTray to do this for me, with a click of a remote button.
    I've added a Settings options:
    [​IMG]
    Here's the configuration screenshot:
    [​IMG]



    Everything is already implemented, everything is configurable, just needs to be merged to project;);)

    It uses 2 executables to do the actual switch:
    1. DisplaySwitch.exe (which is part of windows 7 & 8; tested only on windows 7)
    2. SoundSwitch.AudioInterface.exe to switch between audio output devices.

    I wasn't able to create a patch file that contains the EXE in it, so I zip them both.
    If someone can help me with creating a proper patch file, I'll be happy to upload it instead.
     

    Attached Files:

    Last edited: April 1, 2013
    • Like Like x 4
    • Agree Agree x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. yoavain
    • Premium Supporter

    yoavain Extension Dev

    Joined:
    May 24, 2009
    Messages:
    426
    Likes Received:
    304
    Gender:
    Male
    Occupation:
    Senior Software Engineer
    Ratings:
    +467 / 0
    Home Country:
    Israel Israel
    Show System Specs
    [​IMG]
     
    Last edited: April 1, 2013
    • Like Like x 2
  4. yoavain
    • Premium Supporter

    yoavain Extension Dev

    Joined:
    May 24, 2009
    Messages:
    426
    Likes Received:
    304
    Gender:
    Male
    Occupation:
    Senior Software Engineer
    Ratings:
    +467 / 0
    Home Country:
    Israel Israel
    Show System Specs
    Edited original post:
    • New implementation
    • New screenshots
    • New patch file
     
    • Like Like x 2
  5. erichzann
    • Premium Supporter

    erichzann MP Donator

    Joined:
    October 25, 2011
    Messages:
    244
    Likes Received:
    20
    Gender:
    Male
    Occupation:
    Platform Manager
    Location:
    Oxford
    Ratings:
    +31 / 0
    Home Country:
    United Kingdom United Kingdom
    Hi, this looks fantastic. Just what I need.

    Always seems a shame that when I set up the projector I need to alt-tab to the desktop.

    I'll give this a test on Windows 8 when I get home in the next few days. Does the display switch allow you to set particular resolutions?

    Thanks
     
    • Like Like x 1
  6. yoavain
    • Premium Supporter

    yoavain Extension Dev

    Joined:
    May 24, 2009
    Messages:
    426
    Likes Received:
    304
    Gender:
    Male
    Occupation:
    Senior Software Engineer
    Ratings:
    +467 / 0
    Home Country:
    Israel Israel
    Show System Specs
    Hi erichzann,

    Currently this is only a patch (code), not a compiled version, but if you would like to test this feature on windows 8, you can PM me.

    The way this works is the same as pressing win+p and selecting 'Projector only' or 'Computer only'.
    Resolution is the same as it is configured for each screen. For example, I have one screen set to full HD (1920x1080), and the other to 1360x768. The resolution is changed to the resolution of the next screen.

    Yoav
     
    • Like Like x 1
  7. Scythe42
    • Premium Supporter

    Scythe42 Retired Team Member

    Joined:
    June 20, 2009
    Messages:
    2,065
    Likes Received:
    2,632
    Gender:
    Male
    Occupation:
    Professional Hacker
    Location:
    Berlin
    Ratings:
    +2,724 / 1
    Home Country:
    Germany Germany
    Show System Specs
    http://www.eventghost.org/ can do more than this. You should check it out. This was written for automating stuff on windows. For what you doing it is setup in a couple of minutes.

    MPTray is just a replacement for ehtray.exe that just starts Mediaportal like ehtray.exe did for Windows Media Center. Everything else needs to be nicely inside MediaPortal itself. Calling 3rd party exes is not the way. Would open a can of worms here.

    But if you like you can fork MPTray and release it on your own and call it something else.

    But as said, check out Event Ghost it will make you happy. I even think there's a plugin to send Events from MP to EventGhost allowing MP to take leverage what you have configured there. Do not know if it is maintained, though.
     
    Last edited: April 2, 2013
  8. erichzann
    • Premium Supporter

    erichzann MP Donator

    Joined:
    October 25, 2011
    Messages:
    244
    Likes Received:
    20
    Gender:
    Male
    Occupation:
    Platform Manager
    Location:
    Oxford
    Ratings:
    +31 / 0
    Home Country:
    United Kingdom United Kingdom
    Yes, once I realised there was a hotkey for changing display I will use event ghost for this.

    Also there is a mp volume control plugin that allows you to switch audio source.
     
    Last edited: April 2, 2013
  9. yoavain
    • Premium Supporter

    yoavain Extension Dev

    Joined:
    May 24, 2009
    Messages:
    426
    Likes Received:
    304
    Gender:
    Male
    Occupation:
    Senior Software Engineer
    Ratings:
    +467 / 0
    Home Country:
    Israel Israel
    Show System Specs
    Thanks Scythe42,
    I thought about using EventGhost, AotoHotkey or alike, but I just didn't want another program intercepting input.
    this all started with compiling the MPTray to do the stuff described above for my own purposes. I just made the extra effort to making it configurable for other to be able to use.
    I still think this kind of configuration should be integrated into the MP for those users who do not have a dedicated PC just for MediaPortal.
     
    • Agree Agree x 1
  10. kiwijunglist
    • Team MediaPortal

    kiwijunglist Super Moderator

    Joined:
    June 10, 2008
    Messages:
    6,746
    Likes Received:
    1,420
    Occupation:
    Doctor
    Location:
    New Zealand
    Ratings:
    +1,849 / 9
    Home Country:
    New Zealand New Zealand
    Show System Specs
    Hi, since you are modding MP Tray you might want to also implement this feature which is lacking in the original MP Tray.

    If I press the MCE Start button while MP is not running then MP is loaded,

    however...

    If I press the MCE Start button when MP is in the system tray (ie, Minimise MP to tray on exit), then nothing happens. In this situation I think MP should be restored.
     
    Last edited: April 4, 2013
    • Agree Agree x 1
  11. yoavain
    • Premium Supporter

    yoavain Extension Dev

    Joined:
    May 24, 2009
    Messages:
    426
    Likes Received:
    304
    Gender:
    Male
    Occupation:
    Senior Software Engineer
    Ratings:
    +467 / 0
    Home Country:
    Israel Israel
    Show System Specs
    This is not in MPTray. MPTray is only launching MP when it's not running (this is how it was designed). It ignores any remote control presses if the MP is already running, since MP should handle them itself.
    Afaik, MP already does that. When I press the MCE button, if MP is minimized, it is restored to full screen. Maybe you have a configuration issue.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!