]> git.sesse.net Git - vlc/commitdiff
Remove object type field
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 11 Jul 2011 15:32:04 +0000 (18:32 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 11 Jul 2011 14:57:23 +0000 (17:57 +0300)
39 files changed:
include/vlc_objects.h
src/audio_output/common.c
src/audio_output/filters.c
src/audio_output/input.c
src/input/access.c
src/input/decoder.c
src/input/demux.c
src/input/input.c
src/input/meta.c
src/input/stream.c
src/input/vlm.c
src/interface/interface.c
src/libvlc.c
src/libvlc.h
src/misc/filter.c
src/misc/filter_chain.c
src/misc/image.c
src/misc/media_library.c
src/misc/objects.c
src/misc/probe.c
src/misc/sql.c
src/misc/update.c
src/misc/xml.c
src/network/httpd.c
src/network/tls.c
src/osd/osd.c
src/playlist/engine.c
src/playlist/fetcher.c
src/playlist/loadsave.c
src/playlist/services_discovery.c
src/stream_output/sap.c
src/stream_output/stream_output.c
src/video_output/display.c
src/video_output/inhibit.c
src/video_output/opengl.c
src/video_output/video_output.c
src/video_output/vout_subpictures.c
src/video_output/window.c
src/win32/specific.c

index 55d9a51cd47a136367a7c7c2de0c05cf224419dd..1758d1e1227cea4e95017c4baa3e644c159f572d 100644 (file)
  * @{
  */
 
-/* Object types */
-/* Please add new object types below -34 */
-/* Please do not add new object types anyway */
-#define VLC_OBJECT_GENERIC     (-666)
-
 /* Object flags */
 #define OBJECT_FLAGS_NODBG       0x0001
 #define OBJECT_FLAGS_QUIET       0x0002
index 1a9e5e26ce35e2ca90e641a399dabbfa15b18739..659e445810a4c2c88ebf5f1f6f54ac9c74bf2f50 100644 (file)
@@ -51,8 +51,7 @@ aout_instance_t * __aout_New( vlc_object_t * p_parent )
     aout_instance_t * p_aout;
 
     /* Allocate descriptor. */
-    p_aout = vlc_custom_create( p_parent, sizeof( *p_aout ),
-                                VLC_OBJECT_GENERIC, "audio output" );
+    p_aout = vlc_custom_create( p_parent, sizeof( *p_aout ), "audio output" );
     if( p_aout == NULL )
     {
         return NULL;
index c3a8e9b635c54efe00548fb8c8a20a47bf057dd5..612d897696cacb5f12e0e15709ba3f36cf887de4 100644 (file)
@@ -55,8 +55,7 @@ static filter_t * FindFilter( aout_instance_t * p_aout,
     static const char typename[] = "audio filter";
     filter_t * p_filter;
 
-    p_filter = vlc_custom_create( p_aout, sizeof(*p_filter),
-                                  VLC_OBJECT_GENERIC, typename );
+    p_filter = vlc_custom_create( p_aout, sizeof(*p_filter), typename );
 
     if ( p_filter == NULL ) return NULL;
 
index add3263a14221c8d5fe2aabdadc04235ddadf595..9178c1505f93efeab3285b6285dfbcbac600660e 100644 (file)
@@ -265,9 +265,8 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
             }
 
             /* Create a VLC object */
-            static const char typename[] = "audio filter";
             p_filter = vlc_custom_create( p_aout, sizeof(*p_filter),
-                                          VLC_OBJECT_GENERIC, typename );
+                                          "audio filter" );
             if( p_filter == NULL )
             {
                 msg_Err( p_aout, "cannot add user filter %s (skipped)",
index 01c67e3669fdf7d5cda4e5a198e489c77006e310..a1474bf5edf032ac6c7f47d31923f4bd9359ddcb 100644 (file)
@@ -54,7 +54,7 @@ access_t *__access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
                         const char *psz_location )
 {
     access_t *p_access = vlc_custom_create( p_obj, sizeof (*p_access),
-                                            VLC_OBJECT_GENERIC, "access" );
+                                            "access" );
 
     if( p_access == NULL )
         return NULL;
index 977ccb76b527ea0d49bde06ba02c1b11c91a3b22..bf0997842c8691b19c81aab9737a6ba6b9d3730c 100644 (file)
@@ -750,8 +750,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
     decoder_owner_sys_t *p_owner;
     es_format_t null_es_format;
 
-    p_dec = vlc_custom_create( p_parent, sizeof( *p_dec ), VLC_OBJECT_GENERIC,
-                               "decoder" );
+    p_dec = vlc_custom_create( p_parent, sizeof( *p_dec ), "decoder" );
     if( p_dec == NULL )
         return NULL;
 
@@ -826,8 +825,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
         p_dec->b_need_packetized && !p_dec->fmt_in.b_packetized )
     {
         p_owner->p_packetizer =
-            vlc_custom_create( p_parent, sizeof( decoder_t ),
-                               VLC_OBJECT_GENERIC, "packetizer" );
+            vlc_custom_create( p_parent, sizeof( decoder_t ), "packetizer" );
         if( p_owner->p_packetizer )
         {
             es_format_Copy( &p_owner->p_packetizer->fmt_in,
index 635b675490639dce1b364047a82d0cd896095ecf..5277c8f55eaca7bc3bb55b2d1a0b63a682b5c26e 100644 (file)
@@ -62,9 +62,7 @@ demux_t *__demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
                        const char *psz_location,
                        stream_t *s, es_out_t *out, bool b_quick )
 {
-    static const char typename[] = "demux";
-    demux_t *p_demux = vlc_custom_create( p_obj, sizeof( *p_demux ),
-                                          VLC_OBJECT_GENERIC, typename );
+    demux_t *p_demux = vlc_custom_create( p_obj, sizeof( *p_demux ), "demux" );
     const char *psz_module;
 
     if( p_demux == NULL ) return NULL;
@@ -334,7 +332,7 @@ decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char
 {
     decoder_t *p_packetizer;
     p_packetizer = vlc_custom_create( p_demux, sizeof( *p_packetizer ),
-                                      VLC_OBJECT_GENERIC, "demux packetizer" );
+                                      "demux packetizer" );
     if( !p_packetizer )
     {
         es_format_Clean( p_fmt );
index 85851bf97dbfa970b6c158a13d2b0e101e8e4cad..2bcfaf7ce8b0cdddb420f484cb60aa4a0c77cd26 100644 (file)
@@ -292,17 +292,15 @@ input_item_t *input_GetItem( input_thread_t *p_input )
 static void ObjectKillChildrens( input_thread_t *p_input, vlc_object_t *p_obj )
 {
     vlc_list_t *p_list;
-    int i;
 
     /* FIXME ObjectKillChildrens seems a very bad idea in fact */
-    i = vlc_internals( p_obj )->i_object_type;
     if( p_obj == VLC_OBJECT(p_input->p->p_sout) )
         return;
 
     vlc_object_kill( p_obj );
 
     p_list = vlc_list_children( p_obj );
-    for( i = 0; i < p_list->i_count; i++ )
+    for( int i = 0; i < p_list->i_count; i++ )
         ObjectKillChildrens( p_input, p_list->p_values[i].p_object );
     vlc_list_release( p_list );
 }
@@ -317,13 +315,11 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
                                const char *psz_header, bool b_quick,
                                input_resource_t *p_resource )
 {
-    static const char input_name[] = "input";
     input_thread_t *p_input = NULL;                 /* thread descriptor */
     int i;
 
     /* Allocate descriptor */
-    p_input = vlc_custom_create( p_parent, sizeof( *p_input ),
-                                 VLC_OBJECT_GENERIC, input_name );
+    p_input = vlc_custom_create( p_parent, sizeof( *p_input ), "input" );
     if( p_input == NULL )
         return NULL;
 
@@ -2742,8 +2738,7 @@ static void InputSourceMeta( input_thread_t *p_input,
         return;
 
     demux_meta_t *p_demux_meta =
-        vlc_custom_create( p_demux, sizeof( *p_demux_meta ),
-                           VLC_OBJECT_GENERIC, "demux meta" );
+        vlc_custom_create( p_demux, sizeof( *p_demux_meta ), "demux meta" );
     if( !p_demux_meta )
         return;
     p_demux_meta->p_demux = p_demux;
index d22ca9435718d8e9deace2bad55141ce062fd4a3..5d7e9804426613be57c54f230a287626ddd1134c 100644 (file)
@@ -263,8 +263,7 @@ exit:
 int input_item_WriteMeta( vlc_object_t *obj, input_item_t *p_item )
 {
     meta_export_t *p_export =
-        vlc_custom_create( obj, sizeof( *p_export ), VLC_OBJECT_GENERIC,
-                           "meta writer" );
+        vlc_custom_create( obj, sizeof( *p_export ), "meta writer" );
     if( p_export == NULL )
         return VLC_ENOMEM;
     p_export->p_item = p_item;
index f56393d4aedbead10f4e6b4ff72069a4e495a58c..c7418e44012d59ade6243f4b7c4d21bea5eba59b 100644 (file)
@@ -208,8 +208,7 @@ static int  ASeek( stream_t *s, uint64_t i_pos );
  ****************************************************************************/
 stream_t *stream_CommonNew( vlc_object_t *p_obj )
 {
-    stream_t *s = (stream_t *)vlc_custom_create( p_obj, sizeof(*s),
-                                                 VLC_OBJECT_GENERIC, "stream" );
+    stream_t *s = (stream_t *)vlc_custom_create( p_obj, sizeof(*s), "stream" );
 
     if( !s )
         return NULL;
index 55ece5c328d2695702f5db3c35d32d019a279855..e66b4ba34869d57d2c8d40bbacb85ad1fd6634b8 100644 (file)
@@ -131,7 +131,6 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
 {
     vlm_t *p_vlm = NULL, **pp_vlm = &(libvlc_priv (p_this->p_libvlc)->p_vlm);
     char *psz_vlmconf;
-    static const char vlm_object_name[] = "vlm daemon";
 
     /* Avoid multiple creation */
     vlc_mutex_lock( &vlm_mutex );
@@ -150,7 +149,7 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
     msg_Dbg( p_this, "creating VLM" );
 
     p_vlm = vlc_custom_create( p_this->p_libvlc, sizeof( *p_vlm ),
-                               VLC_OBJECT_GENERIC, vlm_object_name );
+                               "vlm daemon" );
     if( !p_vlm )
     {
         vlc_mutex_unlock( &vlm_mutex );
@@ -765,7 +764,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
     if( p_cfg->b_vod && !p_vlm->p_vod )
     {
         p_vlm->p_vod = vlc_custom_create( VLC_OBJECT(p_vlm), sizeof( vod_t ),
-                                          VLC_OBJECT_GENERIC, "vod server" );
+                                          "vod server" );
         p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", "$vod-server", false );
         if( !p_vlm->p_vod->p_module )
         {
index abc3248e94f52579c3da522c834e842d9b0debea..c87cf3021e2209a1a4598f9a0216ca558fc7c391 100644 (file)
@@ -71,11 +71,9 @@ int intf_Create( vlc_object_t *p_this, const char *chain )
 {
     libvlc_int_t *p_libvlc = p_this->p_libvlc;
     intf_thread_t * p_intf;
-    static const char psz_type[] = "interface";
 
     /* Allocate structure */
-    p_intf = vlc_custom_create( p_libvlc, sizeof( *p_intf ),
-                                VLC_OBJECT_GENERIC, psz_type );
+    p_intf = vlc_custom_create( p_libvlc, sizeof( *p_intf ), "interface" );
     if( !p_intf )
         return VLC_ENOMEM;
 
index 8a4fb234aaa4a844c5693639e90360e56f21d560..7c053fc21423c9943c03a2ffa9cbf285d499152a 100644 (file)
@@ -198,7 +198,7 @@ libvlc_int_t * libvlc_InternalCreate( void )
 
     /* Allocate a libvlc instance object */
     p_libvlc = vlc_custom_create( (vlc_object_t *)NULL, sizeof (*priv),
-                                  VLC_OBJECT_GENERIC, "libvlc" );
+                                  "libvlc" );
     if( p_libvlc != NULL )
         i_instances++;
     vlc_mutex_unlock( &global_lock );
index e6c0a6bbd60efa9fffc2dd1cd367b738166bd4ca..a9d64f5fdca4d418c965d495c08a66bf2ee0fc4d 100644 (file)
@@ -106,15 +106,13 @@ void vlc_ExitDestroy( vlc_exit_t * );
  *
  * @param p_this an existing VLC object
  * @param i_size byte size of the object structure
- * @param i_type object type, usually VLC_OBJECT_CUSTOM
  * @param psz_type object type name
  * @return the created object, or NULL.
  */
 extern void *
-vlc_custom_create (vlc_object_t *p_this, size_t i_size, int i_type,
-                     const char *psz_type);
-#define vlc_custom_create(o, s, t, n) \
-        vlc_custom_create(VLC_OBJECT(o), s, t, n)
+vlc_custom_create (vlc_object_t *p_this, size_t i_size, const char *psz_type);
+#define vlc_custom_create(o, s, n) \
+        vlc_custom_create(VLC_OBJECT(o), s, n)
 
 /**
  * Assign a name to an object for vlc_object_find_name().
@@ -142,7 +140,6 @@ typedef struct vlc_object_internals vlc_object_internals_t;
 
 struct vlc_object_internals
 {
-    int             i_object_type; /* Object type, deprecated */
     char           *psz_name; /* given name */
 
     /* Object variables */
index f01fa6666fde4a9e7a54089768d460893ff473be..87571ec99a1c0d37998d5f0ecd88f4339599c540 100644 (file)
@@ -33,8 +33,7 @@
 filter_t *filter_NewBlend( vlc_object_t *p_this,
                            const video_format_t *p_dst_chroma )
 {
-    filter_t *p_blend = vlc_custom_create( p_this, sizeof(*p_blend),
-                                           VLC_OBJECT_GENERIC, "blend" );
+    filter_t *p_blend = vlc_custom_create( p_this, sizeof(*p_blend), "blend" );
     if( !p_blend )
         return NULL;
 
@@ -119,8 +118,8 @@ video_splitter_t *video_splitter_New( vlc_object_t *p_this,
                                       const char *psz_name,
                                       const video_format_t *p_fmt )
 {
-    video_splitter_t *p_splitter = vlc_custom_create( p_this, sizeof(*p_splitter),
-                                           VLC_OBJECT_GENERIC, "video splitter" );
+    video_splitter_t *p_splitter = vlc_custom_create( p_this,
+                                       sizeof(*p_splitter), "video splitter" );
     if( !p_splitter )
         return NULL;
 
index 468d1e301faee2f06f7d6597ac47c50331e25ec5..088a6294abad3eeaf1b29917b61101a46c43aa90 100644 (file)
@@ -373,8 +373,7 @@ static filter_t *filter_chain_AppendFilterInternal( filter_chain_t *p_chain,
                                                     const es_format_t *p_fmt_out )
 {
     chained_filter_t *p_chained =
-        vlc_custom_create( p_chain->p_this, sizeof(*p_chained),
-                           VLC_OBJECT_GENERIC, "filter" );
+        vlc_custom_create( p_chain->p_this, sizeof(*p_chained), "filter" );
     filter_t *p_filter = &p_chained->filter;
     if( !p_filter )
         return NULL;
index dbe36e08071210d58972a74717706f0c15d7b9b1..63e7e4347c621376222aad4f4ae15d0785de1dc2 100644 (file)
@@ -656,8 +656,7 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
 {
     decoder_t *p_dec;
 
-    p_dec = vlc_custom_create( p_this, sizeof( *p_dec ), VLC_OBJECT_GENERIC,
-                               "image decoder" );
+    p_dec = vlc_custom_create( p_this, sizeof( *p_dec ), "image decoder" );
     if( p_dec == NULL )
         return NULL;
 
@@ -781,11 +780,9 @@ static filter_t *CreateFilter( vlc_object_t *p_this, es_format_t *p_fmt_in,
                                video_format_t *p_fmt_out,
                                const char *psz_module )
 {
-    static const char typename[] = "filter";
     filter_t *p_filter;
 
-    p_filter = vlc_custom_create( p_this, sizeof(filter_t),
-                                  VLC_OBJECT_GENERIC, typename );
+    p_filter = vlc_custom_create( p_this, sizeof(filter_t), "filter" );
     p_filter->pf_video_buffer_new =
         (picture_t *(*)(filter_t *))video_new_buffer;
     p_filter->pf_video_buffer_del =
index f4a314a4f2e80961c8929d04ce57e9fe2897f0db..8470094268c2105353a483ced4ce290bef82fcff 100644 (file)
@@ -79,7 +79,7 @@ media_library_t *ml_Create( vlc_object_t *p_this, char *psz_name )
 
     p_ml = ( media_library_t * ) vlc_custom_create(
                                 p_this, sizeof( media_library_t ),
-                                VLC_OBJECT_GENERIC, "media-library" );
+                                "media-library" );
     if( !p_ml )
     {
         msg_Err( p_this, "unable to create media library object" );
index 544ce2ed45a8de7c07024c5428f6194af7964846..de7e9ff203eb2e1c884bb754a9245729b20dc8dc 100644 (file)
@@ -108,7 +108,7 @@ static void libvlc_unlock (libvlc_int_t *p_libvlc)
 
 #undef vlc_custom_create
 void *vlc_custom_create (vlc_object_t *parent, size_t length,
-                         int type, const char *typename)
+                         const char *typename)
 {
     /* NOTE:
      * VLC objects are laid out as follow:
@@ -124,7 +124,6 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
     vlc_object_internals_t *priv = malloc (sizeof (*priv) + length);
     if (unlikely(priv == NULL))
         return NULL;
-    priv->i_object_type = type;
     priv->psz_name = NULL;
     priv->var_root = NULL;
     vlc_mutex_init (&priv->var_lock);
@@ -193,7 +192,7 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
  */
 void *vlc_object_create( vlc_object_t *p_this, size_t i_size )
 {
-    return vlc_custom_create( p_this, i_size, VLC_OBJECT_GENERIC, "generic" );
+    return vlc_custom_create( p_this, i_size, "generic" );
 }
 
 #undef vlc_object_set_destructor
index 23a5c9158fd01ee1eb357fb48ff6a040aab574b9..a33603d321a637f045911f59b5b18bcfca92a22b 100644 (file)
@@ -31,8 +31,7 @@
 void *vlc_probe (vlc_object_t *obj,
                  const char *capability, size_t *restrict pcount)
 {
-    vlc_probe_t *probe = vlc_custom_create (obj, sizeof(*probe),
-                                            VLC_OBJECT_GENERIC, "probe");
+    vlc_probe_t *probe = vlc_custom_create (obj, sizeof(*probe), "probe");
     if (unlikely(probe == NULL))
     {
         *pcount = 0;
index a22665a99e7a708947e953ba04e0a5cbc97c127b..8d4e412b803937f3d0cec01aaf3cd36ef33b3f04 100644 (file)
@@ -38,8 +38,7 @@ sql_t *sql_Create( vlc_object_t *p_this, const char *psz_name,
 {
     sql_t *p_sql;
 
-    p_sql = ( sql_t * ) vlc_custom_create( p_this, sizeof( sql_t ),
-                                           VLC_OBJECT_GENERIC, "sql" );
+    p_sql = ( sql_t * ) vlc_custom_create( p_this, sizeof( sql_t ), "sql" );
     if( !p_sql )
     {
         msg_Err( p_this, "unable to create sql object" );
index 73560808351f0a06c7094778004bf1b49fa37043..8e15307c477e9815c10540b1005ae0469aa4ab7f 100644 (file)
@@ -509,7 +509,7 @@ void update_Download( update_t *p_update, const char *psz_destdir )
 
     update_download_thread_t *p_udt =
         vlc_custom_create( p_update->p_libvlc, sizeof( *p_udt ),
-                           VLC_OBJECT_GENERIC, "update download" );
+                           "update download" );
     if( !p_udt )
         return;
 
index c14bd2e6a020eebdf31b897ae1e7b8138ddfa5b9..ab3986e6afc3a3986f491fee60cc17e2248ec64b 100644 (file)
@@ -40,8 +40,7 @@ xml_t *xml_Create( vlc_object_t *p_this )
 {
     xml_t *p_xml;
 
-    p_xml = vlc_custom_create( p_this, sizeof( *p_xml ), VLC_OBJECT_GENERIC,
-                               "xml" );
+    p_xml = vlc_custom_create( p_this, sizeof( *p_xml ), "xml" );
 
     p_xml->p_module = module_need( p_xml, "xml", NULL, false );
     if( !p_xml->p_module )
@@ -75,8 +74,7 @@ xml_reader_t *xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
 {
     xml_reader_t *reader;
 
-    reader = vlc_custom_create(obj, sizeof(*reader), VLC_OBJECT_GENERIC,
-                               "xml reader");
+    reader = vlc_custom_create(obj, sizeof(*reader), "xml reader");
 
     reader->p_stream = stream;
     reader->p_module = module_need(reader, "xml reader", NULL, false);
index 381a3d898bc16f9200fe15dcefa4e484e373f564..29c8f84c6848e724ece6a9243562d609480652bc 100644 (file)
@@ -973,7 +973,6 @@ httpd_host_t *httpd_HostNew( vlc_object_t *p_this, const char *psz_host,
                            );
 }
 
-static const char psz_object_type[] = "http server";
 static vlc_mutex_t httpd_mutex = VLC_STATIC_MUTEX;
 
 httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
@@ -1002,8 +1001,7 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
     {
         msg_Info( p_this, "creating httpd" );
         httpd = (httpd_t *)vlc_custom_create( p_this, sizeof (*httpd),
-                                              VLC_OBJECT_GENERIC,
-                                              psz_object_type );
+                                              "http server" );
         if( httpd == NULL )
         {
             vlc_mutex_unlock( &httpd_mutex );
@@ -1069,8 +1067,7 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
 
     /* create the new host */
     host = (httpd_host_t *)vlc_custom_create( p_this, sizeof (*host),
-                                              VLC_OBJECT_GENERIC,
-                                              psz_object_type );
+                                              "http host" );
     if (host == NULL)
         goto error;
 
index 104620f459d20ac08929e7d2dd980790356f90de..7cd6797509fe6fb7fa888c15eae8078643781e6b 100644 (file)
@@ -52,9 +52,7 @@ tls_ServerCreate (vlc_object_t *obj, const char *cert_path,
 {
     tls_server_t *srv;
 
-    srv = (tls_server_t *)vlc_custom_create (obj, sizeof (*srv),
-                                             VLC_OBJECT_GENERIC,
-                                             "tls server");
+    srv = (tls_server_t *)vlc_custom_create (obj, sizeof (*srv), "tls server");
     if (srv == NULL)
         return NULL;
 
@@ -162,9 +160,7 @@ tls_ClientCreate (vlc_object_t *obj, int fd, const char *psz_hostname)
     tls_session_t *cl;
     int val;
 
-    cl = (tls_session_t *)vlc_custom_create (obj, sizeof (*cl),
-                                             VLC_OBJECT_GENERIC,
-                                             "tls client");
+    cl = (tls_session_t *)vlc_custom_create (obj, sizeof (*cl), "tls client");
     if (cl == NULL)
         return NULL;
 
index e5fe18c1aa3dabaed4c62707d3199b4c1d73fa78..068bfb084cab130571a62feaf7c89eaa7f33d133 100644 (file)
@@ -158,10 +158,8 @@ osd_menu_t *osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
     var_Get( p_this->p_libvlc, "osd-object", &val );
     if( val.p_address == NULL )
     {
-        static const char osdmenu_name[] = "osd menu";
-
         p_osd = vlc_custom_create( p_this->p_libvlc, sizeof( *p_osd ),
-                                   VLC_OBJECT_GENERIC, osdmenu_name );
+                                   "osd menu" );
         if( !p_osd )
             return NULL;
 
index 8e7a46a7f624dca666ceeb090974a63435c5944d..4f2b40a44c5c78036f0062a0341d5b5ddcf0aa36 100644 (file)
@@ -152,13 +152,11 @@ static int VideoSplitterCallback( vlc_object_t *p_this, char const *psz_cmd,
  */
 playlist_t * playlist_Create( vlc_object_t *p_parent )
 {
-    static const char playlist_name[] = "playlist";
     playlist_t *p_playlist;
     playlist_private_t *p;
 
     /* Allocate structure */
-    p = vlc_custom_create( p_parent, sizeof( *p ),
-                           VLC_OBJECT_GENERIC, playlist_name );
+    p = vlc_custom_create( p_parent, sizeof( *p ), "playlist" );
     if( !p )
         return NULL;
 
index 95af63c4521ab9b17e079c5ec7480750a9857f9f..470896bef50746bdc036a881d5e269f402f00a03 100644 (file)
@@ -218,8 +218,7 @@ static int FindArt( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
 
     vlc_object_t *p_parent = VLC_OBJECT(p_fetcher->p_playlist);
     art_finder_t *p_finder =
-        vlc_custom_create( p_parent, sizeof( *p_finder ), VLC_OBJECT_GENERIC,
-                           "art finder" );
+        vlc_custom_create( p_parent, sizeof( *p_finder ), "art finder" );
     if( p_finder != NULL)
     {
         module_t *p_module;
@@ -333,8 +332,7 @@ error:
 static void FetchMeta( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
 {
     demux_meta_t *p_demux_meta = vlc_custom_create(p_fetcher->p_playlist,
-                                       sizeof(*p_demux_meta),
-                                       VLC_OBJECT_GENERIC, "demux meta" );
+                                         sizeof(*p_demux_meta), "demux meta" );
     if( !p_demux_meta )
         return;
 
index e4aa606276bb92f79b49e3899a48b94cbb6b06a3..9487af440e29cb9f6c7bc2e4d64a12b9a4b61688 100644 (file)
@@ -43,8 +43,7 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
     if( p_export_root == NULL ) return VLC_EGENERIC;
 
     playlist_export_t *p_export =
-        vlc_custom_create( p_playlist, sizeof( *p_export ), VLC_OBJECT_GENERIC,
-                           "playlist export" );
+        vlc_custom_create( p_playlist, sizeof( *p_export ), "playlist export" );
     if( !p_export )
         return VLC_ENOMEM;
 
index ee0e683df63c431e489c3c8432aee2c3f79c2b20..77ffb97b822cfe8c65b177ee9e610033fefc95a7 100644 (file)
@@ -111,8 +111,7 @@ services_discovery_t *vlc_sd_Create( vlc_object_t *p_super,
 {
     services_discovery_t *p_sd;
 
-    p_sd = vlc_custom_create( p_super, sizeof( *p_sd ), VLC_OBJECT_GENERIC,
-                              "services discovery" );
+    p_sd = vlc_custom_create( p_super, sizeof( *p_sd ), "services discovery" );
     if( !p_sd )
         return NULL;
     free(config_ChainCreate( &p_sd->psz_name, &p_sd->p_cfg, cfg ));
index feee1d0df914978f66efbe01533d56fc3cdad7d2..4a3b7c258cb480747eb5a134712011edaae39fa2 100644 (file)
@@ -103,8 +103,7 @@ sap_handler_t *SAP_Create (vlc_object_t *p_announce)
 {
     sap_handler_t *p_sap;
 
-    p_sap = vlc_custom_create (p_announce, sizeof (*p_sap),
-                               VLC_OBJECT_GENERIC, "sap sender");
+    p_sap = vlc_custom_create (p_announce, sizeof (*p_sap), "sap sender");
     if (p_sap == NULL)
         return NULL;
 
index 337675c58a4a00937e3904bf558abbb79bb29a4a..3e2915d4369525cc3a6fc551742f9d781ed446e0 100644 (file)
@@ -82,7 +82,6 @@ static void mrl_Clean( mrl_t *p_mrl );
  *****************************************************************************/
 sout_instance_t *sout_NewInstance( vlc_object_t *p_parent, const char *psz_dest )
 {
-    static const char typename[] = "stream output";
     sout_instance_t *p_sout;
 
     char *psz_chain;
@@ -99,8 +98,7 @@ sout_instance_t *sout_NewInstance( vlc_object_t *p_parent, const char *psz_dest
         return NULL;
 
     /* *** Allocate descriptor *** */
-    p_sout = vlc_custom_create( p_parent, sizeof( *p_sout ),
-                                VLC_OBJECT_GENERIC, typename );
+    p_sout = vlc_custom_create( p_parent, sizeof( *p_sout ), "stream output" );
     if( p_sout == NULL )
         return NULL;
 
@@ -250,12 +248,10 @@ int sout_InputSendBuffer( sout_packetizer_input_t *p_input,
 sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
                                       const char *psz_access, const char *psz_name )
 {
-    static const char typename[] = "access out";
     sout_access_out_t *p_access;
     char              *psz_next;
 
-    p_access = vlc_custom_create( p_sout, sizeof( *p_access ),
-                                  VLC_OBJECT_GENERIC, typename );
+    p_access = vlc_custom_create( p_sout, sizeof( *p_access ), "access out" );
     if( !p_access )
         return NULL;
 
@@ -352,12 +348,10 @@ int sout_AccessOutControl (sout_access_out_t *access, int query, ...)
 sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
                           sout_access_out_t *p_access )
 {
-    static const char typename[] = "mux";
     sout_mux_t *p_mux;
     char       *psz_next;
 
-    p_mux = vlc_custom_create( p_sout, sizeof( *p_mux ), VLC_OBJECT_GENERIC,
-                               typename);
+    p_mux = vlc_custom_create( p_sout, sizeof( *p_mux ), "mux" );
     if( p_mux == NULL )
         return NULL;
 
@@ -771,13 +765,11 @@ void sout_StreamChainDelete(sout_stream_t *p_first, sout_stream_t *p_last)
 static sout_stream_t *sout_StreamNew( sout_instance_t *p_sout, char *psz_name,
                                config_chain_t *p_cfg, sout_stream_t *p_next)
 {
-    static const char typename[] = "stream out";
     sout_stream_t *p_stream;
 
     assert(psz_name);
 
-    p_stream = vlc_custom_create( p_sout, sizeof( *p_stream ),
-                                  VLC_OBJECT_GENERIC, typename );
+    p_stream = vlc_custom_create( p_sout, sizeof( *p_stream ), "stream out" );
     if( !p_stream )
         return NULL;
 
@@ -955,7 +947,5 @@ rtp:
 #undef sout_EncoderCreate
 encoder_t *sout_EncoderCreate( vlc_object_t *p_this )
 {
-    static const char type[] = "encoder";
-    return vlc_custom_create( p_this, sizeof( encoder_t ), VLC_OBJECT_GENERIC,
-                              type );
+    return vlc_custom_create( p_this, sizeof( encoder_t ), "encoder" );
 }
index 6d8449d9a5fe16680631e8106fb53e54ce4e87de..a25c3bef72d3474a1dfd98a054b617dc973af2ba 100644 (file)
@@ -100,8 +100,7 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
                                         vout_display_owner_t *owner)
 {
     /* */
-    vout_display_t *vd = vlc_custom_create(obj, sizeof(*vd),
-                                           VLC_OBJECT_GENERIC, "vout display");
+    vout_display_t *vd = vlc_custom_create(obj, sizeof(*vd), "vout display" );
 
     /* */
     video_format_Copy(&vd->source, fmt);
index 1cf246c8050917ca6775dfe416e5c9d5f96e209d..8547434d1e9ce34c3e9465e35c9aa6cd98ee99af 100644 (file)
@@ -36,9 +36,7 @@ typedef struct
 
 vlc_inhibit_t *vlc_inhibit_Create (vlc_object_t *parent, int_fast32_t wid)
 {
-    static char const typename[] = "inhibit";
-    inhibit_t *priv = vlc_custom_create (parent, sizeof (*priv),
-                                         VLC_OBJECT_GENERIC, typename);
+    inhibit_t *priv = vlc_custom_create (parent, sizeof (*priv), "inhibit" );
     if (priv == NULL)
         return NULL;
 
index 069331f4b03b60d12ebc2f9081c832ed8509c70a..d5033daa23ae401668c25dfbc73704466d12864f 100644 (file)
@@ -60,7 +60,7 @@ vlc_gl_t *vlc_gl_Create(struct vout_window_t *wnd, unsigned flags,
             return NULL;
     }
 
-    gl = vlc_custom_create(parent, sizeof (*gl), VLC_OBJECT_GENERIC, "gl");
+    gl = vlc_custom_create(parent, sizeof (*gl), "gl");
     if (unlikely(gl == NULL))
         return NULL;
 
index 2f6c53806c3170e9bc77c80756e9b663094b2678..13506a6f09807073a946430c87fc8a1ea3fe0e29 100644 (file)
@@ -120,7 +120,7 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
     /* Allocate descriptor */
     vout_thread_t *vout = vlc_custom_create(object,
                                             sizeof(*vout) + sizeof(*vout->p),
-                                            VLC_OBJECT_GENERIC, "video output");
+                                            "video output");
     if (!vout) {
         video_format_Clean(&original);
         return NULL;
index e41d09cd24b2285d5d0604b9db45127203c211f4..5116938bbc4261cc9110df8f795cfba489556b06 100644 (file)
@@ -200,8 +200,7 @@ static int spu_get_attachments(filter_t *filter,
 
 static filter_t *SpuRenderCreateAndLoadText(spu_t *spu)
 {
-    filter_t *text = vlc_custom_create(spu, sizeof(*text),
-                                       VLC_OBJECT_GENERIC, "spu text");
+    filter_t *text = vlc_custom_create(spu, sizeof(*text), "spu text");
     if (!text)
         return NULL;
 
@@ -232,8 +231,7 @@ static filter_t *SpuRenderCreateAndLoadScale(vlc_object_t *object,
                                              vlc_fourcc_t dst_chroma,
                                              bool require_resize)
 {
-    filter_t *scale = vlc_custom_create(object, sizeof(*scale),
-                                        VLC_OBJECT_GENERIC, "scale");
+    filter_t *scale = vlc_custom_create(object, sizeof(*scale), "scale");
     if (!scale)
         return NULL;
 
@@ -1205,8 +1203,9 @@ static void SubSourceAllocationClean(filter_t *filter)
  */
 spu_t *spu_Create(vlc_object_t *object)
 {
-    spu_t *spu = vlc_custom_create(object, sizeof(spu_t) + sizeof(spu_private_t),
-                                   VLC_OBJECT_GENERIC, "subpicture");
+    spu_t *spu = vlc_custom_create(object,
+                                   sizeof(spu_t) + sizeof(spu_private_t),
+                                   "subpicture");
     if (!spu)
         return NULL;
 
index 8d4cb7ea0516c85e97969e05c49d47ea84311bda..b98a3e9c1ecce02cc9343bf012ba3d939c7976e1 100644 (file)
@@ -55,8 +55,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
                                const char *module,
                                const vout_window_cfg_t *cfg)
 {
-    static char const name[] = "window";
-    window_t *w = vlc_custom_create(obj, sizeof(*w), VLC_OBJECT_GENERIC, name);
+    window_t *w = vlc_custom_create(obj, sizeof(*w), "window");
     vout_window_t *window = &w->wnd;
 
     memset(&window->handle, 0, sizeof(window->handle));
index 3a4d0a15926aba909e5ac78b4720b75dc6a68edb..e3e0b094973af90d6027de5a2059f21c78f76beb 100644 (file)
@@ -176,10 +176,8 @@ void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_
         if( GetLastError() != ERROR_ALREADY_EXISTS )
         {
             /* We are the 1st instance. */
-            static const char typename[] = "ipc helper";
             p_helper =
-                vlc_custom_create( p_this, sizeof(vlc_object_t),
-                                   VLC_OBJECT_GENERIC, typename );
+                vlc_custom_create( p_this, sizeof(*p_helper), "ipc helper" );
 
             /* Run the helper thread */
             hIPCHelperReady = CreateEvent( NULL, FALSE, FALSE, NULL );