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
fee7f059
Commit
fee7f059
authored
Jun 18, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed lock_vout in lock_hold in resource (No functionnal changes).
parent
17a09405
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
src/input/resource.c
src/input/resource.c
+18
-14
No files found.
src/input/resource.c
View file @
fee7f059
...
...
@@ -55,8 +55,12 @@ struct input_resource_t
/* This lock is used to protect vout resources access (for hold)
* It is a special case because of embed video (possible deadlock
* between vout window request and vout holds in some(qt4) interface) */
vlc_mutex_t
lock_vout
;
* between vout window request and vout holds in some(qt4) interface)
*/
vlc_mutex_t
lock_hold
;
/* You need lock+lock_hold to write to the following variables and
* only lock or lock_hold to read them */
int
i_vout
;
vout_thread_t
**
pp_vout
;
};
...
...
@@ -225,9 +229,9 @@ static vout_thread_t *RequestVout( input_resource_t *p_resource,
{
assert
(
p_vout
!=
p_resource
->
p_vout_free
);
vlc_mutex_lock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_lock
(
&
p_resource
->
lock_
hold
);
TAB_REMOVE
(
p_resource
->
i_vout
,
p_resource
->
pp_vout
,
p_vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
hold
);
}
/* */
...
...
@@ -237,9 +241,9 @@ static vout_thread_t *RequestVout( input_resource_t *p_resource,
DisplayVoutTitle
(
p_resource
,
p_vout
);
vlc_mutex_lock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_lock
(
&
p_resource
->
lock_
hold
);
TAB_APPEND
(
p_resource
->
i_vout
,
p_resource
->
pp_vout
,
p_vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
hold
);
return
p_vout
;
}
...
...
@@ -247,10 +251,10 @@ static vout_thread_t *RequestVout( input_resource_t *p_resource,
{
assert
(
p_vout
);
vlc_mutex_lock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_lock
(
&
p_resource
->
lock_
hold
);
TAB_REMOVE
(
p_resource
->
i_vout
,
p_resource
->
pp_vout
,
p_vout
);
const
int
i_vout_active
=
p_resource
->
i_vout
;
vlc_mutex_unlock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
hold
);
if
(
p_resource
->
p_vout_free
||
i_vout_active
>
0
||
!
b_recycle
)
{
...
...
@@ -275,13 +279,13 @@ static vout_thread_t *HoldVout( input_resource_t *p_resource )
return
NULL
;
/* TODO FIXME: p_resource->pp_vout order is NOT stable */
vlc_mutex_lock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_lock
(
&
p_resource
->
lock_
hold
);
vout_thread_t
*
p_vout
=
p_resource
->
pp_vout
[
0
];
vlc_object_hold
(
p_vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
hold
);
return
p_vout
;
}
...
...
@@ -292,7 +296,7 @@ static void HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout,
*
pi_vout
=
0
;
*
ppp_vout
=
NULL
;
vlc_mutex_lock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_lock
(
&
p_resource
->
lock_
hold
);
if
(
p_resource
->
i_vout
<=
0
)
goto
exit
;
...
...
@@ -311,7 +315,7 @@ static void HoldVouts( input_resource_t *p_resource, vout_thread_t ***ppp_vout,
}
exit:
vlc_mutex_unlock
(
&
p_resource
->
lock_
vout
);
vlc_mutex_unlock
(
&
p_resource
->
lock_
hold
);
}
/* */
...
...
@@ -380,7 +384,7 @@ input_resource_t *input_resource_New( void )
return
NULL
;
vlc_mutex_init
(
&
p_resource
->
lock
);
vlc_mutex_init
(
&
p_resource
->
lock_
vout
);
vlc_mutex_init
(
&
p_resource
->
lock_
hold
);
return
p_resource
;
}
...
...
@@ -390,7 +394,7 @@ void input_resource_Delete( input_resource_t *p_resource )
DestroyVout
(
p_resource
);
DestroyAout
(
p_resource
);
vlc_mutex_destroy
(
&
p_resource
->
lock_
vout
);
vlc_mutex_destroy
(
&
p_resource
->
lock_
hold
);
vlc_mutex_destroy
(
&
p_resource
->
lock
);
free
(
p_resource
);
}
...
...
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