Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
073c5a24
Commit
073c5a24
authored
Aug 20, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide psz_object_name in private data
parent
b6c76ecf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
20 deletions
+25
-20
include/vlc_common.h
include/vlc_common.h
+0
-1
src/audio_output/input.c
src/audio_output/input.c
+4
-1
src/libvlc.c
src/libvlc.c
+2
-1
src/libvlc.h
src/libvlc.h
+2
-0
src/misc/filter_chain.c
src/misc/filter_chain.c
+2
-1
src/misc/objects.c
src/misc/objects.c
+12
-11
src/modules/modules.c
src/modules/modules.c
+3
-5
No files found.
include/vlc_common.h
View file @
073c5a24
...
...
@@ -500,7 +500,6 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
*/
\
/**@{*/
\
const char *psz_object_type; \
char *psz_object_name; \
\
/* Messages header */
\
char *psz_header; \
...
...
src/audio_output/input.c
View file @
073c5a24
...
...
@@ -451,7 +451,10 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
for
(
int
i
=
0
;
i
<
p_input
->
i_nb_filters
;
i
++
)
{
aout_filter_t
*
p_filter
=
p_input
->
pp_filters
[
i
];
if
(
strcmp
(
"scaletempo"
,
p_filter
->
psz_object_name
)
==
0
)
/* FIXME: suspicious access to psz_object_name */
#warning Is this right?
if
(
strcmp
(
"scaletempo"
,
vlc_internals
(
p_filter
)
->
psz_object_name
)
==
0
)
{
p_input
->
p_playback_rate_filter
=
p_filter
;
break
;
...
...
src/libvlc.c
View file @
073c5a24
...
...
@@ -263,7 +263,8 @@ libvlc_int_t * libvlc_InternalCreate( void )
priv
->
p_playlist
=
NULL
;
priv
->
p_dialog_provider
=
NULL
;
priv
->
p_vlm
=
NULL
;
p_libvlc
->
psz_object_name
=
strdup
(
"libvlc"
);
/* Avoid being called "memcpy":*/
vlc_internals
(
p_libvlc
)
->
psz_object_name
=
strdup
(
"libvlc"
);
/* Initialize message queue */
msg_Create
(
p_libvlc
);
...
...
src/libvlc.h
View file @
073c5a24
...
...
@@ -160,6 +160,8 @@ module_t *module_find_by_shortcut (const char *psz_shortcut);
typedef
struct
vlc_object_internals_t
{
int
i_object_type
;
/* Object type, deprecated */
char
*
psz_object_name
;
/* module name */
/* ^^ can only used from the thread that called module_(un)need() */
/* Object variables */
variable_t
*
p_vars
;
...
...
src/misc/filter_chain.c
View file @
073c5a24
...
...
@@ -347,7 +347,8 @@ static filter_t *filter_chain_AppendFilterInternal( filter_chain_t *p_chain,
vlc_array_append
(
&
p_chain
->
mouses
,
p_mouse
);
msg_Dbg
(
p_chain
->
p_this
,
"Filter '%s' (%p) appended to chain"
,
psz_name
?
psz_name
:
p_filter
->
psz_object_name
,
p_filter
);
psz_name
?
psz_name
:
vlc_internals
(
p_filter
)
->
psz_object_name
,
p_filter
);
return
p_filter
;
...
...
src/misc/objects.c
View file @
073c5a24
...
...
@@ -122,7 +122,7 @@ void *__vlc_custom_create( vlc_object_t *p_this, size_t i_size,
p_priv
->
i_object_type
=
i_type
;
p_new
->
psz_object_type
=
psz_type
;
p_
new
->
psz_object_name
=
NULL
;
p_
priv
->
psz_object_name
=
NULL
;
p_new
->
b_die
=
false
;
p_new
->
b_error
=
false
;
...
...
@@ -283,7 +283,7 @@ static void vlc_object_destroy( vlc_object_t *p_this )
free
(
p_this
->
psz_header
);
FREENULL
(
p_this
->
psz_object_name
);
free
(
p_priv
->
psz_object_name
);
vlc_spin_destroy
(
&
p_priv
->
ref_spin
);
if
(
p_priv
->
pipes
[
1
]
!=
-
1
&&
p_priv
->
pipes
[
1
]
!=
p_priv
->
pipes
[
0
]
)
...
...
@@ -482,8 +482,8 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this,
msg_Warn
(
p_this
,
"%s(%s) is not safe!"
,
__func__
,
psz_name
);
/* If have the requested name ourselves, don't look further */
if
(
!
(
i_mode
&
FIND_STRICT
)
&&
p_this
->
psz_object_name
&&
!
strcmp
(
p_this
->
psz_object_name
,
psz_name
)
)
&&
vlc_internals
(
p_this
)
->
psz_object_name
&&
!
strcmp
(
vlc_internals
(
p_this
)
->
psz_object_name
,
psz_name
)
)
{
vlc_object_hold
(
p_this
);
return
p_this
;
...
...
@@ -583,7 +583,7 @@ void __vlc_object_release( vlc_object_t *p_this )
fprintf
(
stderr
,
"ERROR: leaking object (%p, type:%s, name:%s)
\n
"
,
leaked
,
leaked
->
psz_object_type
,
leaked
->
psz_object_name
);
vlc_internals
(
leaked
)
->
psz_object_name
);
/* Dump object to ease debugging */
vlc_object_dump
(
leaked
);
fflush
(
stderr
);
...
...
@@ -1016,8 +1016,8 @@ static vlc_object_t * FindObjectName( vlc_object_t *p_this,
p_tmp
=
p_this
->
p_parent
;
if
(
p_tmp
)
{
if
(
p_tmp
->
psz_object_name
&&
!
strcmp
(
p_tmp
->
psz_object_name
,
psz_name
)
)
if
(
vlc_internals
(
p_tmp
)
->
psz_object_name
&&
!
strcmp
(
vlc_internals
(
p_tmp
)
->
psz_object_name
,
psz_name
)
)
{
vlc_object_hold
(
p_tmp
);
return
p_tmp
;
...
...
@@ -1033,8 +1033,8 @@ static vlc_object_t * FindObjectName( vlc_object_t *p_this,
for
(
i
=
vlc_internals
(
p_this
)
->
i_children
;
i
--
;
)
{
p_tmp
=
vlc_internals
(
p_this
)
->
pp_children
[
i
];
if
(
p_tmp
->
psz_object_name
&&
!
strcmp
(
p_tmp
->
psz_object_name
,
psz_name
)
)
if
(
vlc_internals
(
p_tmp
)
->
psz_object_name
&&
!
strcmp
(
vlc_internals
(
p_tmp
)
->
psz_object_name
,
psz_name
)
)
{
vlc_object_hold
(
p_tmp
);
return
p_tmp
;
...
...
@@ -1066,9 +1066,10 @@ static void PrintObject( vlc_object_t *p_this, const char *psz_prefix )
int
canc
=
vlc_savecancel
();
memset
(
&
psz_name
,
0
,
sizeof
(
psz_name
)
);
if
(
p_this
->
psz_object_name
)
if
(
vlc_internals
(
p_this
)
->
psz_object_name
)
{
snprintf
(
psz_name
,
49
,
"
\"
%s
\"
"
,
p_this
->
psz_object_name
);
snprintf
(
psz_name
,
49
,
"
\"
%s
\"
"
,
vlc_internals
(
p_this
)
->
psz_object_name
);
if
(
psz_name
[
48
]
)
psz_name
[
48
]
=
'\"'
;
}
...
...
src/modules/modules.c
View file @
073c5a24
...
...
@@ -607,15 +607,13 @@ found_shortcut:
{
msg_Dbg
(
p_this
,
"using %s module
\"
%s
\"
"
,
psz_capability
,
p_module
->
psz_object_name
);
if
(
!
p_this
->
psz_object_name
)
if
(
!
vlc_internals
(
p_this
)
->
psz_object_name
)
{
/* This assumes that p_this is the object which will be using the
* module. That's not always the case ... but it is in most cases.
*/
if
(
psz_alias
)
p_this
->
psz_object_name
=
strdup
(
psz_alias
);
else
p_this
->
psz_object_name
=
strdup
(
p_module
->
psz_object_name
);
vlc_internals
(
p_this
)
->
psz_object_name
=
strdup
(
psz_alias
?
psz_alias
:
p_module
->
psz_object_name
);
}
}
else
if
(
count
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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