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
ec788f2d
Commit
ec788f2d
authored
Aug 19, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout thread: split out command processing function
parent
cb21f5e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
87 additions
and
88 deletions
+87
-88
src/video_output/video_output.c
src/video_output/video_output.c
+87
-88
No files found.
src/video_output/video_output.c
View file @
ec788f2d
...
@@ -1462,45 +1462,20 @@ static int ThreadReinit(vout_thread_t *vout,
...
@@ -1462,45 +1462,20 @@ static int ThreadReinit(vout_thread_t *vout,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
/*****************************************************************************
static
int
ThreadControl
(
vout_thread_t
*
vout
,
vout_control_cmd_t
cmd
)
* Thread: video output thread
*****************************************************************************
* Video output thread. This function does only returns when the thread is
* terminated. It handles the pictures arriving in the video heap and the
* display device events.
*****************************************************************************/
static
void
*
Thread
(
void
*
object
)
{
{
vout_thread_t
*
vout
=
object
;
vout_interlacing_support_t
interlacing
=
{
.
is_interlaced
=
false
,
.
date
=
mdate
(),
};
mtime_t
deadline
=
VLC_TS_INVALID
;
for
(;;)
{
vout_control_cmd_t
cmd
;
/* FIXME remove thoses ugly timeouts
*/
while
(
!
vout_control_Pop
(
&
vout
->
p
->
control
,
&
cmd
,
deadline
,
100000
))
{
switch
(
cmd
.
type
)
{
switch
(
cmd
.
type
)
{
case
VOUT_CONTROL_INIT
:
case
VOUT_CONTROL_INIT
:
ThreadInit
(
vout
);
ThreadInit
(
vout
);
if
(
ThreadStart
(
vout
,
NULL
))
{
if
(
!
ThreadStart
(
vout
,
NULL
))
ThreadStop
(
vout
,
NULL
);
ThreadClean
(
vout
);
return
NULL
;
}
break
;
break
;
case
VOUT_CONTROL_CLEAN
:
case
VOUT_CONTROL_CLEAN
:
ThreadStop
(
vout
,
NULL
);
ThreadStop
(
vout
,
NULL
);
ThreadClean
(
vout
);
ThreadClean
(
vout
);
return
NULL
;
return
-
1
;
case
VOUT_CONTROL_REINIT
:
case
VOUT_CONTROL_REINIT
:
if
(
ThreadReinit
(
vout
,
cmd
.
u
.
cfg
))
if
(
ThreadReinit
(
vout
,
cmd
.
u
.
cfg
))
return
NULL
;
return
-
1
;
break
;
break
;
case
VOUT_CONTROL_SUBPICTURE
:
case
VOUT_CONTROL_SUBPICTURE
:
ThreadDisplaySubpicture
(
vout
,
cmd
.
u
.
subpicture
);
ThreadDisplaySubpicture
(
vout
,
cmd
.
u
.
subpicture
);
...
@@ -1568,9 +1543,33 @@ static void *Thread(void *object)
...
@@ -1568,9 +1543,33 @@ static void *Thread(void *object)
break
;
break
;
}
}
vout_control_cmd_Clean
(
&
cmd
);
vout_control_cmd_Clean
(
&
cmd
);
}
return
0
;
}
/*****************************************************************************
* Thread: video output thread
*****************************************************************************
* Video output thread. This function does only returns when the thread is
* terminated. It handles the pictures arriving in the video heap and the
* display device events.
*****************************************************************************/
static
void
*
Thread
(
void
*
object
)
{
vout_thread_t
*
vout
=
object
;
vout_interlacing_support_t
interlacing
=
{
.
is_interlaced
=
false
,
.
date
=
mdate
(),
};
mtime_t
deadline
=
VLC_TS_INVALID
;
for
(;;)
{
vout_control_cmd_t
cmd
;
/* FIXME remove thoses ugly timeouts */
while
(
!
vout_control_Pop
(
&
vout
->
p
->
control
,
&
cmd
,
deadline
,
100000
))
if
(
ThreadControl
(
vout
,
cmd
))
return
NULL
;
ThreadManage
(
vout
,
&
deadline
,
&
interlacing
);
ThreadManage
(
vout
,
&
deadline
,
&
interlacing
);
}
}
}
}
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