[Approved] Framegrabber improvement - Capture from UI when Video is minimized or running in Mini-display (2 Viewers)

Lightning303

MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    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! :)
     

    popy

    MP Donator
  • Premium Supporter
  • July 3, 2011
    617
    141
    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
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    My mediaportal 1.11pre installation with patched core files shows now the following messagebox:
    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.
     

    popy

    MP Donator
  • Premium Supporter
  • July 3, 2011
    617
    141
    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.
    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:

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    OK, there are some misconceptions. Let me clear this up.
    Firstly the content effects/effect settings.

    687474703a2f2f692e696d6775722e636f6d2f563974776a32762e706e67


    "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.
     

    popy

    MP Donator
  • Premium Supporter
  • July 3, 2011
    617
    141
    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 ...
     

    popy

    MP Donator
  • Premium Supporter
  • July 3, 2011
    617
    141
    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
     

    popy

    MP Donator
  • Premium Supporter
  • July 3, 2011
    617
    141

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    @Lightning303: Can you please test, review it? (When it okay merge it )

    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).
     

    Users who are viewing this thread

    Top Bottom