Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
c79a340d
Commit
c79a340d
authored
May 14, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of b_attached
parent
30066f7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
47 deletions
+1
-47
src/libvlc.h
src/libvlc.h
+0
-1
src/misc/objects.c
src/misc/objects.c
+1
-46
No files found.
src/libvlc.h
View file @
c79a340d
...
@@ -181,7 +181,6 @@ struct vlc_object_internals_t
...
@@ -181,7 +181,6 @@ struct vlc_object_internals_t
vlc_spinlock_t
ref_spin
;
vlc_spinlock_t
ref_spin
;
unsigned
i_refcount
;
unsigned
i_refcount
;
vlc_destructor_t
pf_destructor
;
vlc_destructor_t
pf_destructor
;
bool
b_attached
;
};
};
#define ZOOM_SECTION N_("Zoom")
#define ZOOM_SECTION N_("Zoom")
...
...
src/misc/objects.c
View file @
c79a340d
...
@@ -119,7 +119,6 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
...
@@ -119,7 +119,6 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
p_new
->
b_die
=
false
;
p_new
->
b_die
=
false
;
p_new
->
b_error
=
false
;
p_new
->
b_error
=
false
;
p_new
->
b_dead
=
false
;
p_new
->
b_dead
=
false
;
p_priv
->
b_attached
=
false
;
p_new
->
b_force
=
false
;
p_new
->
b_force
=
false
;
p_new
->
psz_header
=
NULL
;
p_new
->
psz_header
=
NULL
;
...
@@ -146,21 +145,15 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
...
@@ -146,21 +145,15 @@ void *vlc_custom_create( vlc_object_t *p_this, size_t i_size,
p_libvlc_global
->
i_counter
=
0
;
p_libvlc_global
->
i_counter
=
0
;
p_libvlc_global
->
i_objects
=
0
;
p_libvlc_global
->
i_objects
=
0
;
p_libvlc_global
->
pp_objects
=
NULL
;
p_libvlc_global
->
pp_objects
=
NULL
;
p_priv
->
b_attached
=
true
;
vlc_mutex_init
(
&
structure_lock
);
vlc_mutex_init
(
&
structure_lock
);
}
}
else
else
{
{
p_libvlc_global
=
vlc_global
();
p_libvlc_global
=
vlc_global
();
if
(
i_type
==
VLC_OBJECT_LIBVLC
)
if
(
i_type
==
VLC_OBJECT_LIBVLC
)
{
p_new
->
p_libvlc
=
(
libvlc_int_t
*
)
p_new
;
p_new
->
p_libvlc
=
(
libvlc_int_t
*
)
p_new
;
p_priv
->
b_attached
=
true
;
}
else
else
{
p_new
->
p_libvlc
=
p_this
->
p_libvlc
;
p_new
->
p_libvlc
=
p_this
->
p_libvlc
;
}
}
}
vlc_spin_init
(
&
p_priv
->
ref_spin
);
vlc_spin_init
(
&
p_priv
->
ref_spin
);
...
@@ -914,12 +907,6 @@ void __vlc_object_attach( vlc_object_t *p_this, vlc_object_t *p_parent )
...
@@ -914,12 +907,6 @@ void __vlc_object_attach( vlc_object_t *p_this, vlc_object_t *p_parent )
INSERT_ELEM
(
p_parent
->
pp_children
,
p_parent
->
i_children
,
INSERT_ELEM
(
p_parent
->
pp_children
,
p_parent
->
i_children
,
p_parent
->
i_children
,
p_this
);
p_parent
->
i_children
,
p_this
);
/* Climb up the tree to see whether we are connected with the root */
if
(
vlc_internals
(
p_parent
)
->
b_attached
)
{
SetAttachment
(
p_this
,
true
);
}
vlc_mutex_unlock
(
&
structure_lock
);
vlc_mutex_unlock
(
&
structure_lock
);
}
}
...
@@ -928,10 +915,6 @@ static void vlc_object_detach_unlocked (vlc_object_t *p_this)
...
@@ -928,10 +915,6 @@ static void vlc_object_detach_unlocked (vlc_object_t *p_this)
{
{
assert
(
p_this
->
p_parent
);
assert
(
p_this
->
p_parent
);
/* Climb up the tree to see whether we are connected with the root */
if
(
vlc_internals
(
p_this
->
p_parent
)
->
b_attached
)
SetAttachment
(
p_this
,
false
);
DetachObject
(
p_this
);
DetachObject
(
p_this
);
}
}
...
@@ -1046,18 +1029,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -1046,18 +1029,7 @@ static int DumpCommand( vlc_object_t *p_this, char const *psz_cmd,
pp_end
=
pp_current
+
p_libvlc_global
->
i_objects
;
pp_end
=
pp_current
+
p_libvlc_global
->
i_objects
;
for
(
;
pp_current
<
pp_end
;
pp_current
++
)
for
(
;
pp_current
<
pp_end
;
pp_current
++
)
{
PrintObject
(
*
pp_current
,
""
);
if
(
vlc_internals
(
*
pp_current
)
->
b_attached
)
{
PrintObject
(
*
pp_current
,
""
);
}
else
{
printf
(
" o %.8i %s (not attached)
\n
"
,
(
*
pp_current
)
->
i_object_id
,
(
*
pp_current
)
->
psz_object_type
);
}
}
vlc_mutex_unlock
(
&
structure_lock
);
vlc_mutex_unlock
(
&
structure_lock
);
}
}
...
@@ -1412,23 +1384,6 @@ static void DetachObject( vlc_object_t *p_this )
...
@@ -1412,23 +1384,6 @@ static void DetachObject( vlc_object_t *p_this )
}
}
}
}
/*****************************************************************************
* SetAttachment: recursively set the b_attached flag of a subtree.
*****************************************************************************
* This function is used by the attach and detach functions to propagate
* the b_attached flag in a subtree.
*****************************************************************************/
static
void
SetAttachment
(
vlc_object_t
*
p_this
,
bool
b_attached
)
{
int
i_index
;
for
(
i_index
=
p_this
->
i_children
;
i_index
--
;
)
{
SetAttachment
(
p_this
->
pp_children
[
i_index
],
b_attached
);
}
vlc_internals
(
p_this
)
->
b_attached
=
b_attached
;
}
static
void
PrintObject
(
vlc_object_t
*
p_this
,
const
char
*
psz_prefix
)
static
void
PrintObject
(
vlc_object_t
*
p_this
,
const
char
*
psz_prefix
)
{
{
...
...
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