Commit 36c4a22f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove vlc_object_attach()

parent d857d877
......@@ -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)
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 =
......
......@@ -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 );
......
......@@ -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 )
{
......
......@@ -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;
......
......@@ -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;
}
......@@ -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 */
......
......@@ -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 );
......
......@@ -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 =
......
......@@ -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,
......
......@@ -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");
......
......@@ -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;
}
......
......@@ -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) );
......
......@@ -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;
......
......@@ -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 )
{
......
......@@ -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);
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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 )
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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 )
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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 )
{
......
......@@ -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 )
{
......
......@@ -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 =
......
......@@ -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 )
......
......@@ -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
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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);
......
......@@ -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 )
{
......
......@@ -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)
{
......
......@@ -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 ) )
......
......@@ -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;
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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;
}
......
......@@ -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;
......
......@@ -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 );
......
......@@ -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) {
......
......@@ -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)
{
......
......@@ -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);
......
......@@ -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);
......
......@@ -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];
......
......@@ -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
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment