]> git.sesse.net Git - vlc/commitdiff
Remove vlc_object_attach()
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 25 May 2011 16:50:38 +0000 (19:50 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 25 May 2011 16:50:38 +0000 (19:50 +0300)
54 files changed:
include/vlc_objects.h
modules/access/rtmp/access.c
modules/access_output/rtmp.c
modules/gui/fbosd.c
modules/gui/qt4/extensions_manager.cpp
modules/gui/skins2/src/dialogs.cpp
modules/stream_out/mosaic_bridge.c
modules/stream_out/rtp.c
modules/stream_out/transcode/transcode.c
modules/video_filter/blendbench.c
modules/video_filter/opencv_wrapper.c
modules/visualization/projectm.cpp
projects/macosx/framework/Sources/VLCExtensionsManager.m
src/audio_output/common.c
src/audio_output/filters.c
src/audio_output/input.c
src/audio_output/mixer.c
src/control/media_player.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/stream_demux.c
src/input/stream_filter.c
src/input/stream_memory.c
src/input/vlm.c
src/interface/interface.c
src/libvlccore.sym
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/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 f6ac4219a6c86ebe00562aa8b950ba9218386906..6b4c3c68ebb4d0adc0c1924a394a12bf1fc5a435 100644 (file)
@@ -62,7 +62,6 @@ struct vlc_object_t
  * Prototypes
  *****************************************************************************/
 VLC_API void *vlc_object_create( vlc_object_t *, size_t ) VLC_MALLOC VLC_USED;
-VLC_API void vlc_object_attach( vlc_object_t *, vlc_object_t * );
 VLC_API vlc_object_t *vlc_object_find_name( vlc_object_t *, const char *, int ) VLC_USED VLC_DEPRECATED;
 VLC_API void * vlc_object_hold( vlc_object_t * );
 VLC_API void vlc_object_release( vlc_object_t * );
@@ -75,9 +74,6 @@ VLC_API char *vlc_object_get_name( const vlc_object_t * ) VLC_USED;
 
 #define vlc_object_create(a,b) vlc_object_create( VLC_OBJECT(a), b )
 
-#define vlc_object_attach(a,b) \
-    vlc_object_attach( VLC_OBJECT(a), VLC_OBJECT(b) )
-
 #define vlc_object_find_name(a,b,c) \
     vlc_object_find_name( VLC_OBJECT(a),b,c)
 
index 9e46476e1880c5714b1182d92579ce2db82b7425..12e8411472a74556990b985d5954056ded410a43 100644 (file)
@@ -103,7 +103,6 @@ static int Open( vlc_object_t *p_this )
         vlc_object_create( p_access, sizeof( rtmp_control_thread_t ) );
     if( !p_sys->p_thread )
         return VLC_ENOMEM;
-    vlc_object_attach( p_sys->p_thread, p_access );
 
     /* Parse URI - remove spaces */
     p = psz = strdup( p_access->psz_location );
index 75469e238d663b4c376fe730ebb3bcde02ee7c12..205cd28217251300e3464622c5af7c727ffc16b7 100644 (file)
@@ -100,7 +100,6 @@ static int Open( vlc_object_t *p_this )
         free( p_sys );
         return VLC_ENOMEM;
     }
-    vlc_object_attach( p_sys->p_thread, p_access );
 
     /* Parse URI - remove spaces */
     p = psz = strdup( p_access->psz_path );
index 8b4f620a791a39054136601cd30f75b251fcf65f..35c139d34455e5bd42f0e1338b6f946e4573712c 100644 (file)
@@ -530,7 +530,6 @@ static int OpenBlending( intf_thread_t *p_intf )
 
     p_intf->p_sys->p_blend =
             vlc_object_create( p_intf, sizeof(filter_t) );
-    vlc_object_attach( p_intf->p_sys->p_blend, p_intf );
     p_intf->p_sys->p_blend->fmt_out.video.i_x_offset =
         p_intf->p_sys->p_blend->fmt_out.video.i_y_offset = 0;
     p_intf->p_sys->p_blend->fmt_out.video.i_sar_num =
@@ -576,7 +575,6 @@ static int OpenTextRenderer( intf_thread_t *p_intf )
 
     p_intf->p_sys->p_text =
             vlc_object_create( p_intf, sizeof(filter_t) );
-    vlc_object_attach( p_intf->p_sys->p_text, p_intf );
 
     p_intf->p_sys->p_text->fmt_out.video.i_width =
         p_intf->p_sys->p_text->fmt_out.video.i_visible_width =
index 84594abaf9cb21744835886d541b25c87d1f475e..0b6f0570abff0fee61f81ea7e39602e5dfa3bb8f 100644 (file)
@@ -78,7 +78,6 @@ bool ExtensionsManager::loadExtensions()
             emit extensionsUpdated();
             return false;
         }
