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
b8c35c76
Commit
b8c35c76
authored
Nov 01, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: remove the picture lock (fixes #11669)
This is no longer necessary as picture pools are locked internally.
parent
5c9821d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
16 deletions
+0
-16
src/video_output/video_output.c
src/video_output/video_output.c
+0
-15
src/video_output/vout_internal.h
src/video_output/vout_internal.h
+0
-1
No files found.
src/video_output/video_output.c
View file @
b8c35c76
...
@@ -140,7 +140,6 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
...
@@ -140,7 +140,6 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
vout_snapshot_Init
(
&
vout
->
p
->
snapshot
);
vout_snapshot_Init
(
&
vout
->
p
->
snapshot
);
/* Initialize locks */
/* Initialize locks */
vlc_mutex_init
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_init
(
&
vout
->
p
->
filter
.
lock
);
vlc_mutex_init
(
&
vout
->
p
->
filter
.
lock
);
vlc_mutex_init
(
&
vout
->
p
->
spu_lock
);
vlc_mutex_init
(
&
vout
->
p
->
spu_lock
);
...
@@ -286,7 +285,6 @@ static void VoutDestructor(vlc_object_t *object)
...
@@ -286,7 +285,6 @@ static void VoutDestructor(vlc_object_t *object)
/* Destroy the locks */
/* Destroy the locks */
vlc_mutex_destroy
(
&
vout
->
p
->
spu_lock
);
vlc_mutex_destroy
(
&
vout
->
p
->
spu_lock
);
vlc_mutex_destroy
(
&
vout
->
p
->
picture_lock
);
vlc_mutex_destroy
(
&
vout
->
p
->
filter
.
lock
);
vlc_mutex_destroy
(
&
vout
->
p
->
filter
.
lock
);
vout_control_Clean
(
&
vout
->
p
->
control
);
vout_control_Clean
(
&
vout
->
p
->
control
);
...
@@ -346,7 +344,6 @@ void vout_FixLeaks( vout_thread_t *vout )
...
@@ -346,7 +344,6 @@ void vout_FixLeaks( vout_thread_t *vout )
}
}
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture
=
picture_pool_Get
(
vout
->
p
->
decoder_pool
);
picture
=
picture_pool_Get
(
vout
->
p
->
decoder_pool
);
if
(
picture
!=
NULL
)
if
(
picture
!=
NULL
)
...
@@ -357,7 +354,6 @@ void vout_FixLeaks( vout_thread_t *vout )
...
@@ -357,7 +354,6 @@ void vout_FixLeaks( vout_thread_t *vout )
msg_Err
(
vout
,
"pictures leaked, trying to workaround"
);
msg_Err
(
vout
,
"pictures leaked, trying to workaround"
);
picture_pool_NonEmpty
(
vout
->
p
->
decoder_pool
);
picture_pool_NonEmpty
(
vout
->
p
->
decoder_pool
);
}
}
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
}
}
void
vout_NextPicture
(
vout_thread_t
*
vout
,
mtime_t
*
duration
)
void
vout_NextPicture
(
vout_thread_t
*
vout
,
mtime_t
*
duration
)
...
@@ -412,14 +408,11 @@ void vout_FlushSubpictureChannel( vout_thread_t *vout, int channel )
...
@@ -412,14 +408,11 @@ void vout_FlushSubpictureChannel( vout_thread_t *vout, int channel )
*/
*/
picture_t
*
vout_GetPicture
(
vout_thread_t
*
vout
)
picture_t
*
vout_GetPicture
(
vout_thread_t
*
vout
)
{
{
/* Get lock */
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture_t
*
picture
=
picture_pool_Get
(
vout
->
p
->
decoder_pool
);
picture_t
*
picture
=
picture_pool_Get
(
vout
->
p
->
decoder_pool
);
if
(
picture
)
{
if
(
picture
)
{
picture_Reset
(
picture
);
picture_Reset
(
picture
);
VideoFormatCopyCropAr
(
&
picture
->
format
,
&
vout
->
p
->
original
);
VideoFormatCopyCropAr
(
&
picture
->
format
,
&
vout
->
p
->
original
);
}
}
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
return
picture
;
return
picture
;
}
}
...
@@ -445,11 +438,7 @@ void vout_PutPicture(vout_thread_t *vout, picture_t *picture)
...
@@ -445,11 +438,7 @@ void vout_PutPicture(vout_thread_t *vout, picture_t *picture)
*/
*/
void
vout_ReleasePicture
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
void
vout_ReleasePicture
(
vout_thread_t
*
vout
,
picture_t
*
picture
)
{
{
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
picture_Release
(
picture
);
picture_Release
(
picture
);
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
}
}
/* */
/* */
...
@@ -1578,16 +1567,12 @@ static void *Thread(void *object)
...
@@ -1578,16 +1567,12 @@ static void *Thread(void *object)
if
(
ThreadControl
(
vout
,
cmd
))
if
(
ThreadControl
(
vout
,
cmd
))
return
NULL
;
return
NULL
;
vlc_mutex_lock
(
&
sys
->
picture_lock
);
deadline
=
VLC_TS_INVALID
;
deadline
=
VLC_TS_INVALID
;
while
(
!
ThreadDisplayPicture
(
vout
,
&
deadline
))
while
(
!
ThreadDisplayPicture
(
vout
,
&
deadline
))
;
;
const
bool
picture_interlaced
=
sys
->
displayed
.
is_interlaced
;
const
bool
picture_interlaced
=
sys
->
displayed
.
is_interlaced
;
vlc_mutex_unlock
(
&
sys
->
picture_lock
);
vout_SetInterlacingState
(
vout
,
&
interlacing
,
picture_interlaced
);
vout_SetInterlacingState
(
vout
,
&
interlacing
,
picture_interlaced
);
vout_ManageWrapper
(
vout
);
vout_ManageWrapper
(
vout
);
}
}
...
...
src/video_output/vout_internal.h
View file @
b8c35c76
...
@@ -126,7 +126,6 @@ struct vout_thread_sys_t
...
@@ -126,7 +126,6 @@ struct vout_thread_sys_t
vlc_mouse_t
mouse
;
vlc_mouse_t
mouse
;
/* */
/* */
vlc_mutex_t
picture_lock
;
/**< picture heap lock */
picture_pool_t
*
private_pool
;
picture_pool_t
*
private_pool
;
picture_pool_t
*
display_pool
;
picture_pool_t
*
display_pool
;
picture_pool_t
*
decoder_pool
;
picture_pool_t
*
decoder_pool
;
...
...
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