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
52d94333
Commit
52d94333
authored
May 14, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hmm, there was a simpler solution
(Code re-use rules)
parent
38f820eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
26 deletions
+7
-26
src/misc/objects.c
src/misc/objects.c
+7
-26
No files found.
src/misc/objects.c
View file @
52d94333
...
@@ -73,11 +73,10 @@ static vlc_object_t * FindObjectName( vlc_object_t *, const char *, int );
...
@@ -73,11 +73,10 @@ static vlc_object_t * FindObjectName( vlc_object_t *, const char *, int );
static
void
PrintObject
(
vlc_object_t
*
,
const
char
*
);
static
void
PrintObject
(
vlc_object_t
*
,
const
char
*
);
static
void
DumpStructure
(
vlc_object_t
*
,
int
,
char
*
);
static
void
DumpStructure
(
vlc_object_t
*
,
int
,
char
*
);
static
int
FindIndex
(
vlc_object_t
*
,
vlc_object_t
**
,
int
);
static
int
FindIndex
(
vlc_object_t
*
,
vlc_object_t
**
,
int
);
static
void
SetAttachment
(
vlc_object_t
*
,
bool
);
static
vlc_list_t
*
NewList
(
int
);
static
vlc_list_t
*
NewList
(
int
);
static
void
ListReplace
(
vlc_list_t
*
,
vlc_object_t
*
,
int
);
static
void
ListReplace
(
vlc_list_t
*
,
vlc_object_t
*
,
int
);
static
void
ListAppend
(
vlc_list_t
*
,
vlc_object_t
*
);
/*static void ListAppend ( vlc_list_t *, vlc_object_t * );*/
static
int
CountChildren
(
vlc_object_t
*
,
int
);
static
int
CountChildren
(
vlc_object_t
*
,
int
);
static
void
ListChildren
(
vlc_list_t
*
,
vlc_object_t
*
,
int
);
static
void
ListChildren
(
vlc_list_t
*
,
vlc_object_t
*
,
int
);
...
@@ -971,18 +970,6 @@ void __vlc_object_detach( vlc_object_t *p_this )
...
@@ -971,18 +970,6 @@ void __vlc_object_detach( vlc_object_t *p_this )
}
}
static
void
vlc_tree_find
(
vlc_object_t
*
node
,
int
type
,
vlc_list_t
*
list
)
{
assert
(
node
);
vlc_assert_locked
(
&
structure_lock
);
if
(
node
->
i_object_type
==
type
)
ListAppend
(
list
,
node
);
for
(
int
i
=
0
;
i
<
node
->
i_children
;
i
++
)
vlc_tree_find
(
node
->
pp_children
[
i
],
type
,
list
);
}
/**
/**
****************************************************************************
****************************************************************************
* find a list typed objects and increment their refcount
* find a list typed objects and increment their refcount
...
@@ -993,21 +980,16 @@ static void vlc_tree_find (vlc_object_t *node, int type, vlc_list_t *list)
...
@@ -993,21 +980,16 @@ static void vlc_tree_find (vlc_object_t *node, int type, vlc_list_t *list)
vlc_list_t
*
__vlc_list_find
(
vlc_object_t
*
p_this
,
int
i_type
,
int
i_mode
)
vlc_list_t
*
__vlc_list_find
(
vlc_object_t
*
p_this
,
int
i_type
,
int
i_mode
)
{
{
vlc_list_t
*
p_list
;
vlc_list_t
*
p_list
;
int
i_count
=
0
,
i_index
=
0
;
int
i_count
=
0
;
libvlc_global_data_t
*
p_libvlc_global
=
vlc_global
();
vlc_mutex_lock
(
&
structure_lock
);
/* Look for the objects */
/* Look for the objects */
switch
(
i_mode
&
0x000f
)
switch
(
i_mode
&
0x000f
)
{
{
case
FIND_ANYWHERE
:
case
FIND_ANYWHERE
:
p_list
=
NewList
(
0
);
return
vlc_list_find
(
vlc_global
(),
i_type
,
FIND_CHILD
);
if
(
p_list
!=
NULL
)
vlc_tree_find
(
VLC_OBJECT
(
p_libvlc_global
),
i_type
,
p_list
);
break
;
case
FIND_CHILD
:
case
FIND_CHILD
:
vlc_mutex_lock
(
&
structure_lock
);
i_count
=
CountChildren
(
p_this
,
i_type
);
i_count
=
CountChildren
(
p_this
,
i_type
);
p_list
=
NewList
(
i_count
);
p_list
=
NewList
(
i_count
);
...
@@ -1021,6 +1003,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
...
@@ -1021,6 +1003,7 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
p_list
->
i_count
=
0
;
p_list
->
i_count
=
0
;
ListChildren
(
p_list
,
p_this
,
i_type
);
ListChildren
(
p_list
,
p_this
,
i_type
);
vlc_mutex_unlock
(
&
structure_lock
);
break
;
break
;
default:
default:
...
@@ -1029,8 +1012,6 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
...
@@ -1029,8 +1012,6 @@ vlc_list_t * __vlc_list_find( vlc_object_t *p_this, int i_type, int i_mode )
break
;
break
;
}
}
vlc_mutex_unlock
(
&
structure_lock
);
return
p_list
;
return
p_list
;
}
}
...
@@ -1511,7 +1492,7 @@ static void ListReplace( vlc_list_t *p_list, vlc_object_t *p_object,
...
@@ -1511,7 +1492,7 @@ static void ListReplace( vlc_list_t *p_list, vlc_object_t *p_object,
return
;
return
;
}
}
static
void
ListAppend
(
vlc_list_t
*
p_list
,
vlc_object_t
*
p_object
)
/*
static void ListAppend( vlc_list_t *p_list, vlc_object_t *p_object )
{
{
if( p_list == NULL )
if( p_list == NULL )
{
{
...
@@ -1532,7 +1513,7 @@ static void ListAppend( vlc_list_t *p_list, vlc_object_t *p_object )
...
@@ -1532,7 +1513,7 @@ static void ListAppend( vlc_list_t *p_list, vlc_object_t *p_object )
p_list->i_count++;
p_list->i_count++;
return;
return;
}
}
*/
static
int
CountChildren
(
vlc_object_t
*
p_this
,
int
i_type
)
static
int
CountChildren
(
vlc_object_t
*
p_this
,
int
i_type
)
{
{
...
...
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