Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
36c4a22f
Commit
36c4a22f
authored
May 25, 2011
by
Rémi Denis-Courmont
Browse files
Remove vlc_object_attach()
parent
d857d877
Changes
54
Hide whitespace changes
Inline
Side-by-side
include/vlc_objects.h
View file @
36c4a22f
...
...
@@ -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)
...
...
modules/access/rtmp/access.c
View file @
36c4a22f
...
...
@@ -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
);
...
...
modules/access_output/rtmp.c
View file @
36c4a22f
...
...
@@ -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
);
...
...
modules/gui/fbosd.c
View file @
36c4a22f
...
...
@@ -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
=
...
...
modules/gui/qt4/extensions_manager.cpp
View file @
36c4a22f
...
...
@@ -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
);
...
...
modules/gui/skins2/src/dialogs.cpp
View file @
36c4a22f
...
...
@@ -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
)
{
...
...
modules/stream_out/mosaic_bridge.c
View file @
36c4a22f
...
...
@@ -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
;
...
...
modules/stream_out/rtp.c
View file @
36c4a22f
...
...
@@ -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
;
}
modules/stream_out/transcode/transcode.c
View file @
36c4a22f
...
...
@@ -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 */
...
...
modules/video_filter/blendbench.c
View file @
36c4a22f
...
...
@@ -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
);
...
...
modules/video_filter/opencv_wrapper.c
View file @
36c4a22f
...
...
@@ -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
=
...
...
modules/visualization/projectm.cpp
View file @
36c4a22f
...
...
@@ -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
,
...
...
projects/macosx/framework/Sources/VLCExtensionsManager.m
View file @
36c4a22f
...
...
@@ -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"
);
...
...
src/audio_output/common.c
View file @
36c4a22f
...
...
@@ -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
;
}
...
...
src/audio_output/filters.c
View file @
36c4a22f
...
...
@@ -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
)
);
...
...
src/audio_output/input.c
View file @
36c4a22f
...
...
@@ -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
;
...
...
src/audio_output/mixer.c
View file @
36c4a22f
...
...
@@ -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
)
{
...
...
src/control/media_player.c
View file @
36c4a22f
...
...
@@ -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
);
...
...
src/input/access.c
View file @
36c4a22f
...
...
@@ -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
;
...
...
src/input/decoder.c
View file @
36c4a22f
...
...
@@ -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
);
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment