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
fccbbf97
Commit
fccbbf97
authored
Nov 03, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert remaining input_EsOut* to es_out_Control.
parent
2c73cfb4
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
247 additions
and
177 deletions
+247
-177
src/input/es_out.c
src/input/es_out.c
+189
-155
src/input/es_out.h
src/input/es_out.h
+46
-10
src/input/input.c
src/input/input.c
+12
-12
No files found.
src/input/es_out.c
View file @
fccbbf97
This diff is collapsed.
Click to expand it.
src/input/es_out.h
View file @
fccbbf97
...
...
@@ -47,11 +47,29 @@ enum es_out_query_private_e
/* Check if es_out has still data to play */
ES_OUT_GET_EMPTY
,
/* arg1=bool* res=cannot fail */
/* */
/*
Set delay for a ES category
*/
ES_OUT_SET_DELAY
,
/* arg1=es_category_e, res=can fail */
/* */
/*
Set record state
*/
ES_OUT_SET_RECORD_STATE
,
/* arg1=bool res=can fail */
/* Set pause state */
ES_OUT_SET_PAUSE_STATE
,
/* arg1=bool arg2=mtime_t res=can fail */
/* Set rate */
ES_OUT_SET_RATE
,
/* arg1=int i_rate res=can fail */
/* Set a new time */
ES_OUT_SET_TIME
,
/* arg1=mtime_t res=can fail */
/* Set next frame */
ES_OUT_SET_FRAME_NEXT
,
/* res=can fail */
/* Lock/Unlock es_out
* XXX es_out is safe without them, but they ensure coherency between
* calls if needed (if es_out is called outside of the main thread) */
ES_OUT_LOCK
,
/* res=cannot fail */
ES_OUT_UNLOCK
,
/* res=cannot fail */
};
static
inline
mtime_t
es_out_GetWakeup
(
es_out_t
*
p_out
)
...
...
@@ -86,15 +104,33 @@ static inline int es_out_SetRecordState( es_out_t *p_out, bool b_record )
{
return
es_out_Control
(
p_out
,
ES_OUT_SET_RECORD_STATE
,
b_record
);
}
static
inline
int
es_out_SetPauseState
(
es_out_t
*
p_out
,
bool
b_paused
,
mtime_t
i_date
)
{
return
es_out_Control
(
p_out
,
ES_OUT_SET_PAUSE_STATE
,
b_paused
,
i_date
);
}
static
inline
int
es_out_SetRate
(
es_out_t
*
p_out
,
int
i_rate
)
{
return
es_out_Control
(
p_out
,
ES_OUT_SET_RATE
,
i_rate
);
}
static
inline
int
es_out_SetTime
(
es_out_t
*
p_out
,
mtime_t
i_date
)
{
return
es_out_Control
(
p_out
,
ES_OUT_SET_TIME
,
i_date
);
}
static
inline
int
es_out_SetFrameNext
(
es_out_t
*
p_out
)
{
return
es_out_Control
(
p_out
,
ES_OUT_SET_FRAME_NEXT
);
}
static
inline
void
es_out_Lock
(
es_out_t
*
p_out
)
{
int
i_ret
=
es_out_Control
(
p_out
,
ES_OUT_LOCK
);
assert
(
!
i_ret
);
}
static
inline
void
es_out_Unlock
(
es_out_t
*
p_out
)
{
int
i_ret
=
es_out_Control
(
p_out
,
ES_OUT_UNLOCK
);
assert
(
!
i_ret
);
}
es_out_t
*
input_EsOutNew
(
input_thread_t
*
,
int
i_rate
);
void
input_EsOutChangeRate
(
es_out_t
*
,
int
);
void
input_EsOutChangePause
(
es_out_t
*
,
bool
b_paused
,
mtime_t
i_date
);
void
input_EsOutChangePosition
(
es_out_t
*
);
void
input_EsOutFrameNext
(
es_out_t
*
);
void
input_EsOutLock
(
es_out_t
*
);
void
input_EsOutUnlock
(
es_out_t
*
);
#endif
src/input/input.c
View file @
fccbbf97
...
...
@@ -1511,7 +1511,7 @@ static void ControlPause( input_thread_t *p_input, mtime_t i_control_date )
/* */
if
(
!
i_ret
)
input_EsOutChangePaus
e
(
p_input
->
p
->
p_es_out
,
true
,
i_control_date
);
es_out_SetPauseStat
e
(
p_input
->
p
->
p_es_out
,
true
,
i_control_date
);
}
static
void
ControlUnpause
(
input_thread_t
*
p_input
,
mtime_t
i_control_date
)
{
...
...
@@ -1537,7 +1537,7 @@ static void ControlUnpause( input_thread_t *p_input, mtime_t i_control_date )
/* */
if
(
!
i_ret
)
input_EsOutChangePaus
e
(
p_input
->
p
->
p_es_out
,
false
,
i_control_date
);
es_out_SetPauseStat
e
(
p_input
->
p
->
p_es_out
,
false
,
i_control_date
);
}
static
bool
Control
(
input_thread_t
*
p_input
,
int
i_type
,
...
...
@@ -1549,7 +1549,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if
(
!
p_input
)
return
b_force_update
;
input_EsOut
Lock
(
p_input
->
p
->
p_es_out
);
es_out_
Lock
(
p_input
->
p
->
p_es_out
);
switch
(
i_type
)
{
...
...
@@ -1584,7 +1584,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if
(
f_pos
<
0
.
0
)
f_pos
=
0
.
0
;
if
(
f_pos
>
1
.
0
)
f_pos
=
1
.
0
;
/* Reset the decoders states and clock sync (before calling the demuxer */
input_EsOutChangePosition
(
p_input
->
p
->
p_es_out
);
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
if
(
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_POSITION
,
f_pos
)
)
{
...
...
@@ -1628,7 +1628,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if
(
i_time
<
0
)
i_time
=
0
;
/* Reset the decoders states and clock sync (before calling the demuxer */
input_EsOutChangePosition
(
p_input
->
p
->
p_es_out
);
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
i_ret
=
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
DEMUX_SET_TIME
,
i_time
);
...
...
@@ -1787,7 +1787,7 @@ static bool Control( input_thread_t *p_input, int i_type,
/* FIXME do we need a RESET_PCR when !p_input->p->input.b_rescale_ts ? */
if
(
p_input
->
p
->
input
.
b_rescale_ts
)
input_EsOutChange
Rate
(
p_input
->
p
->
p_es_out
,
i_rate
);
es_out_Set
Rate
(
p_input
->
p
->
p_es_out
,
i_rate
);
b_force_update
=
true
;
}
...
...
@@ -1847,7 +1847,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if
(
i_title
>=
0
&&
i_title
<
p_input
->
p
->
input
.
i_title
)
{
input_EsOutChangePosition
(
p_input
->
p
->
p_es_out
);
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
demux_Control
(
p_demux
,
DEMUX_SET_TITLE
,
i_title
);
input_ControlVarTitle
(
p_input
,
i_title
);
...
...
@@ -1867,7 +1867,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if
(
i_title
>=
0
&&
i_title
<
p_input
->
p
->
input
.
i_title
)
{
input_EsOutChangePosition
(
p_input
->
p
->
p_es_out
);
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
access_Control
(
p_access
,
ACCESS_SET_TITLE
,
i_title
);
stream_AccessReset
(
p_input
->
p
->
input
.
p_stream
);
...
...
@@ -1914,7 +1914,7 @@ static bool Control( input_thread_t *p_input, int i_type,
p_input
->
p
->
input
.
title
[
p_demux
->
info
.
i_title
]
->
i_seekpoint
)
{
input_EsOutChangePosition
(
p_input
->
p
->
p_es_out
);
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
demux_Control
(
p_demux
,
DEMUX_SET_SEEKPOINT
,
i_seekpoint
);
}
...
...
@@ -1949,7 +1949,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if
(
i_seekpoint
>=
0
&&
i_seekpoint
<
p_input
->
p
->
input
.
title
[
p_access
->
info
.
i_title
]
->
i_seekpoint
)
{
input_EsOutChangePosition
(
p_input
->
p
->
p_es_out
);
es_out_SetTime
(
p_input
->
p
->
p_es_out
,
-
1
);
access_Control
(
p_access
,
ACCESS_SET_SEEKPOINT
,
i_seekpoint
);
...
...
@@ -2046,7 +2046,7 @@ static bool Control( input_thread_t *p_input, int i_type,
if
(
p_input
->
i_state
==
PAUSE_S
)
{
input_EsOu
tFrameNext
(
p_input
->
p
->
p_es_out
);
es_out_Se
tFrameNext
(
p_input
->
p
->
p_es_out
);
}
else
if
(
p_input
->
i_state
==
PLAYING_S
)
{
...
...
@@ -2065,7 +2065,7 @@ static bool Control( input_thread_t *p_input, int i_type,
break
;
}
input_EsOut
Unlock
(
p_input
->
p
->
p_es_out
);
es_out_
Unlock
(
p_input
->
p
->
p_es_out
);
return
b_force_update
;
}
...
...
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