Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
55b27720
Commit
55b27720
authored
Aug 19, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout thread: inline ThreadManage
parent
ec788f2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
25 deletions
+16
-25
src/video_output/video_output.c
src/video_output/video_output.c
+16
-25
No files found.
src/video_output/video_output.c
View file @
55b27720
...
...
@@ -1131,27 +1131,6 @@ static int ThreadDisplayPicture(vout_thread_t *vout, mtime_t *deadline)
return
ThreadDisplayRenderPicture
(
vout
,
is_forced
);
}
static
void
ThreadManage
(
vout_thread_t
*
vout
,
mtime_t
*
deadline
,
vout_interlacing_support_t
*
interlacing
)
{
vlc_mutex_lock
(
&
vout
->
p
->
picture_lock
);
*
deadline
=
VLC_TS_INVALID
;
for
(;;)
if
(
ThreadDisplayPicture
(
vout
,
deadline
))
break
;
const
bool
picture_interlaced
=
vout
->
p
->
displayed
.
is_interlaced
;
vlc_mutex_unlock
(
&
vout
->
p
->
picture_lock
);
/* Deinterlacing */
vout_SetInterlacingState
(
vout
,
interlacing
,
picture_interlaced
);
vout_ManageWrapper
(
vout
);
}
static
void
ThreadDisplaySubpicture
(
vout_thread_t
*
vout
,
subpicture_t
*
subpicture
)
{
...
...
@@ -1472,10 +1451,10 @@ static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
case
VOUT_CONTROL_CLEAN
:
ThreadStop
(
vout
,
NULL
);
ThreadClean
(
vout
);
return
-
1
;
return
1
;
case
VOUT_CONTROL_REINIT
:
if
(
ThreadReinit
(
vout
,
cmd
.
u
.
cfg
))
return
-
1
;
return
1
;
break
;
case
VOUT_CONTROL_SUBPICTURE
:
ThreadDisplaySubpicture
(
vout
,
cmd
.
u
.
subpicture
);
...
...
@@ -1556,6 +1535,7 @@ static int ThreadControl(vout_thread_t *vout, vout_control_cmd_t cmd)
static
void
*
Thread
(
void
*
object
)
{
vout_thread_t
*
vout
=
object
;
vout_thread_sys_t
*
sys
=
vout
->
p
;
vout_interlacing_support_t
interlacing
=
{
.
is_interlaced
=
false
,
...
...
@@ -1566,10 +1546,21 @@ static void *Thread(void *object)
for
(;;)
{
vout_control_cmd_t
cmd
;
/* FIXME remove thoses ugly timeouts */
while
(
!
vout_control_Pop
(
&
vout
->
p
->
control
,
&
cmd
,
deadline
,
100000
))
while
(
!
vout_control_Pop
(
&
sys
->
control
,
&
cmd
,
deadline
,
100000
))
if
(
ThreadControl
(
vout
,
cmd
))
return
NULL
;
ThreadManage
(
vout
,
&
deadline
,
&
interlacing
);
vlc_mutex_lock
(
&
sys
->
picture_lock
);
deadline
=
VLC_TS_INVALID
;
while
(
!
ThreadDisplayPicture
(
vout
,
&
deadline
))
;
const
bool
picture_interlaced
=
sys
->
displayed
.
is_interlaced
;
vlc_mutex_unlock
(
&
sys
->
picture_lock
);
vout_SetInterlacingState
(
vout
,
&
interlacing
,
picture_interlaced
);
vout_ManageWrapper
(
vout
);
}
}
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