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
7ccd46a8
Commit
7ccd46a8
authored
Jan 16, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Privatized i_pts_delay (input_thread_t).
parent
571abf2d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
17 deletions
+17
-17
include/vlc_input.h
include/vlc_input.h
+0
-3
src/input/decoder.c
src/input/decoder.c
+2
-2
src/input/es_out.c
src/input/es_out.c
+4
-4
src/input/input.c
src/input/input.c
+7
-7
src/input/input_internal.h
src/input/input_internal.h
+3
-0
src/input/var.c
src/input/var.c
+1
-1
No files found.
include/vlc_input.h
View file @
7ccd46a8
...
...
@@ -415,9 +415,6 @@ struct input_thread_t
bool
b_can_pace_control
;
int64_t
i_time
;
/* Current time */
/* Internal caching common to all inputs */
mtime_t
i_pts_delay
;
/* All other data is input_thread is PRIVATE. You can't access it
* outside of src/input */
input_thread_private_t
*
p
;
...
...
src/input/decoder.c
View file @
7ccd46a8
...
...
@@ -653,7 +653,7 @@ static mtime_t DecoderGetDisplayDate( decoder_t *p_dec, mtime_t i_ts )
if
(
!
p_owner
->
p_clock
||
!
i_ts
)
return
i_ts
;
return
input_clock_GetTS
(
p_owner
->
p_clock
,
NULL
,
p_owner
->
p_input
->
i_pts_delay
,
i_ts
);
return
input_clock_GetTS
(
p_owner
->
p_clock
,
NULL
,
p_owner
->
p_input
->
p
->
i_pts_delay
,
i_ts
);
}
static
int
DecoderGetDisplayRate
(
decoder_t
*
p_dec
)
{
...
...
@@ -1044,7 +1044,7 @@ static void DecoderFixTs( decoder_t *p_dec, mtime_t *pi_ts0, mtime_t *pi_ts1,
vlc_assert_locked
(
&
p_owner
->
lock
);
const
mtime_t
i_ts_delay
=
p_owner
->
p_input
->
i_pts_delay
;
const
mtime_t
i_ts_delay
=
p_owner
->
p_input
->
p
->
i_pts_delay
;
const
mtime_t
i_es_delay
=
p_owner
->
i_ts_delay
;
if
(
p_clock
)
...
...
src/input/es_out.c
View file @
7ccd46a8
...
...
@@ -545,7 +545,7 @@ static void EsOutChangePause( es_out_t *out, bool b_paused, mtime_t i_date )
if
(
!
i_ret
)
{
/* FIXME pcr != exactly what wanted */
const
mtime_t
i_used
=
/*(i_stream_duration - p_sys->p_input->i_pts_delay)*/
p_sys
->
i_buffering_extra_system
-
p_sys
->
i_buffering_extra_initial
;
const
mtime_t
i_used
=
/*(i_stream_duration - p_sys->p_input->
p->
i_pts_delay)*/
p_sys
->
i_buffering_extra_system
-
p_sys
->
i_buffering_extra_initial
;
i_date
-=
i_used
;
}
p_sys
->
i_buffering_extra_initial
=
0
;
...
...
@@ -622,7 +622,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced )
if
(
p_sys
->
i_preroll_end
>=
0
)
i_preroll_duration
=
__MAX
(
p_sys
->
i_preroll_end
-
i_stream_start
,
0
);
const
mtime_t
i_buffering_duration
=
p_sys
->
p_input
->
i_pts_delay
+
const
mtime_t
i_buffering_duration
=
p_sys
->
p_input
->
p
->
i_pts_delay
+
i_preroll_duration
+
p_sys
->
i_buffering_extra_stream
-
p_sys
->
i_buffering_extra_initial
;
...
...
@@ -787,7 +787,7 @@ static void EsOutFrameNext( es_out_t *out )
if
(
i_ret
)
return
;
p_sys
->
i_buffering_extra_initial
=
1
+
i_stream_duration
-
p_sys
->
p_input
->
i_pts_delay
;
/* FIXME < 0 ? */
p_sys
->
i_buffering_extra_initial
=
1
+
i_stream_duration
-
p_sys
->
p_input
->
p
->
i_pts_delay
;
/* FIXME < 0 ? */
p_sys
->
i_buffering_extra_system
=
p_sys
->
i_buffering_extra_stream
=
p_sys
->
i_buffering_extra_initial
;
}
...
...
@@ -842,7 +842,7 @@ static mtime_t EsOutGetBuffering( es_out_t *out )
}
const
mtime_t
i_consumed
=
i_system_duration
*
INPUT_RATE_DEFAULT
/
p_sys
->
i_rate
-
i_stream_duration
;
i_delay
=
p_sys
->
p_input
->
i_pts_delay
-
i_consumed
;
i_delay
=
p_sys
->
p_input
->
p
->
i_pts_delay
-
i_consumed
;
}
if
(
i_delay
<
0
)
return
0
;
...
...
src/input/input.c
View file @
7ccd46a8
...
...
@@ -183,7 +183,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
p_input
->
p
->
p_es_out
=
NULL
;
p_input
->
p
->
p_sout
=
NULL
;
p_input
->
p
->
b_out_pace_control
=
false
;
p_input
->
i_pts_delay
=
0
;
p_input
->
p
->
i_pts_delay
=
0
;
p_input
->
p
->
i_cr_average
=
0
;
vlc_gc_incref
(
p_item
);
/* Released in Destructor() */
...
...
@@ -906,17 +906,17 @@ static void InitTitle( input_thread_t * p_input )
p_input
->
p
->
b_can_rate_control
=
p_master
->
b_can_rate_control
;
/* Fix pts delay */
if
(
p_input
->
i_pts_delay
<
0
)
p_input
->
i_pts_delay
=
0
;
if
(
p_input
->
p
->
i_pts_delay
<
0
)
p_input
->
p
->
i_pts_delay
=
0
;
/* If the desynchronisation requested by the user is < 0, we need to
* cache more data. */
const
int
i_desynch
=
var_GetInteger
(
p_input
,
"audio-desync"
);
if
(
i_desynch
<
0
)
p_input
->
i_pts_delay
-=
i_desynch
*
1000
;
p_input
->
p
->
i_pts_delay
-=
i_desynch
*
1000
;
/* Update cr_average depending on the caching */
p_input
->
p
->
i_cr_average
*=
(
10
*
p_input
->
i_pts_delay
/
200000
);
p_input
->
p
->
i_cr_average
*=
(
10
*
p_input
->
p
->
i_pts_delay
/
200000
);
p_input
->
p
->
i_cr_average
/=
10
;
if
(
p_input
->
p
->
i_cr_average
<
10
)
p_input
->
p
->
i_cr_average
=
10
;
...
...
@@ -2344,7 +2344,7 @@ static int InputSourceInit( input_thread_t *p_input,
/* Get infos from access_demux */
demux_Control
(
in
->
p_demux
,
DEMUX_GET_PTS_DELAY
,
&
i_pts_delay
);
p_input
->
i_pts_delay
=
__MAX
(
p_input
->
i_pts_delay
,
i_pts_delay
);
p_input
->
p
->
i_pts_delay
=
__MAX
(
p_input
->
p
->
i_pts_delay
,
i_pts_delay
);
in
->
b_title_demux
=
true
;
if
(
demux_Control
(
in
->
p_demux
,
DEMUX_GET_TITLE_INFO
,
...
...
@@ -2418,7 +2418,7 @@ static int InputSourceInit( input_thread_t *p_input,
{
access_Control
(
in
->
p_access
,
ACCESS_GET_PTS_DELAY
,
&
i_pts_delay
);
p_input
->
i_pts_delay
=
__MAX
(
p_input
->
i_pts_delay
,
i_pts_delay
);
p_input
->
p
->
i_pts_delay
=
__MAX
(
p_input
->
p
->
i_pts_delay
,
i_pts_delay
);
in
->
b_title_demux
=
false
;
if
(
access_Control
(
in
->
p_access
,
ACCESS_GET_TITLE_INFO
,
...
...
src/input/input_internal.h
View file @
7ccd46a8
...
...
@@ -80,6 +80,9 @@ struct input_thread_private_t
bool
b_can_rate_control
;
double
f_fps
;
/* Internal caching common to all sources */
mtime_t
i_pts_delay
;
/* Current state */
int
i_rate
;
bool
b_recording
;
...
...
src/input/var.c
View file @
7ccd46a8
...
...
@@ -777,7 +777,7 @@ static int EsDelayCallback ( vlc_object_t *p_this, char const *psz_cmd,
/* Change i_pts_delay to make sure es are decoded in time */
if
(
newval
.
i_int
<
0
||
oldval
.
i_int
<
0
)
{
p_input
->
i_pts_delay
-=
newval
.
i_int
-
oldval
.
i_int
;
p_input
->
p
->
i_pts_delay
-=
newval
.
i_int
-
oldval
.
i_int
;
}
input_ControlPush
(
p_input
,
INPUT_CONTROL_SET_AUDIO_DELAY
,
&
newval
);
}
...
...
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