No subject


Sun Mar 15 18:43:03 CET 2009


neglected unless you don't ever shutdown vlc for that reason it will
probably run out of memory in a few hours or days ?<br>
Here I tested with vlc-1.1.0-git without your patch while playing a mp3
file I can see the memory usage is increasing from 23.4MB initially
without goom enabled it increase slowly all the way to the end of song
by 3MB which is exactly the size of the mp3 file... Then I enable goom
the memory usage went from&nbsp; 23.4MB to 47.1MB and upon pressing the stop
button it drops to 28.868MB which equals approximately 5MB of memory
leak by enable goom then stop playback, if I press play again goom is
automatically loaded memory usage jumps to 44MB and stop drops it back
down to 30.464MB which would probably be close to your result. If I
repeat this again it jumps to 48.5MB then drop back down to 31.544MB.<br>
Now I test your patch it jumps from 23.6MB to 42MB by enable goom on
press stop fall back to 32.228MB, more memory leak introduced 8.628MB
leak? Press play it loads goom and goes to 46MB stop drop it down to
33.664MB repeat procedure again 43.4MB to 32.7MB (repeat once more to
verify results 47MB to 34.452MB).<br>
All this test is done with a vlc-1.1.0-git build by myself I chose
gcc-4.4.0 as compiler, so the result may vary.<br>
So in conclusion, I must say the results are strange... and the memory
leak is always there, if you follow my procedure for tests should have
a similar result.<br>
<br>
<blockquote cite="mid:BLU130-W15B7715582A352416F78ADE0420 at phx.gbl"
 type="cite"><br>
  <br>
--- goom.c&nbsp;&nbsp;&nbsp; 2009-06-10 17:21:22.000000000 +0100<br>
+++ mod_goom.c&nbsp;&nbsp;&nbsp; 2009-06-10 18:07:11.796875000 +0100<br>
@@ -90,6 +90,10 @@<br>
&nbsp;
*****************************************************************************/<br>
&nbsp;#define MAX_BLOCKS 100<br>
&nbsp;#define GOOM_DELAY 400000<br>
+<br>
+#ifdef WIN32<br>
+static PluginInfo *p_plugin_info;<br>
+#endif<br>
&nbsp;<br>
&nbsp;typedef struct<br>
&nbsp;{<br>
@@ -326,7 +330,9 @@<br>
&nbsp;&nbsp;&nbsp;&nbsp; audio_date_t i_pts;<br>
&nbsp;&nbsp;&nbsp;&nbsp; int16_t p_data[2][512];<br>
&nbsp;&nbsp;&nbsp;&nbsp; int i_data = 0, i_count = 0;<br>
-&nbsp;&nbsp;&nbsp; PluginInfo *p_plugin_info;<br>
+#ifndef WIN32<br>
+&nbsp;&nbsp;&nbsp; PluginInfo *p_plugin_info;<br>
+#endif<br>
&nbsp;&nbsp;&nbsp;&nbsp; int canc = vlc_savecancel ();<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; width = var_GetInteger( p_this, "goom-width" );<br>
@@ -335,8 +341,12 @@<br>
&nbsp;&nbsp;&nbsp;&nbsp; speed = var_CreateGetInteger( p_thread, "goom-speed" );<br>
&nbsp;&nbsp;&nbsp;&nbsp; speed = MAX_SPEED - speed;<br>
&nbsp;&nbsp;&nbsp;&nbsp; if( speed &lt; 0 ) speed = 0;<br>
-<br>
-&nbsp;&nbsp;&nbsp; p_plugin_info = goom_init( width, height );<br>
+<br>
+#ifdef WIN32<br>
+&nbsp;&nbsp;&nbsp; goom_set_resolution(p_plugin_info, width, height);<br>
+#else<br>
+&nbsp;&nbsp;&nbsp; p_plugin_info = goom_init( width, height );<br>
+#endif<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; while( vlc_object_alive (p_thread) )<br>
&nbsp;&nbsp;&nbsp;&nbsp; {<br>
@@ -375,8 +385,9 @@<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p_pic-&gt;date = aout_DateGet( &amp;i_pts ) + GOOM_DELAY;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vout_DisplayPicture( p_thread-&gt;p_vout, p_pic );<br>
&nbsp;&nbsp;&nbsp;&nbsp; }<br>
-<br>
+#ifndef WIN32<br>
&nbsp;&nbsp;&nbsp;&nbsp; goom_close( p_plugin_info );<br>
+#endif<br>
&nbsp;&nbsp;&nbsp;&nbsp; vlc_restorecancel (canc);<br>
&nbsp;&nbsp;&nbsp;&nbsp; return NULL;<br>
&nbsp;}<br>
@@ -448,3 +459,23 @@<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; return psz_title;<br>
&nbsp;}<br>
+<br>
+#ifdef WIN32<br>
+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID
lpvReserved);<br>
+<br>
+BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID
lpvReserved)<br>
+{<br>
+&nbsp;&nbsp;&nbsp; (void)hinstDLL;<br>
+&nbsp;&nbsp;&nbsp; (void)lpvReserved;<br>
+&nbsp;&nbsp;&nbsp; <br>
+&nbsp;&nbsp;&nbsp; if ( fdwReason == DLL_PROCESS_ATTACH )<br>
+&nbsp;&nbsp;&nbsp; {<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; p_plugin_info = goom_init(320, 240);<br>
</blockquote>
<br>
<blockquote cite="mid:BLU130-W15B7715582A352416F78ADE0420 at phx.gbl"
 type="cite">+&nbsp;&nbsp;&nbsp; }<br>
+&nbsp;&nbsp;&nbsp; else if ( fdwReason == DLL_PROCESS_DETACH )<br>
+&nbsp;&nbsp;&nbsp; {<br>
+&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; goom_close(p_plugin_info);<br>
+&nbsp;&nbsp;&nbsp; }<br>
+&nbsp;&nbsp;&nbsp; return 1;<br>
+}<br>
+#endif<br>
  <br>
</blockquote>
<br>
</body>
</html>

--------------090204040707040603070909--


More information about the vlc-devel mailing list