-        vlc_object_attach( p_extensions_manager, p_intf );
 
         p_extensions_manager->p_module =
                 module_need( p_extensions_manager, "extension", NULL, false );
index ccfcf9ed1075e86b2f49b127d9baef4ffefcd18d..d96f1b2210479c75113a953bb494cbd5152d77ce 100644 (file)
@@ -161,9 +161,6 @@ bool Dialogs::init()
     if( m_pProvider == NULL )
         return false;
 
-    // Attach the dialogs provider to its parent interface
-    vlc_object_attach( m_pProvider, getIntf() );
-
     m_pModule = module_need( m_pProvider, "dialogs provider", NULL, false );
     if( m_pModule == NULL )
     {
index 5576ca0cb3a0dcfb5172e5199aa3ae534d1c9c94..9c807b119983ca1565638ec8e2b98cd2b480e882 100644 (file)
@@ -306,7 +306,6 @@ static sout_stream_id_t * Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     p_sys->p_decoder = vlc_object_create( p_stream, sizeof( decoder_t ) );
     if( !p_sys->p_decoder )
         return NULL;
-    vlc_object_attach( p_sys->p_decoder, p_stream );
     p_sys->p_decoder->p_module = NULL;
     p_sys->p_decoder->fmt_in = *p_fmt;
     p_sys->p_decoder->b_pace_control = false;
index c8aecfe51fb5abab04c9c91410990baf43a93057..3e41159f843df0f7b752876c66adf97d90de0ea9 100644 (file)
@@ -1771,6 +1771,5 @@ static sout_access_out_t *GrabberCreate( sout_stream_t *p_stream )
     p_grab->p_sys       = (sout_access_out_sys_t *)p_stream;
     p_grab->pf_seek     = NULL;
     p_grab->pf_write    = AccessOutGrabberWrite;
-    vlc_object_attach( p_grab, p_stream );
     return p_grab;
 }
index 6692b8b8d30a5468ce3f667611ccb502e76238f1..8df202abb8f1610338a30b91024fa8b80b24ce9b 100644 (file)
@@ -524,7 +524,6 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     id->p_decoder = vlc_object_create( p_stream, sizeof( decoder_t ) );
     if( !id->p_decoder )
         goto error;
-    vlc_object_attach( id->p_decoder, p_stream );
     id->p_decoder->p_module = NULL;
     id->p_decoder->fmt_in = *p_fmt;
     id->p_decoder->b_pace_control = true;
@@ -533,7 +532,6 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     id->p_encoder = sout_EncoderCreate( p_stream );
     if( !id->p_encoder )
         goto error;
-    vlc_object_attach( id->p_encoder, p_stream );
     id->p_encoder->p_module = NULL;
 
     /* Create destination format */
index 9484e653220357c4c657eebd62dea29550ecec75..6665f016a8c65f7ae48e6b953d4717a2ff4a07db 100644 (file)
@@ -225,7 +225,6 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         picture_Release( p_pic );
         return NULL;
     }
-    vlc_object_attach( p_blend, p_filter );
     p_blend->fmt_out.video = p_sys->p_base_image->format;
     p_blend->fmt_in.video = p_sys->p_blend_image->format;
     p_blend->p_module = module_need( p_blend, "video blending", NULL, false );
index b48a2c20a1cf4af8cadd5e7e9fafba7e35c3a219..bbcea0693a9d2c3dc36d4ab3b3a4c32ebcee3c1e 100644 (file)
@@ -326,7 +326,6 @@ static int Init( vout_thread_t *p_vout )
     /* Load the internal opencv filter */
     /* We don't need to set up video formats for this filter as it not actually using a picture_t */
     p_sys->p_opencv = vlc_object_create( p_vout, sizeof(filter_t) );
-    vlc_object_attach( p_sys->p_opencv, p_vout );
 
     if (p_vout->p_sys->psz_inner_name)
         p_sys->p_opencv->p_module =
index 8fa2ac3e39ea8b93444d829a74bd78360b19a95f..ea7ea3f737e2ce3bbbbbe6e9bf15e7e3840ad36e 100644 (file)
@@ -311,8 +311,6 @@ static void *Thread( void *p_data )
     if( !p_sys->p_vout )
         goto error;
 
-    vlc_object_attach( p_sys->p_vout, p_filter );
-
     /* */
     video_format_Init( &fmt, 0 );
     video_format_Setup( &fmt, VLC_CODEC_RGB32,
index 15ac64d8c81d426d9f2d84faf1f3b1bae04371d2..46447a2ef0ca8b84aa8b3b30ae25b8da583b20af 100644 (file)
@@ -77,7 +77,6 @@ static VLCExtensionsManager *sharedManager = nil;
             vlc_object_release(libvlc);
             return nil;
         }
