AtmoLight - Plugin Improvement discussion (1 Viewer)

Lightning303

MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Hello!
    I have a strange issue with AtmoLight. My settings does not get saved. I goto "MP Config/plugins/AtmoLight" and make all my settings.I press save and then "OK" to exit "MP Config.". When go back to settings, all are gone!

    Hey,
    which AtmoLight version are you using?
    Latest: https://forum.team-mediaportal.com/threads/atmolight-1-10-0-0-2014-04-19.125633/

    Can you attach Configuration.log and Configuration-Error.log?


    Im using 1.10.0.0 and installed it with"MP Extension installer".
    Configuration.log attached. Configuration-error.log is empty so i didnt provide it

    Thanks,
    sadly that doesnt help me, but thats my fault ;P I just noticed there is no logging for the config part... I will add some logging to that tomorrow. In the meantime, as @HomeY said, the mediaportal.xml would help, or atleast the atmolight part. Search for "<section name="atmolight">" and copy everything from there till the next </section>. That way we can see what interferes.

    Simply deleteing this section from the xml and then start atmolight config should fix it though.

    Edit:
    If that doesnt work, could you try the attached dll? Open the config, change some settings, save, click ok and then upload the config.log?
    Thanks.
     

    Attachments

    • Atmolight.rar
      51.5 KB
    Last edited:

    Teeo

    Portal Member
    September 28, 2009
    49
    13
    52
    Helsingborg
    Home Country
    Sweden Sweden
    This solved my problem:
    * Uninstalled Atmolight
    * Removed all atmolight entries from mediaportal.xml
    * Installed Atmolight
    * Installed dll from previous post

    Now I have a new problem. According to the logs atmolight can´t connect to atmowin. Atmolight did start atmowin. I also noticed that on MP Close atmowin didnt close
     

    Attachments

    • MediaPortal.xml
      60.3 KB

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    According to the logs atmolight can´t connect to atmowin. Atmolight did start atmowin. I also noticed that on MP Close atmowin didnt close
    This can happen, because the connection on startup wasn't correct. Without the connection, the communication with AtmoWin is gone, and the Exit command never arrives. Simply restart MediaPortal should fix the problem.
    If not: Close MediaPortal, kill AtmoWin, reset your device and start MP again (in this specific order!).
     

    Teeo

    Portal Member
    September 28, 2009
    49
    13
    52
    Helsingborg
    Home Country
    Sweden Sweden
    Thank U for your reply!

    However the solution was something else.
    I opened an elevated command-prompt, went to "C:\ProgramData\Team MediaPortal\MediaPortal\AtmoWin" and ran register.cmd and reg_filter.cmd
    It is so nice when I can help myselfe :)

    I will try it out now and get back with feedback
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Hey,
    i did some more work on the MP1 plugin and wanted to give you guys a new testversion.

    First off, to make the MP2 plugin possible i split the MP1 plugin (Atmolight.dll) into 2 seperate dlls (AtmoLight.Core.dll and AtmoLight.MediaPortal1.dll). The core is also used in MP2. So if you want to test this version, please delete the Atmolight.dll before using the new dlls.
    Because of this, there is a chance that something is not working like it should, i just cant test every possible scenario.

    So, whats new?
    Low CPU has been improved. I saw that even with low cpu activated, frames that would not get send to AtmoWin still were calculated in AtmoLight. I changed that, making it even more CPU friendly.

    I added a UI capture mode. Up until now you could only use Mediaportal Liveview during videoplayback. Now you can use it also in the menus or when listening to music or radio. To make this possible, i had to edit the Mediaportal source however. So you will need to have 1.7.1 installed and then use the MediaPortal.exe that is provided in the rar. After this has been tested for a bit, i will make a post in the dev forum and submit my patch for review. At the moment visualisations are not working yet. I will have to talk to @BassFan for that.

    Source: https://github.com/ambilight-4-medi...e/REWORK_Split_AtmoLight_into_Core_and_Plugin
    MP Patch: https://github.com/ambilight-4-mediaportal/AtmoLight/blob/REWORK_Split_AtmoLight_into_Core_and_Plugin/Patches/MediaPortal 1/0001-Added-UI-capture-for-AtmoLight-FrameGrabber.patch

    Edit : MediaPortal 1.7.1 with Code included.
    https://www.dropbox.com/s/h1qkahxn6pneqm6/MediaPortalSetup_1.7.1_2014-05-07-20-56_Atmolight_GUI.zip
     

    Attachments

    • REWORK_SAiCaP_V5.rar
      424.1 KB
    Last edited by a moderator:
    B

    BassFan

    Guest
    Fixed memory leak in MP1 UI capture patch

    Code:
    +-            GraphicsStream stream = SurfaceLoader.SaveToStream(ImageFileFormat.Bmp, rgbSurface);
      86    +-            Bitmap b = new Bitmap(Image.FromStream(stream));
      87    ++            int pitch;
      88    ++            GraphicsStream stream = rgbSurface.LockRectangle(LockFlags.Discard, out pitch);
      89    ++            Bitmap b = new Bitmap(rgbSurface.Description.Width,rgbSurface.Description.Height, pitch, System.Drawing.Imaging.PixelFormat.Format32bppArgb, stream.InternalData);
      90

    Frage mich gerade was du hier machst?
    Warum definierst du zweimal b aber tust nichts damit?
    abgesehen von return b.. welches b denn nun?

    Das erste scheint mir zumindest ein dickes Speicherleck zu sein.
    Hier erstellst du ein Bitmap verwendest es aber anschließend nicht
    und Freigegeben wird es auch nicht bevor du ein neues Bitmap erstellst (ebenfalls mit b definierst)

    Hmmm... überdenk das nochmal.

    gruss
     
    Last edited by a moderator:

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    Fixed memory leak in MP1 UI capture patch

    Code:
    +-            GraphicsStream stream = SurfaceLoader.SaveToStream(ImageFileFormat.Bmp, rgbSurface);
      86    +-            Bitmap b = new Bitmap(Image.FromStream(stream));
      87    ++            int pitch;
      88    ++            GraphicsStream stream = rgbSurface.LockRectangle(LockFlags.Discard, out pitch);
      89    ++            Bitmap b = new Bitmap(rgbSurface.Description.Width,rgbSurface.Description.Height, pitch, System.Drawing.Imaging.PixelFormat.Format32bppArgb, stream.InternalData);
      90

    Frage mich gerade was du hier machst?
    Warum definierst du zweimal b aber tust nichts damit?
    abgesehen von return b.. welches b denn nun?

    Das erste scheint mir zumindest ein dickes Speicherleck zu sein.
    Hmmm... überdenk das nochmal.

    gruss

    Bei dem commit habe ich sowohl einen kleinen Fehler in meinem Patch verbessert als auch alte Patches die da noch rumfliegen im Ordner verschoben. Deswegen sind die mit in dem commit vermerkt.

    V1_2_Framegrabber with OnNewFrameEvent.diff
    und
    V1_3_FrameGrabber with resize option take2.diff

    sind von jemand anderen, keine Ahnung von wem, keine Ahnung wie alt, aber anscheinend von bevor der FrameGrabber in der core integriert war.
    Den schnippsel den du zitierst kommt aus V1_3_FrameGrabber with resize option take2.diff. Wie gesagt. nicht von mir. Und so wie ich das sehe wurde dieser patch auch nie irgendwo angewandt.

    0001-Added-UI-capture-for-AtmoLight-FrameGrabber.patch
    ist das was ich gemacht habe ;).
     
    B

    BassFan

    Guest
    @Lightning303 0001-Added-UI-capture-for-AtmoLight-FrameGrabber.patch
    ist das was ich gemacht habe
    Habe das nur gerade gesehen war grün also ein neuer Eintrag.
    Daher bin ich davon ausgegangen das du dort etwas geändert hast.
    Ich will dir nicht zu nahe treten.. :)

    Ok! Dann ;)

    gruss
     

    Lightning303

    MP Donator
  • Premium Supporter
  • September 12, 2009
    798
    577
    Home Country
    Germany Germany
    @Lightning303 0001-Added-UI-capture-for-AtmoLight-FrameGrabber.patch
    ist das was ich gemacht habe
    Habe das nur gerade gesehen war grün also ein neuer Eintrag.
    Daher bin ich davon ausgegangen das du dort etwas geändert hast.
    Ich will dir nicht zu nahe treten.. :)

    Ok! Dann ;)

    gruss
    :), ist ja nicht mein code, also kannste den gerne auseinander nehmen :D
     

    Users who are viewing this thread

    Top Bottom