Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
609a1146
Commit
609a1146
authored
Aug 16, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide internal variables state
parent
c5f25910
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
114 additions
and
106 deletions
+114
-106
include/vlc_common.h
include/vlc_common.h
+0
-5
src/libvlc.h
src/libvlc.h
+5
-1
src/misc/objects.c
src/misc/objects.c
+11
-13
src/misc/variables.c
src/misc/variables.c
+98
-87
No files found.
include/vlc_common.h
View file @
609a1146
...
...
@@ -562,11 +562,6 @@ typedef struct vlc_object_internals_t vlc_object_internals_t;
volatile vlc_bool_t b_attached;
/**< set by the object */
\
vlc_bool_t b_force;
/**< set by the outside (eg. module_Need()) */
\
\
/* Object variables */
\
vlc_mutex_t var_lock; \
int i_vars; \
variable_t * p_vars; \
\
/* Stuff related to the libvlc structure */
\
libvlc_int_t *p_libvlc;
/**< (root of all evil) - 1 */
\
\
...
...
src/libvlc.h
View file @
609a1146
...
...
@@ -82,9 +82,13 @@ uint32_t CPUCapabilities( void );
/* Private LibVLC data for each objects */
struct
vlc_object_internals_t
{
/* Object variables */
vlc_mutex_t
var_lock
;
int
i_vars
;
variable_t
*
p_vars
;
};
static
inline
vlc_object_internals_t
*
vlc_internals
(
vlc_object_t
*
obj
)
{
return
obj
->
p_internals
;
...
...
src/misc/objects.c
View file @
609a1146
...
...
@@ -125,7 +125,6 @@ vlc_object_t *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
p_new
->
psz_header
=
NULL
;
p_new
->
i_flags
=
0
;
if
(
p_this
->
i_flags
&
OBJECT_FLAGS_NODBG
)
p_new
->
i_flags
|=
OBJECT_FLAGS_NODBG
;
if
(
p_this
->
i_flags
&
OBJECT_FLAGS_QUIET
)
...
...
@@ -133,10 +132,9 @@ vlc_object_t *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
if
(
p_this
->
i_flags
&
OBJECT_FLAGS_NOINTERACT
)
p_new
->
i_flags
|=
OBJECT_FLAGS_NOINTERACT
;
p_new
->
i_vars
=
0
;
p_new
->
p_vars
=
(
variable_t
*
)
malloc
(
16
*
sizeof
(
variable_t
)
);
p_priv
->
p_vars
=
calloc
(
sizeof
(
variable_t
),
16
);
if
(
!
p_
new
->
p_vars
)
if
(
!
p_
priv
->
p_vars
)
{
if
(
i_type
!=
VLC_OBJECT_GLOBAL
)
free
(
p_priv
);
...
...
@@ -186,7 +184,7 @@ vlc_object_t *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
/* Initialize mutexes and condvars */
vlc_mutex_init
(
p_new
,
&
p_new
->
object_lock
);
vlc_cond_init
(
p_new
,
&
p_new
->
object_wait
);
vlc_mutex_init
(
p_new
,
&
p_
new
->
var_lock
);
vlc_mutex_init
(
p_new
,
&
p_
priv
->
var_lock
);
if
(
i_type
==
VLC_OBJECT_GLOBAL
)
{
...
...
@@ -390,13 +388,13 @@ void __vlc_object_destroy( vlc_object_t *p_this )
/* Destroy the associated variables, starting from the end so that
* no memmove calls have to be done. */
while
(
p_
this
->
i_vars
)
while
(
p_
priv
->
i_vars
)
{
var_Destroy
(
p_this
,
p_
this
->
p_vars
[
p_this
->
i_vars
-
1
].
psz_name
);
var_Destroy
(
p_this
,
p_
priv
->
p_vars
[
p_priv
->
i_vars
-
1
].
psz_name
);
}
free
(
p_
this
->
p_vars
);
vlc_mutex_destroy
(
&
p_
this
->
var_lock
);
free
(
p_
priv
->
p_vars
);
vlc_mutex_destroy
(
&
p_
priv
->
var_lock
);
if
(
p_this
->
psz_header
)
free
(
p_this
->
psz_header
);
...
...
@@ -877,11 +875,11 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
PrintObject
(
p_object
,
""
);
if
(
!
p_object
->
i_vars
)
if
(
!
p_object
->
p_internals
->
i_vars
)
printf
(
" `-o No variables
\n
"
);
for
(
i
=
0
;
i
<
p_object
->
i_vars
;
i
++
)
for
(
i
=
0
;
i
<
p_object
->
p_internals
->
i_vars
;
i
++
)
{
variable_t
*
p_var
=
p_object
->
p_vars
+
i
;
variable_t
*
p_var
=
p_object
->
p_
internals
->
p_
vars
+
i
;
const
char
*
psz_type
=
"unknown"
;
switch
(
p_var
->
i_type
&
VLC_VAR_TYPE
)
...
...
@@ -907,7 +905,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
#undef MYCASE
}
printf
(
" %c-o
\"
%s
\"
(%s"
,
i
+
1
==
p_object
->
i_vars
?
'`'
:
'|'
,
i
+
1
==
p_object
->
p_internals
->
i_vars
?
'`'
:
'|'
,
p_var
->
psz_name
,
psz_type
);
if
(
p_var
->
psz_text
)
printf
(
", %s"
,
p_var
->
psz_text
);
...
...
src/misc/variables.c
View file @
609a1146
This diff is collapsed.
Click to expand it.
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