-        vlc_object_attach(_instance, libvlc);
 
         _instance->p_module = module_need(_instance, "extension", NULL, false);
         NSAssert(_instance->p_module, @"Unable to load extensions module");
index 1c3cb2711f1f84128f37172893a194d6f81d376e..ea6a930010b458625ca7a7cbae2c00a2c5736dbe 100644 (file)
@@ -102,8 +102,6 @@ aout_instance_t * __aout_New( vlc_object_t * p_parent )
 
     vlc_object_set_destructor( p_aout, aout_Destructor );
 
-    vlc_object_attach( p_aout, p_parent );
-
     return p_aout;
 }
 
index 19508709f8fa1fe209e51e8cc1999e1a8f5ee71d..dff500fb14dbf37202840ac4795332d88fd3e7df 100644 (file)
@@ -59,7 +59,6 @@ static filter_t * FindFilter( aout_instance_t * p_aout,
                                   VLC_OBJECT_GENERIC, typename );
 
     if ( p_filter == NULL ) return NULL;
-    vlc_object_attach( p_filter, p_aout );
 
     memcpy( &p_filter->fmt_in.audio, p_input_format,
             sizeof(audio_sample_format_t) );
index be83a6f5737be1adf7f372c187c92813756fed7e..9fa526ca573c9c81cbc672075dddc5ea693400ce 100644 (file)
@@ -278,8 +278,6 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
                 continue;
             }
 
-            vlc_object_attach( p_filter , p_aout );
-
             p_filter->p_owner = malloc( sizeof(*p_filter->p_owner) );
             p_filter->p_owner->p_aout  = p_aout;
             p_filter->p_owner->p_input = p_input;
index b19e000c8e6d3636283d3e1e0aa8f5af6b915f31..1180a1ea3d88409d981504c19c2c689e38a77812 100644 (file)
@@ -57,8 +57,6 @@ int aout_MixerNew( aout_instance_t * p_aout )
     p_mixer->mix = NULL;
     p_mixer->sys = NULL;
 
-    vlc_object_attach( p_mixer, p_aout );
-
     p_mixer->module = module_need( p_mixer, "audio mixer", NULL, false );
     if( !p_mixer->module )
     {
index 9a644ddd4017137ff0fdd0d509e970056decd4af..f0c221a9235f503db8ef032e19c3cd7ba4b16109 100644 (file)
@@ -379,7 +379,6 @@ libvlc_media_player_new( libvlc_instance_t *instance )
         libvlc_printerr("Not enough memory");
         return NULL;
     }
-    vlc_object_attach (mp, mp->p_libvlc);
 
     /* Input */
     var_Create (mp, "rate", VLC_VAR_FLOAT|VLC_VAR_DOINHERIT);
index b8a2f031e3652a1df4503113de9c17744052c3dc..01c67e3669fdf7d5cda4e5a198e489c77006e310 100644 (file)
@@ -83,9 +83,6 @@ access_t *__access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
 
     access_InitFields( p_access );
 
-    /* Before module_need (for var_Create...) */
-    vlc_object_attach( p_access, p_obj );
-
     p_access->p_module = module_need( p_access, "access", psz_access, true );
     if( p_access->p_module == NULL )
         goto error;
index 1c771fc6df79b565d9672a259a767e0e63d05ae8..d02593a64f90e937df2fce912ca184fa50c945bf 100644 (file)
@@ -815,8 +815,6 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
     p_dec->pf_get_display_date = DecoderGetDisplayDate;
     p_dec->pf_get_display_rate = DecoderGetDisplayRate;
 
-    vlc_object_attach( p_dec, p_parent );
-
     /* Find a suitable decoder/packetizer module */
     if( !b_packetizer )
         p_dec->p_module = module_need( p_dec, "decoder", "$codec", false );
@@ -838,8 +836,6 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
             es_format_Copy( &p_owner->p_packetizer->fmt_out,
                             &null_es_format );
 
-            vlc_object_attach( p_owner->p_packetizer, p_parent );
-
             p_owner->p_packetizer->p_module =
                 module_need( p_owner->p_packetizer,
                              "packetizer", "$packetizer", false );
index b0d7dae35e11704d09ac68a55ee524000c3899da..635b675490639dce1b364047a82d0cd896095ecf 100644 (file)
@@ -178,9 +178,6 @@ demux_t *__demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
         }
     }
 
