Winamp Visualisations. Finally :-) (1 Viewer)

B

BassFan

Guest
unofficial update for visualization in MP1.4
they secure the old files
before replacing them.
use at your own risk.
I hope you are very happy now

fixed high CPU Usage

greets
 
Last edited by a moderator:

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    you can nothing draw on your overlay why..
    all plugin create internal a own window for rendering (also i have written my own Winamp Plugin in OpenGL)

    And that creates the issue I did show in the screen shot. It is not possible to freely build the UI as you need to reserve the viz window area in a place where nothing is ever drawn over it (no dialogs etc.).

    you can not draw Sonique Visualization (GDI) on a DirectX Surface

    Limitation of the viz provider.

    and you can not draw Bassbox Plugin (OpenGL) on your overlay.

    Limitation of the viz provider. On Nvidia HW it would be possible to share OpenGL and DirectX resources but it is not a valid solution. And the other solution would be to download the OpenGL based resource to RAAM from GPU menory and then fill up the DirectX texture from that, but again it is really slow with AMD GPUs (excluding the latest generation) so it cannot be used either.

    this is a good idea when create visualization directly for MP so you can draw in the own Surface in MP directly without overlay window.
    I think no people has time and do this on this time..

    That would be nice to have, but during the years no MP developer has been interested enough in the visualizations to start to implement such :( So currently we have just a half baked version of visualization.

    sleep is not a good idea.
    one ms is good enough no more no less ;)
    that's enough to give the thread a little time
    Code:
    Thread.Sleep(1);

    Well, I wont comment anymore on the sleep - other than sleeps should be avoided and they are simple workarounds for some design / architectural issue for the most of the time
     
    B

    BassFan

    Guest
    Well, I wont comment anymore on the sleep
    you are right ..
    this is a workaround! i think @hwahrmann can create a Timer or what ever for this mistake.
    for this moment is good enough

    Could you create a fork in the GitHub
    Sebastii do this i think ;)
    Bass_Visualization_Fix

    PS:
    oops MediaPortal has nothing to do with 2% CPU at the moment with milk2 in full screen. :D
    i think i should replace all changed OR? ... hehehehhee

    greets
     
    Last edited by a moderator:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    unofficial update for visualization in MP1.4
    they secure the old files
    before replacing them.
    use at your own risk.
    I hope you are very happy now

    fixed high CPU Usage

    greets


    Hi,

    I just updated the branch :), i hope all is ok because that not easy to see real change with your patch lol.
    Is it possible that you continue your work based on the branch (will be more easy for us to maintain) :)
    Another request :
    Can you change tab in vs2012 ?
    And can you create the patch after your do a commit locally ?

    Thanks for all :)
     

    Attachments

    • 0001-Workaround-to-fix-high-CPU-Usage-BassFan-patch.zip
      352.7 KB
    B

    BassFan

    Guest
    that not easy to see real change with your patch lol
    Only changed added the line in VisualizationWindow
    Code:
    				using (Graphics g = Graphics.FromHwnd(Handle))
    				{
    +				  // Fixed High CPU mistake
    +				  Thread.Sleep(1);
    +				
    				  int sleepMS = RenderVisualization(g);

    Can you change tab in vs2012 ?
    i have change the tab both 2x2


    And can you create the patch after your do a commit locally ?
    with my bad english?

    Is it possible that you continue your work based on the branch

    I think everything should be done from my side ;)
    so this is the last update..

    Thanks for all
    habe ich gern getan
    I like to have done

    thanks for your work on GitHub!

    greets
     
    Last edited by a moderator:
    B

    BassFan

    Guest
    you are right ..
    this is a workaround!


    So I discussed about the topic in my Delphi forum
    They told me that it is right to use a break in a thread with a loop while not Terminated!
    So I think it's fine as well.

    greets
     
    Last edited by a moderator:

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    you are right ..
    this is a workaround!


    So I discussed about the topic in my Delphi forum
    They told me that it is right to use a break in a thread with a loop while not Terminated!
    So I think it's fine as well.

    see the diverence..

    Of course it will reduce the CPU load when you add a sleep in a thread which is looping. But it doesn't make it a proper way to do any frame scheduling or anything similar.
     
    B

    BassFan

    Guest
    ohne Sleep werden andere processe und Anwendungen blockiert
    dieses verursacht die hohe CPU belastung.
    Also muss ich Sleep, Doevents oder ProcessMessages innerhalb einer
    schleife verwenden.
    Ein anderer weg wäre WaitForSingleObjectEx oder die vertikale Synchronisation (DirectX) abzuwarten
    --------------------------------
    without Sleep processe and other applications are blocked
    this causes high CPU load.
    So I need to sleep, or DoEvents ProcessMessages within a
    loop use.
    Another way WaitForSingleObjectEx or wait for vertical synchronization (DirectX)

    Or use a Timer instead of Thread.. this is not my problem ;)

    greets
     
    Last edited by a moderator:

    CypherMK

    MP Donator
  • Premium Supporter
  • March 11, 2009
    1,735
    617
    Home Country
    Netherlands Netherlands
    unofficial update for visualization in MP1.4
    they secure the old files
    before replacing them.
    use at your own risk.
    I hope you are very happy now

    fixed high CPU Usage

    greets


    Working! Thanks! Stanby issue still the same as expected.
     

    Users who are viewing this thread

    Top Bottom