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
3efe5e8a
Commit
3efe5e8a
authored
Nov 03, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split (virtually) display and demux es_out.
parent
fccbbf97
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
20 deletions
+39
-20
src/input/es_out.c
src/input/es_out.c
+9
-2
src/input/es_out.h
src/input/es_out.h
+6
-6
src/input/input.c
src/input/input.c
+23
-12
src/input/input_internal.h
src/input/input_internal.h
+1
-0
No files found.
src/input/es_out.c
View file @
3efe5e8a
...
...
@@ -2329,16 +2329,22 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
case
ES_OUT_SET_PAUSE_STATE
:
{
const
bool
b
=
(
bool
)
va_arg
(
args
,
int
);
const
bool
b_source_paused
=
(
bool
)
va_arg
(
args
,
int
);
const
bool
b_paused
=
(
bool
)
va_arg
(
args
,
int
);
const
mtime_t
i_date
=
(
mtime_t
)
va_arg
(
args
,
mtime_t
);
EsOutChangePause
(
out
,
b
,
i_date
);
assert
(
!
b_source_paused
==
!
b_paused
);
EsOutChangePause
(
out
,
b_paused
,
i_date
);
return
VLC_SUCCESS
;
}
case
ES_OUT_SET_RATE
:
{
const
int
i_src_rate
=
(
int
)
va_arg
(
args
,
int
);
const
int
i_rate
=
(
int
)
va_arg
(
args
,
int
);
assert
(
i_src_rate
==
i_rate
);
EsOutChangeRate
(
out
,
i_rate
);
return
VLC_SUCCESS
;
...
...
@@ -2347,6 +2353,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
case
ES_OUT_SET_TIME
:
{
const
mtime_t
i_date
=
(
mtime_t
)
va_arg
(
args
,
mtime_t
);
assert
(
i_date
==
-
1
);
EsOutChangePosition
(
out
);
...
...
src/input/es_out.h
View file @
3efe5e8a
...
...
@@ -54,10 +54,10 @@ enum es_out_query_private_e
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 */
ES_OUT_SET_PAUSE_STATE
,
/* arg1=bool
b_source_paused, bool b_paused
arg2=mtime_t res=can fail */
/* Set rate */
ES_OUT_SET_RATE
,
/* arg1=int i_
rate
res=can fail */
ES_OUT_SET_RATE
,
/* arg1=int i_
source_rate arg2=int i_rate
res=can fail */
/* Set a new time */
ES_OUT_SET_TIME
,
/* arg1=mtime_t res=can fail */
...
...
@@ -104,13 +104,13 @@ 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
)
static
inline
int
es_out_SetPauseState
(
es_out_t
*
p_out
,
bool
b_
source_paused
,
bool
b_
paused
,
mtime_t
i_date
)
{
return
es_out_Control
(
p_out
,
ES_OUT_SET_PAUSE_STATE
,
b_paused
,
i_date
);
return
es_out_Control
(
p_out
,
ES_OUT_SET_PAUSE_STATE
,
b_
source_paused
,
b_
paused
,
i_date
);
}
static
inline
int
es_out_SetRate
(
es_out_t
*
p_out
,
int
i_rate
)
static
inline
int
es_out_SetRate
(
es_out_t
*
p_out
,
int
i_
source_rate
,
int
i_
rate
)
{
return
es_out_Control
(
p_out
,
ES_OUT_SET_RATE
,
i_rate
);
return
es_out_Control
(
p_out
,
ES_OUT_SET_RATE
,
i_
source_rate
,
i_
rate
);
}
static
inline
int
es_out_SetTime
(
es_out_t
*
p_out
,
mtime_t
i_date
)
{
...
...
src/input/input.c
View file @
3efe5e8a
...
...
@@ -200,6 +200,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input
->
p
->
b_recording
=
false
;
TAB_INIT
(
p_input
->
p
->
i_bookmark
,
p_input
->
p
->
bookmark
);
TAB_INIT
(
p_input
->
p
->
i_attachment
,
p_input
->
p
->
attachment
);
p_input
->
p
->
p_es_out_display
=
p_input
->
p
->
p_es_out
=
NULL
;
p_input
->
p
->
p_sout
=
NULL
;
p_input
->
p
->
b_out_pace_control
=
false
;
...
...
@@ -1182,7 +1183,8 @@ static int Init( input_thread_t * p_input )
#endif
/* Create es out */
p_input
->
p
->
p_es_out
=
input_EsOutNew
(
p_input
,
p_input
->
p
->
i_rate
);
p_input
->
p
->
p_es_out
=
p_input
->
p
->
p_es_out_display
=
input_EsOutNew
(
p_input
,
p_input
->
p
->
i_rate
);
es_out_Control
(
p_input
->
p
->
p_es_out
,
ES_OUT_SET_ACTIVE
,
false
);
es_out_Control
(
p_input
->
p
->
p_es_out
,
ES_OUT_SET_MODE
,
ES_OUT_MODE_NONE
);
...
...
@@ -1262,6 +1264,10 @@ static int Init( input_thread_t * p_input )
error:
input_ChangeState
(
p_input
,
ERROR_S
);
if
(
p_input
->
p
->
p_es_out_display
)
{
//TODO
}
if
(
p_input
->
p
->
p_es_out
)
es_out_Delete
(
p_input
->
p
->
p_es_out
);
#ifdef ENABLE_SOUT
...
...
@@ -1304,6 +1310,7 @@ error:
p_input
->
p
->
input
.
p_stream
=
NULL
;
p_input
->
p
->
input
.
p_access
=
NULL
;
p_input
->
p
->
p_es_out
=
NULL
;
p_input
->
p
->
p_es_out_display
=
NULL
;
p_input
->
p
->
p_sout
=
NULL
;
return
VLC_EGENERIC
;
...
...
@@ -1350,6 +1357,10 @@ static void End( input_thread_t * p_input )
free
(
p_input
->
p
->
slave
);
/* Unload all modules */
if
(
p_input
->
p
->
p_es_out_display
)
{
//TODO
}
if
(
p_input
->
p
->
p_es_out
)
es_out_Delete
(
p_input
->
p
->
p_es_out
);
...
...
@@ -1511,7 +1522,7 @@ static void ControlPause( input_thread_t *p_input, mtime_t i_control_date )
/* */
if
(
!
i_ret
)
es_out_SetPauseState
(
p_input
->
p
->
p_es_out
,
true
,
i_control_date
);
es_out_SetPauseState
(
p_input
->
p
->
p_es_out
,
true
,
true
,
i_control_date
);
}
static
void
ControlUnpause
(
input_thread_t
*
p_input
,
mtime_t
i_control_date
)
{
...
...
@@ -1537,7 +1548,7 @@ static void ControlUnpause( input_thread_t *p_input, mtime_t i_control_date )
/* */
if
(
!
i_ret
)
es_out_SetPauseState
(
p_input
->
p
->
p_es_out
,
false
,
i_control_date
);
es_out_SetPauseState
(
p_input
->
p
->
p_es_out
,
false
,
false
,
i_control_date
);
}
static
bool
Control
(
input_thread_t
*
p_input
,
int
i_type
,
...
...
@@ -1787,7 +1798,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
)
es_out_SetRate
(
p_input
->
p
->
p_es_out
,
i_rate
);
es_out_SetRate
(
p_input
->
p
->
p_es_out
,
i_rate
,
i_rate
);
b_force_update
=
true
;
}
...
...
@@ -1805,20 +1816,20 @@ static bool Control( input_thread_t *p_input, int i_type,
case
INPUT_CONTROL_SET_ES
:
/* No need to force update, es_out does it if needed */
es_out_Control
(
p_input
->
p
->
p_es_out
,
ES_OUT_SET_ES_BY_ID
,
val
.
i_int
);
es_out_Control
(
p_input
->
p
->
p_es_out
_display
,
ES_OUT_SET_ES_BY_ID
,
val
.
i_int
);
break
;
case
INPUT_CONTROL_RESTART_ES
:
es_out_Control
(
p_input
->
p
->
p_es_out
,
ES_OUT_RESTART_ES_BY_ID
,
val
.
i_int
);
es_out_Control
(
p_input
->
p
->
p_es_out
_display
,
ES_OUT_RESTART_ES_BY_ID
,
val
.
i_int
);
break
;
case
INPUT_CONTROL_SET_AUDIO_DELAY
:
if
(
!
es_out_SetDelay
(
p_input
->
p
->
p_es_out
,
AUDIO_ES
,
val
.
i_time
)
)
if
(
!
es_out_SetDelay
(
p_input
->
p
->
p_es_out
_display
,
AUDIO_ES
,
val
.
i_time
)
)
var_Change
(
p_input
,
"audio-delay"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
break
;
case
INPUT_CONTROL_SET_SPU_DELAY
:
if
(
!
es_out_SetDelay
(
p_input
->
p
->
p_es_out
,
SPU_ES
,
val
.
i_time
)
)
if
(
!
es_out_SetDelay
(
p_input
->
p
->
p_es_out
_display
,
SPU_ES
,
val
.
i_time
)
)
var_Change
(
p_input
,
"spu-delay"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
break
;
...
...
@@ -2029,7 +2040,7 @@ static bool Control( input_thread_t *p_input, int i_type,
}
else
{
if
(
es_out_SetRecordState
(
p_input
->
p
->
p_es_out
,
val
.
b_bool
)
)
if
(
es_out_SetRecordState
(
p_input
->
p
->
p_es_out
_display
,
val
.
b_bool
)
)
val
.
b_bool
=
false
;
}
p_input
->
p
->
b_recording
=
val
.
b_bool
;
...
...
@@ -3099,8 +3110,8 @@ static void SubtitleAdd( input_thread_t *p_input, char *psz_subtitle, bool b_for
{
const
int
i_id
=
list
.
p_list
->
p_values
[
count
.
i_int
].
i_int
;
es_out_Control
(
p_input
->
p
->
p_es_out
,
ES_OUT_SET_ES_DEFAULT_BY_ID
,
i_id
);
es_out_Control
(
p_input
->
p
->
p_es_out
,
ES_OUT_SET_ES_BY_ID
,
i_id
);
es_out_Control
(
p_input
->
p
->
p_es_out
_display
,
ES_OUT_SET_ES_DEFAULT_BY_ID
,
i_id
);
es_out_Control
(
p_input
->
p
->
p_es_out
_display
,
ES_OUT_SET_ES_BY_ID
,
i_id
);
}
var_Change
(
p_input
,
"spu-es"
,
VLC_VAR_FREELIST
,
&
list
,
NULL
);
}
...
...
src/input/input_internal.h
View file @
3efe5e8a
...
...
@@ -109,6 +109,7 @@ struct input_thread_private_t
/* Output */
es_out_t
*
p_es_out
;
es_out_t
*
p_es_out_display
;
sout_instance_t
*
p_sout
;
/* XXX Move it to es_out ? */
bool
b_out_pace_control
;
/* idem ? */
...
...
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