]> git.sesse.net Git - vlc/blobdiff - modules/misc/testsuite/test4.c
Use gettext_noop() consistently
[vlc] / modules / misc / testsuite / test4.c
index bfad7400b206d7a7b49bf201fbde92d13128be3f..e7e7aad23588fb1fc2874e8f411aa35b887591cf 100644 (file)
@@ -29,6 +29,7 @@
 #endif
 
 #include <vlc/vlc.h>
+#include <vlc_plugin.h>
 
 #include <signal.h>
 
@@ -63,7 +64,7 @@ static int    Signal    ( vlc_object_t *, char const *,
  * Module descriptor.
  *****************************************************************************/
 vlc_module_begin();
-    set_description( _("Miscellaneous stress tests") );
+    set_description( N_("Miscellaneous stress tests") );
     var_Create( p_module->p_libvlc, "foo-test",
                 VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
     var_AddCallback( p_module->p_libvlc, "foo-test", Foo, NULL );
@@ -169,7 +170,7 @@ static int Callback( vlc_object_t *p_this, char const *psz_cmd,
     {
         pp_objects[i] = vlc_object_create( p_this, VLC_OBJECT_GENERIC );
         vlc_object_attach( pp_objects[i], p_this );
-        vlc_thread_create( pp_objects[i], "foo", MyThread, 0, VLC_TRUE );
+        vlc_thread_create( pp_objects[i], "foo", MyThread, 0, true );
     }
 
     msleep( 3000000 );
@@ -181,7 +182,7 @@ static int Callback( vlc_object_t *p_this, char const *psz_cmd,
         vlc_object_kill( pp_objects[i] );
         vlc_thread_join( pp_objects[i] );
         vlc_object_detach( pp_objects[i] );
-        vlc_object_destroy( pp_objects[i] );
+        vlc_object_release( pp_objects[i] );
     }
 
     /* Clean our mess */
@@ -313,7 +314,7 @@ static int Stress( vlc_object_t *p_this, char const *psz_cmd,
     printf( " - destroying the objects (LIFO)\n" );
     for( i = MAXOBJ * i_level; i--; )
     {
-        vlc_object_destroy( pp_objects[i] );
+        vlc_object_release( pp_objects[i] );
     }
 
     printf( "done (%fs).\n", (mdate() - start) / 1000000.0 );
@@ -385,15 +386,15 @@ static int Stress( vlc_object_t *p_this, char const *psz_cmd,
     for( i = 0; i < MAXTH * i_level; i++ )
     {
         pp_objects[i] = vlc_object_create( p_this, VLC_OBJECT_GENERIC );
-        vlc_thread_create( pp_objects[i], "foo", Dummy, 0, VLC_TRUE );
+        vlc_thread_create( pp_objects[i], "foo", Dummy, 0, true );
     }
 
     printf( " - killing the threads (LIFO)\n" );
     for( i = MAXTH * i_level; i--; )
     {
-        pp_objects[i]->b_die = VLC_TRUE;
+        pp_objects[i]->b_die = true;
         vlc_thread_join( pp_objects[i] );
-        vlc_object_destroy( pp_objects[i] );
+        vlc_object_release( pp_objects[i] );
     }
 
     printf( "done (%fs).\n", (mdate() - start) / 1000000.0 );
@@ -428,7 +429,7 @@ static void * Dummy( vlc_object_t *p_this )
 
     for( i = MAXOBJ/MAXTH; i--; )
     {
-        vlc_object_destroy( pp_objects[i] );
+        vlc_object_release( pp_objects[i] );
     }
 
     return NULL;