-    /* Before module_need (for var_Create...) */
-    vlc_object_attach( p_demux, p_obj );
-
     if( s )
     {
         /* ID3/APE tags will mess-up demuxer probing so we skip it here.
@@ -353,7 +350,6 @@ decoder_t *demux_PacketizerNew( demux_t *p_demux, es_format_t *p_fmt, const char
     p_packetizer->fmt_in = *p_fmt;
     es_format_Init( &p_packetizer->fmt_out, UNKNOWN_ES, 0 );
 
-    vlc_object_attach( p_packetizer, p_demux );
     p_packetizer->p_module = module_need( p_packetizer, "packetizer", NULL, false );
     if( !p_packetizer->p_module )
     {
index 96b72d1503691e93eba46390dc3bb99a38719d8e..5d384efce2947b8083dda71a639d5134550f7633 100644 (file)
@@ -319,8 +319,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
     if( p_input == NULL )
         return NULL;
 
-    vlc_object_attach( p_input, p_parent );
-
     /* Construct a nice name for the input timer */
     char psz_timer_name[255];
     char * psz_name = input_item_GetName( p_item );
@@ -2739,7 +2737,6 @@ static void InputSourceMeta( input_thread_t *p_input,
                            VLC_OBJECT_GENERIC, "demux meta" );
     if( !p_demux_meta )
         return;
-    vlc_object_attach( p_demux_meta, p_demux );
     p_demux_meta->p_demux = p_demux;
     p_demux_meta->p_item = p_input->p->p_item;
 
index a285d7077a43b27b6e6cfa0c3916e298e82f844d..d22ca9435718d8e9deace2bad55141ce062fd4a3 100644 (file)
@@ -267,7 +267,6 @@ int input_item_WriteMeta( vlc_object_t *obj, input_item_t *p_item )
                            "meta writer" );
     if( p_export == NULL )
         return VLC_ENOMEM;
-    vlc_object_attach( p_export, obj );
     p_export->p_item = p_item;
 
     int type;
index 4e7d08cd3ceae1c6327e18c87978a96eec8a92b4..a2ebd08873732b8e49ad40e5dc90ab67d770cd52 100644 (file)
@@ -296,9 +296,6 @@ stream_t *stream_AccessNew( access_t *p_access, char **ppsz_list )
         return NULL;
     }
 
-    /* Attach it now, needed for b_die */
-    vlc_object_attach( s, p_access );
-
     s->pf_read   = NULL;    /* Set up later */
     s->pf_peek   = NULL;
     s->pf_control = AStreamControl;
index e29ee2da0cc5b6e769cedc3edcc9e2e3b572ddf8..f68ffe31e8b03fdfbf909ea1cf808219990b6f93 100644 (file)
@@ -95,8 +95,6 @@ stream_t *stream_DemuxNew( demux_t *p_demux, const char *psz_demux, es_out_t *ou
         return NULL;
     }
 
