[Approved] - Framegrabber improvement - Capture from UI when Video is minimized or running in Mini-display | Page 2

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by popy, February 24, 2015.

  1. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    The MP part looks good at first glance (only looking at patches atm). Will test laster today or tomorrow.
    The AtmoLight code however has some problems. Frames only have to be discarded when video is playing (g_Player.Playing) and we are not in fullscreen (!GUIGraphicsContext.IsFullScreenVideo). Then AtmoLight should determain which frame to throw away, so a new setting for users to choose how to behave is needed (as @azzuro wanted). So if idk how to call the new setting :p, Settings.TrueGrabbing and FrameSource == FrameGrabber.FrameSource.Video -> return, and if !Settings.TrueGrabbing and FrameSource == FrameGrabber.FrameSource.GUI -> return.

    The menuEffect you are using in your patch holds the info which effect was last used for gui/menu content (no playback). playbackEffect holds the effect that is used when video/music etc is playing, no matter if fullscreen or not. But we wont need any of these. Also AtmolightPlugin_OnNewFrame will return automatically if the current effect is not MP Live mode (1st if in that method).



    Also if you are adding a new setting and you add that to the setupform, please use the dev branch (https://github.com/ambilight-4-mediaportal/AtmoLight/tree/DEV) as base. We changed the localisation and we would need to touch your code and translation strings a second time when we want to merge it ;).

    Thanks! :)
     
    • Like Like x 3
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. popy
    • Super User

    popy Super User

    Joined:
    July 3, 2011
    Messages:
    614
    Likes Received:
    83
    Ratings:
    +140 / 2
    Show System Specs
    v4 patch of Atmolight is uploaded. Its based on the DEV version.
    Mediaportal patch is untouched.

    @Lightning303: as before can you please review and test it?

    Another question:
    My mediaportal 1.11pre installation with patched core files shows now the following messagebox:
    upload_2015-3-6_15-46-56.png

    This happens since i have switched to the Atmolight dev branch.
    Where can ill change this in the plugin?

    thx
    pOpY
     
    • Like Like x 1
  4. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Not sure, have you recompiled the core based on DEV branch? Never had this problem. What do the logs say?

    Regarding latest patch.
    If i see that correct, this version wont allow any GUI grabbing if you disable TrueGrabbing. E.g. TrueGrabbing disabled and i enable MP Live Mode in Menu/GUI (no playback), then both the ifs are true (!Settings.trueGrabbing / else) and (FrameSource == FrameGrabber.FrameSource.GUI) and the method will always return without processing. Though i want to GUI frames to show. So some more checks would be needed there to make sure to only return in the right cases.
     
  5. popy
    • Super User

    popy Super User

    Joined:
    July 3, 2011
    Messages:
    614
    Likes Received:
    83
    Ratings:
    +140 / 2
    Show System Specs
    Yes I have recompiled the core. Will look at it later because plugin runs as it should.

    That's how it should work. User can decide if he wants to see gui data or not!!???? I'll think we should define what the option should do, or is it needed:

    Enable or disable Complete Gui grabbing, like in patch v4

    Or

    Just enable or disable Gui data when video is minimized.

    I'll think the better way was if Menu/Gui effect is MpLiveMode that Gui data will be used also when minimized -> like patch v3 was. So there is no extra setting and it does what it's name is.

    Popy
     
    Last edited: March 6, 2015
  6. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    OK, there are some misconceptions. Let me clear this up.
    Firstly the content effects/effect settings.

    [​IMG]

    "Video/TV/Recordings" is active when a video (e.g. video file, live tv, or stream) is playing back. This is the effect that is being used no matter if this video is in fullscreen or if its minimized.
    "Music" is active if music is playing. No matter if its in fullscreen or minized.
    "Radio" same as "Music".
    "Menu/GUI" is active if no media is playing.
    "MediaPortal Exit" is the effect that gets send to your target software (e.g. AtmoWin) when you close MP.

    So, when you play a video and minimze it. Then "Video/TV/Recordings" is still the effect being used.


    This discussion started, because you thought it would be better that when a video is played back, but minimized, then AtmoLight should show what is actually on screen (the gui) and not the video.
    I agree, this would be better. However i think, and @azzuro also said, that it would be better that the user can decide for themselfs if they want this new bahaviour that you purpose (gui is show when video is minimized) or if they want to keep the old bahaviour (video frames are still being shown when video is minimized). Thats why i suggested the TrueGrabbing setting.

    The way v4 is working now. You can not toggle this, without breaking "MediaPortal Live Mode" for "Menu/GUI". Which in my opinion is a no go. We cant break features that once before worked. There should not be a settings that would make an effect that is implemented not work. If you dont want to see "MediaPortal Live Mode" in "Menu/GUI" then dont select it in the settings (dropdown menu).

    Lets say i want the old bahavior. I want the video frames being displayed when i minimize my video. And i want "MediaPortal Live Mode" active when no media is being played back (Menu/GUI). Then this is not possible with v4.
     
    • Like Like x 1
    • Agree Agree x 1
  7. popy
    • Super User

    popy Super User

    Joined:
    July 3, 2011
    Messages:
    614
    Likes Received:
    83
    Ratings:
    +140 / 2
    Show System Specs
    thx for clearing things up. I'll think I have got it.

    So the option should be named "Use GUI data when video is minimized", right?

    I will try to implement it ...
     
  8. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
  9. popy
    • Super User

    popy Super User

    Joined:
    July 3, 2011
    Messages:
    614
    Likes Received:
    83
    Ratings:
    +140 / 2
    Show System Specs
    The exception was raised from a wrong assembly version of Google.ProtocolBuffers, i have accidentally updated it on my dev machine and not copied over to the runtime path. After reverting the version on my dev machine to the version which is linked in the solution, the issue is gone. It was my fault ;)

    So here it is:
    v5 patch of Atmolight is uploaded and OP was updated.
    Mediaportal patch is untouched (use latest patch from OP -> v3).

    Now its working as it was requested by @azzuro and you.

    @Lightning303: as before can you please review and test it?

    pOpY
     
    • Thank You! Thank You! x 1
  10. popy
    • Super User

    popy Super User

    Joined:
    July 3, 2011
    Messages:
    614
    Likes Received:
    83
    Ratings:
    +140 / 2
    Show System Specs
    • Like Like x 1
  11. Lightning303
    • Premium Supporter

    Lightning303 MP Donator

    Joined:
    September 12, 2009
    Messages:
    798
    Likes Received:
    384
    Gender:
    Male
    Ratings:
    +578 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Tested it and looks good (y). Though i think we should wait with merging these changes until we are sure that your MP changes will actually make it into a release. It might not get accepted, or changed on the way. And its still some time until 1.12pre will come out.
    Also we need to think about backwards compatibility, e.g. somebody updates to newest AtmoLight version but wants to stay on an older MP version (e.g. 1.10 because he doesnt want to loose music viz).
     
    • Like Like x 2
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!