-    vlc_object_attach( s, p_obj );
-
     if( vlc_clone( &p_sys->thread, DStreamThread, s, VLC_THREAD_PRIORITY_INPUT ) )
     {
         stream_CommonDelete( s );
index 951bddae6fcb98f1476038f2736a8db8cf7cb144..e9a97898449a31d66e802667eafc89a013bfac86 100644 (file)
@@ -59,8 +59,6 @@ stream_t *stream_FilterNew( stream_t *p_source,
     s->p_source = p_source;
 
     /* */
-    vlc_object_attach( s, p_source );
-
     s->p_module = module_need( s, "stream_filter", psz_stream_filter, true );
 
     if( !s->p_module )
index f8700dfe0a18bca5ca51c66cc96896330e8225f8..4565828f3fd1e4fefb5f040b482870937918f95b 100644 (file)
@@ -78,7 +78,6 @@ stream_t *stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
     s->pf_destroy = Delete;
     s->p_input = NULL;
 
-    vlc_object_attach( s, p_this );
     return s;
 }
 
index 126a1db83ecc98dbd78b6c17aace6f1e6cdee4fb..3df530e7728f3e255ad38ac7197dc069a953e2f4 100644 (file)
@@ -163,7 +163,6 @@ vlm_t *vlm_New ( vlc_object_t *p_this )
     TAB_INIT( p_vlm->i_schedule, p_vlm->schedule );
     p_vlm->p_vod = NULL;
     var_Create( p_vlm, "intf-event", VLC_VAR_ADDRESS );
-    vlc_object_attach( p_vlm, p_this->p_libvlc );
 
     if( vlc_clone( &p_vlm->thread, Manage, p_vlm, VLC_THREAD_PRIORITY_LOW ) )
     {
@@ -761,7 +760,6 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
     {
         p_vlm->p_vod = vlc_custom_create( VLC_OBJECT(p_vlm), sizeof( vod_t ),
                                           VLC_OBJECT_GENERIC, "vod server" );
-        vlc_object_attach( p_vlm->p_vod, p_vlm );
         p_vlm->p_vod->p_module = module_need( p_vlm->p_vod, "vod server", "$vod-server", false );
         if( !p_vlm->p_vod->p_module )
         {
@@ -903,7 +901,6 @@ static vlm_media_instance_sys_t *vlm_MediaInstanceNew( vlm_t *p_vlm, const char
     p_instance->i_index = 0;
     p_instance->b_sout_keep = false;
     p_instance->p_parent = vlc_object_create( p_vlm, sizeof (vlc_object_t) );
-    vlc_object_attach( p_instance->p_parent, p_vlm );
     p_instance->p_input = NULL;
     p_instance->p_input_resource = NULL;
 
index fc8c52322fae731e65d0002c532504df76f6856b..11dfc07865d16bf35d3f8098362c4b0ab11638e7 100644 (file)
@@ -105,7 +105,6 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
     var_AddCallback( p_intf, "intf-add", AddIntfCallback, NULL );
 
     /* Attach interface to LibVLC */
-    vlc_object_attach( p_intf, p_libvlc );
 #if defined( __APPLE__ )
     p_intf->b_should_run_on_first_thread = false;
 #endif
index 87d96da46e2f70d20a0aa1354f925f4aa544c6de..6ff4b80d90dd620f7c2bfa2ced6cd276223d0b1f 100644 (file)
@@ -578,7 +578,6 @@ vlc_mutex_lock
 vlc_mutex_trylock
 vlc_mutex_unlock
 vlc_global_mutex
-vlc_object_attach
 vlc_object_create
 vlc_object_find_name
 vlc_object_hold
index adc7ad7a6d62bf209d8ef2b6e3b244ef7ad02982..f01fa6666fde4a9e7a54089768d460893ff473be 100644 (file)
@@ -58,9 +58,6 @@ filter_t *filter_NewBlend( vlc_object_t *p_this,
     * input format */
     p_blend->p_module = NULL;
 
-    /* */
-    vlc_object_attach( p_blend, p_this );
-
     return p_blend;
 }
 
@@ -130,8 +127,6 @@ video_splitter_t *video_splitter_New( vlc_object_t *p_this,
     video_format_Copy( &p_splitter->fmt, p_fmt );
 
     /* */
-    vlc_object_attach( p_splitter, p_this );
-
     p_splitter->p_module = module_need( p_splitter, "video splitter", psz_name, true );
     if( ! p_splitter->p_module )
     {
index 859d4ad4c256e3119c4f8542ba4af59d4de0d973..468d1e301faee2f06f7d6597ac47c50331e25ec5 100644 (file)
@@ -378,7 +378,6 @@ static filter_t *filter_chain_AppendFilterInternal( filter_chain_t *p_chain,
     filter_t *p_filter = &p_chained->filter;
     if( !p_filter )
         return NULL;
-    vlc_object_attach( p_filter, p_chain->p_this );
 
     if( !p_fmt_in )
     {
index 8e7780c45b26c1f1461dcb0ee6491d154e65fd6e..dbe36e08071210d58972a74717706f0c15d7b9b1 100644 (file)
@@ -672,8 +672,6 @@ static decoder_t *CreateDecoder( vlc_object_t *p_this, video_format_t *fmt )
     p_dec->pf_picture_link    = video_link_picture;
     p_dec->pf_picture_unlink  = video_unlink_picture;
 
-    vlc_object_attach( p_dec, p_this );
-
     /* Find a suitable decoder module */
     p_dec->p_module = module_need( p_dec, "decoder", "$codec", false );
     if( !p_dec->p_module )
@@ -752,8 +750,6 @@ static encoder_t *CreateEncoder( vlc_object_t *p_this, video_format_t *fmt_in,
     p_enc->fmt_out.video.i_width = p_enc->fmt_in.video.i_width;
     p_enc->fmt_out.video.i_height = p_enc->fmt_in.video.i_height;
 
-    vlc_object_attach( p_enc, p_this );
-
     /* Find a suitable decoder module */
     p_enc->p_module = module_need( p_enc, "encoder", NULL, false );
     if( !p_enc->p_module )
@@ -790,8 +786,6 @@ static filter_t *CreateFilter( vlc_object_t *p_this, es_format_t *p_fmt_in,
 
     p_filter = vlc_custom_create( p_this, sizeof(filter_t),
                                   VLC_OBJECT_GENERIC, typename );
-    vlc_object_attach( p_filter, p_this );
-
     p_filter->pf_video_buffer_new =
         (picture_t *(*)(filter_t *))video_new_buffer;
     p_filter->pf_video_buffer_del =
index e855703452363a942427ea405d56c93f7c101872..f4a314a4f2e80961c8929d04ce57e9fe2897f0db 100644 (file)
@@ -85,7 +85,6 @@ media_library_t *ml_Create( vlc_object_t *p_this, char *psz_name )
         msg_Err( p_this, "unable to create media library object" );
         return NULL;
     }
-    vlc_object_attach( p_ml, p_this );
 
     p_ml->p_module = module_need( p_ml, "media-library", psz_name, false );
     if( !p_ml->p_module )
index d250bd5b622bfa191392e01f8c6b530cbde35e18..270609b206dd9a01b5e38729a3612145f89769cf 100644 (file)
@@ -545,25 +545,6 @@ void vlc_object_release( vlc_object_t *p_this )
     }
 }
 
-#undef vlc_object_attach
-/**
- * Exposes a VLC object in the hierarchy by attaching it to another object.
- * @note Before variables can be inherited, an object must be attached.
- * @param p_this object to expose
- * @param p_parent parent object in the hierarchy
- */
-void vlc_object_attach( vlc_object_t *p_this, vlc_object_t *p_parent )
-{
-    if( !p_this ) return;
-    if( likely(p_this->p_parent == p_parent) )
-        return;
-
-    msg_Err( p_this, "object hierarchy bug:" );
-    msg_Err( p_this->p_parent, "created by this object but..." );
-    msg_Err( p_parent, "...attached to this object" );
-    abort();
-}
-
 #undef vlc_list_children
 /**
  * Gets the list of children of an objects, and increment their reference
index fe44aa7c4c40bbfd5ccd61e34d500da402fa3fe9..23a5c9158fd01ee1eb357fb48ff6a040aab574b9 100644 (file)
@@ -38,7 +38,6 @@ void *vlc_probe (vlc_object_t *obj,
         *pcount = 0;
         return NULL;
     }
-    vlc_object_attach (probe, obj);
     probe->list = NULL;
     probe->count = 0;
 
index 2b81ef7f0392aea447c007ead61f133b5c94ea75..a22665a99e7a708947e953ba04e0a5cbc97c127b 100644 (file)
@@ -45,7 +45,6 @@ sql_t *sql_Create( vlc_object_t *p_this, const char *psz_name,
         msg_Err( p_this, "unable to create sql object" );
         return NULL;
     }
-    vlc_object_attach( p_sql, p_this );
 
     p_sql->psz_host = strdup( psz_host );
     p_sql->psz_user = strdup( psz_user );
index 1748bfc9f69a2729a1c2185fc60d477152793f07..c14bd2e6a020eebdf31b897ae1e7b8138ddfa5b9 100644 (file)
@@ -42,7 +42,6 @@ xml_t *xml_Create( vlc_object_t *p_this )
 
     p_xml = vlc_custom_create( p_this, sizeof( *p_xml ), VLC_OBJECT_GENERIC,
                                "xml" );
-    vlc_object_attach( p_xml, p_this );
 
     p_xml->p_module = module_need( p_xml, "xml", NULL, false );
     if( !p_xml->p_module )
@@ -78,7 +77,6 @@ xml_reader_t *xml_ReaderCreate(vlc_object_t *obj, stream_t *stream)
 
     reader = vlc_custom_create(obj, sizeof(*reader), VLC_OBJECT_GENERIC,
                                "xml reader");
-    vlc_object_attach(reader, obj);
 
     reader->p_stream = stream;
     reader->p_module = module_need(reader, "xml reader", NULL, false);
index e0f7f1ce8641e0f1cb4ff2a26c716ccdd1baa7f6..381a3d898bc16f9200fe15dcefa4e484e373f564 100644 (file)
@@ -1015,7 +1015,6 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
         httpd->host   = NULL;
 
         libvlc_priv (p_this->p_libvlc)->p_httpd = httpd;
-        vlc_object_attach( httpd, p_this->p_libvlc );
     }
 
     /* verify if it already exist */
@@ -1080,8 +1079,6 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
     vlc_cond_init( &host->wait );
     host->i_ref = 1;
 
-    vlc_object_attach( host, p_this );
-
     host->fds = net_ListenTCP( p_this, psz_host, i_port );
     if( host->fds == NULL )
     {
index 9c2590d943420d8d1dcc4fa654fce8fd75ff9564..104620f459d20ac08929e7d2dd980790356f90de 100644 (file)
@@ -70,7 +70,6 @@ tls_ServerCreate (vlc_object_t *obj, const char *cert_path,
         var_SetString (srv, "tls-x509-key", key_path);
     }
 
-    vlc_object_attach (srv, obj);
     srv->p_module = module_need (srv, "tls server", NULL, false );
     if (srv->p_module == NULL)
     {
@@ -120,14 +119,7 @@ int tls_ServerAddCRL (tls_server_t *srv, const char *path)
 
 tls_session_t *tls_ServerSessionPrepare (tls_server_t *srv)
 {
-    tls_session_t *ses;
-
-    ses = srv->pf_open (srv);
-    if (ses == NULL)
-        return NULL;
-
-    vlc_object_attach (ses, srv);
-    return ses;
+    return srv->pf_open (srv);
 }
 
 
@@ -185,7 +177,6 @@ tls_ClientCreate (vlc_object_t *obj, int fd, const char *psz_hostname)
     else
         msg_Dbg (cl, "requested anonymous server");
 
-    vlc_object_attach (cl, obj);
     cl->p_module = module_need (cl, "tls client", NULL, false );
     if (cl->p_module == NULL)
     {
index 794f8055486aad03850ea4c7f5c7fa2778f8b601..e5fe18c1aa3dabaed4c62707d3199b4c1d73fa78 100644 (file)
@@ -166,7 +166,6 @@ osd_menu_t *osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
             return NULL;
 
         p_osd->p_parser = NULL;
-        vlc_object_attach( p_osd, p_this->p_libvlc );
 
         /* Parse configuration file */
         if ( !osd_ParserLoad( p_osd, psz_file ) )
index 61b610bc0a8bb67d5e6b67e80edac620d00ea8b1..23811f2266b19a56de182a99a26e7badebb8666c 100644 (file)
@@ -164,7 +164,6 @@ playlist_t * playlist_Create( vlc_object_t *p_parent )
 
     assert( offsetof( playlist_private_t, public_data ) == 0 );
     p_playlist = &p->public_data;
-    vlc_object_attach( p_playlist, p_parent );
     TAB_INIT( pl_priv(p_playlist)->i_sds, pl_priv(p_playlist)->pp_sds );
 
     libvlc_priv(p_parent->p_libvlc)->p_playlist = p_playlist;
index 1a643b05d85341736c120e7ba001262ebac75951..95af63c4521ab9b17e079c5ec7480750a9857f9f 100644 (file)
@@ -224,7 +224,6 @@ static int FindArt( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
     {
         module_t *p_module;
 
-        vlc_object_attach( p_finder, p_parent );
         p_finder->p_item = p_item;
 
         p_module = module_need( p_finder, "art finder", NULL, false );
@@ -339,7 +338,6 @@ static void FetchMeta( playlist_fetcher_t *p_fetcher, input_item_t *p_item )
     if( !p_demux_meta )
         return;
 
-    vlc_object_attach( p_demux_meta, p_fetcher->p_playlist );
     p_demux_meta->p_demux = NULL;
     p_demux_meta->p_item = p_item;
 
index 44a8257a15e17cd40a123a155c112ce282a874a8..97d75a197d2f9a6b0aa3ede9c72d41ba42196063 100644 (file)
@@ -48,7 +48,6 @@ int playlist_Export( playlist_t * p_playlist, const char *psz_filename,
     if( !p_export )
         return VLC_ENOMEM;
 
-    vlc_object_attach( p_export, p_playlist );
     msg_Dbg( p_export, "saving %s to file %s",
              p_export_root->p_input->psz_name, psz_filename );
 
index 5b5f608de9d3aac5f2d4f5980035391b3aadb641..fd9cc75bd3a056cf135fc336621f7193e8a3d17d 100644 (file)
@@ -125,8 +125,6 @@ services_discovery_t *vlc_sd_Create( vlc_object_t *p_super,
     vlc_event_manager_register_event_type(em, vlc_ServicesDiscoveryEnded);
 
     vlc_object_set_destructor( p_sd, services_discovery_Destructor );
-    vlc_object_attach( p_sd, p_super );
-
     return p_sd;
 }
 
index e07233372fb5cfbf0f70fe2f7b8cb84b68e8e1fe..feee1d0df914978f66efbe01533d56fc3cdad7d2 100644 (file)
@@ -108,7 +108,6 @@ sap_handler_t *SAP_Create (vlc_object_t *p_announce)
     if (p_sap == NULL)
         return NULL;
 
-    vlc_object_attach( p_sap, p_announce );
     vlc_mutex_init (&p_sap->lock);
     p_sap->first = NULL;
     return p_sap;
index 2e15e9d5bffb77fcd93d2cbbda842fbd9bf2d5b6..337675c58a4a00937e3904bf558abbb79bb29a4a 100644 (file)
@@ -115,9 +115,6 @@ sout_instance_t *sout_NewInstance( vlc_object_t *p_parent, const char *psz_dest
     vlc_mutex_init( &p_sout->lock );
     p_sout->p_stream = NULL;
 
-    /* attach it for inherit */
-    vlc_object_attach( p_sout, p_parent );
-
     var_Create( p_sout, "sout-mux-caching", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
 
     p_sout->p_stream = sout_StreamChainNew( p_sout, psz_chain, NULL, NULL );
@@ -276,8 +273,6 @@ sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
     p_access->i_writes = 0;
     p_access->i_sent_bytes = 0;
 
-    vlc_object_attach( p_access, p_sout );
-
     p_access->p_module   =
         module_need( p_access, "sout access", p_access->psz_access, true );
 
@@ -385,8 +380,6 @@ sout_mux_t * sout_MuxNew( sout_instance_t *p_sout, const char *psz_mux,
     p_mux->b_waiting_stream = true;
     p_mux->i_add_stream_start = -1;
 
-    vlc_object_attach( p_mux, p_sout );
-
     p_mux->p_module =
         module_need( p_mux, "sout mux", p_mux->psz_mux, true );
 
@@ -796,8 +789,6 @@ static sout_stream_t *sout_StreamNew( sout_instance_t *p_sout, char *psz_name,
 
     msg_Dbg( p_sout, "stream=`%s'", p_stream->psz_name );
 
-    vlc_object_attach( p_stream, p_sout );
-
     p_stream->p_module =
         module_need( p_stream, "sout stream", p_stream->psz_name, true );
 
index 67092cd089014d4985997ddfad663ab0bf67eb65..0d36a3890ebb2cfb9e5ef536accff876eff0f1bb 100644 (file)
@@ -127,8 +127,6 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
 
     vd->owner = *owner;
 
-    vlc_object_attach(vd, obj);
-
     if (load_module) {
         vd->module = module_need(vd, "vout display", module, module && *module != '\0');
         if (!vd->module) {
index 18830964b6147793a655b4dc08c3bdb6bd7f9b45..1cf246c8050917ca6775dfe416e5c9d5f96e209d 100644 (file)
@@ -47,7 +47,6 @@ vlc_inhibit_t *vlc_inhibit_Create (vlc_object_t *parent, int_fast32_t wid)
     ih->p_sys = NULL;
     ih->inhibit = NULL;
 
-    vlc_object_attach (ih, parent);
     priv->module = module_need (ih, "inhibit", NULL, false);
     if (priv->module == NULL)
     {
index 42262849d07fef11a708134683e40e6e56337d07..069331f4b03b60d12ebc2f9081c832ed8509c70a 100644 (file)
@@ -63,7 +63,6 @@ vlc_gl_t *vlc_gl_Create(struct vout_window_t *wnd, unsigned flags,
     gl = vlc_custom_create(parent, sizeof (*gl), VLC_OBJECT_GENERIC, "gl");
     if (unlikely(gl == NULL))
         return NULL;
-    vlc_object_attach(gl, parent);
 
     gl->surface = wnd;
     gl->module = module_need(gl, type, name, true);
index 430876185cbef148db8f099ef817d60c05df592e..48aad9013b86d83cd7ec853e586c5f08be0ffc70 100644 (file)
@@ -144,9 +144,6 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
     vlc_mutex_init(&vout->p->filter.lock);
     vlc_mutex_init(&vout->p->spu_lock);
 
-    /* Attach the new object now so we can use var inheritance below */
-    vlc_object_attach(vout, object);
-
     /* Initialize subpicture unit */
     vout->p->spu = spu_Create(vout);
 
index ec1e8fbadf2698c25b44178bf2c2cf46b9169441..12b15223e867882b977924deb25a1c42910aaef6 100644 (file)
@@ -218,7 +218,6 @@ static filter_t *SpuRenderCreateAndLoadText(spu_t *spu)
 
     text->pf_get_attachments = spu_get_attachments;
 
-    vlc_object_attach(text, spu);
     text->p_module = module_need(text, "text renderer", "$text-renderer", false);
 
     /* Create a few variables used for enhanced text rendering */
@@ -252,7 +251,6 @@ static filter_t *SpuRenderCreateAndLoadScale(vlc_object_t *object,
     scale->pf_video_buffer_new = spu_new_video_buffer;
     scale->pf_video_buffer_del = spu_del_video_buffer;
 
-    vlc_object_attach(scale, object);
     scale->p_module = module_need(scale, "video filter2", NULL, false);
 
     return scale;
@@ -1212,7 +1210,6 @@ spu_t *spu_Create(vlc_object_t *object)
                                    VLC_OBJECT_GENERIC, "subpicture");
     if (!spu)
         return NULL;
-    vlc_object_attach(spu, object);
 
     /* Initialize spu fields */
     spu_private_t *sys = spu->p = (spu_private_t*)&spu[1];
index fd21bec95ac2b9254cec3e8b4b8f1578a1c0c4b6..8d4cb7ea0516c85e97969e05c49d47ea84311bda 100644 (file)
@@ -63,8 +63,6 @@ vout_window_t *vout_window_New(vlc_object_t *obj,
     window->control = NULL;
     window->sys = NULL;
 
-    vlc_object_attach(window, obj);
-
     const char *type;
     switch (cfg->type) {
 #ifdef WIN32
index 2d8f4eeb53beaa160beacfd777a4e8d3c0ef205f..7a47e82453486d7b98fd8d5873b6bd7f8d12dccf 100644 (file)
@@ -195,7 +195,6 @@ void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_
                 vlc_object_release (p_helper);
                 p_helper = NULL;
             }
-            vlc_object_attach (p_helper, p_this);
             CloseHandle( hIPCHelperReady );
 
             /* Initialization done.