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
028ea651
Commit
028ea651
authored
Feb 06, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extended input_GetPcrSystem to also return the current delay.
parent
b06569fa
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
17 deletions
+21
-17
include/vlc_es_out.h
include/vlc_es_out.h
+3
-3
include/vlc_input.h
include/vlc_input.h
+3
-3
modules/control/netsync.c
modules/control/netsync.c
+3
-2
src/input/clock.c
src/input/clock.c
+4
-4
src/input/clock.h
src/input/clock.h
+2
-2
src/input/control.c
src/input/control.c
+2
-1
src/input/es_out.c
src/input/es_out.c
+2
-1
src/input/es_out_timeshift.c
src/input/es_out_timeshift.c
+2
-1
No files found.
include/vlc_es_out.h
View file @
028ea651
...
...
@@ -86,7 +86,7 @@ enum es_out_query_e
ES_OUT_SET_META
,
/* arg1=const vlc_meta_t * */
/* PCR system clock manipulation for external clock synchronization */
ES_OUT_GET_PCR_SYSTEM
,
/* arg1=mtime_t * res=can fail */
ES_OUT_GET_PCR_SYSTEM
,
/* arg1=mtime_t *
, arg2=mtime_t *
res=can fail */
ES_OUT_MODIFY_PCR_SYSTEM
,
/* arg1=int is_absolute, arg2=mtime_t, res=can fail */
/* First value usable for private control */
...
...
@@ -147,9 +147,9 @@ static inline int es_out_ControlSetMeta( es_out_t *out, const vlc_meta_t *p_meta
return
es_out_Control
(
out
,
ES_OUT_SET_META
,
p_meta
);
}
static
inline
int
es_out_ControlGetPcrSystem
(
es_out_t
*
out
,
mtime_t
*
pi_system
)
static
inline
int
es_out_ControlGetPcrSystem
(
es_out_t
*
out
,
mtime_t
*
pi_system
,
mtime_t
*
pi_delay
)
{
return
es_out_Control
(
out
,
ES_OUT_GET_PCR_SYSTEM
,
pi_system
);
return
es_out_Control
(
out
,
ES_OUT_GET_PCR_SYSTEM
,
pi_system
,
pi_delay
);
}
static
inline
int
es_out_ControlModifyPcrSystem
(
es_out_t
*
out
,
bool
b_absolute
,
mtime_t
i_system
)
{
...
...
include/vlc_input.h
View file @
028ea651
...
...
@@ -516,7 +516,7 @@ enum input_query_e
INPUT_GET_ES_OBJECTS
,
/* arg1=int id, vlc_object_t **dec, vout_thread_t **, aout_instance_t ** */
/* External clock managments */
INPUT_GET_PCR_SYSTEM
,
/* arg1=mtime_t *
res=can fail */
INPUT_GET_PCR_SYSTEM
,
/* arg1=mtime_t *
, arg2=mtime_t *
res=can fail */
INPUT_MODIFY_PCR_SYSTEM
,
/* arg1=int absolute, arg2=mtime_t res=can fail */
};
...
...
@@ -622,9 +622,9 @@ static inline int input_GetEsObjects( input_thread_t *p_input, int i_id,
/**
* \see input_clock_GetSystemOrigin
*/
static
inline
int
input_GetPcrSystem
(
input_thread_t
*
p_input
,
mtime_t
*
pi_system
)
static
inline
int
input_GetPcrSystem
(
input_thread_t
*
p_input
,
mtime_t
*
pi_system
,
mtime_t
*
pi_delay
)
{
return
input_Control
(
p_input
,
INPUT_GET_PCR_SYSTEM
,
pi_system
);
return
input_Control
(
p_input
,
INPUT_GET_PCR_SYSTEM
,
pi_system
,
pi_delay
);
}
/**
* \see input_clock_ChangeSystemOrigin
...
...
modules/control/netsync.c
View file @
028ea651
...
...
@@ -164,8 +164,9 @@ void Close(vlc_object_t *object)
static
mtime_t
GetPcrSystem
(
input_thread_t
*
input
)
{
int
canc
=
vlc_savecancel
();
/* TODO use the delay */
mtime_t
system
;
if
(
input_GetPcrSystem
(
input
,
&
system
))
if
(
input_GetPcrSystem
(
input
,
&
system
,
NULL
))
system
=
-
1
;
vlc_restorecancel
(
canc
);
...
...
@@ -251,7 +252,7 @@ static void *Slave(void *handle)
int
canc
=
vlc_savecancel
();
mtime_t
client_system
;
if
(
!
input_GetPcrSystem
(
sys
->
input
,
&
client_system
))
{
if
(
!
input_GetPcrSystem
(
sys
->
input
,
&
client_system
,
NULL
))
{
const
mtime_t
diff_system
=
client_system
-
master_system
-
diff_date
;
if
(
diff_system
!=
0
)
{
input_ModifyPcrSystem
(
sys
->
input
,
true
,
master_system
-
diff_date
);
...
...
src/input/clock.c
View file @
028ea651
...
...
@@ -515,17 +515,17 @@ void input_clock_ChangeSystemOrigin( input_clock_t *cl, bool b_absolute, mtime_t
vlc_mutex_unlock
(
&
cl
->
lock
);
}
mtime_t
input_clock_GetSystemOrigin
(
input_clock_t
*
cl
)
void
input_clock_GetSystemOrigin
(
input_clock_t
*
cl
,
mtime_t
*
pi_system
,
mtime_t
*
pi_delay
)
{
vlc_mutex_lock
(
&
cl
->
lock
);
assert
(
cl
->
b_has_reference
);
const
mtime_t
i_system
=
cl
->
ref
.
i_system
;
*
pi_system
=
cl
->
ref
.
i_system
;
if
(
pi_delay
)
*
pi_delay
=
cl
->
i_pts_delay
;
vlc_mutex_unlock
(
&
cl
->
lock
);
return
i_system
;
}
#warning "input_clock_SetJitter needs more work"
...
...
src/input/clock.h
View file @
028ea651
...
...
@@ -84,10 +84,10 @@ void input_clock_ChangeRate( input_clock_t *, int i_rate );
void
input_clock_ChangePause
(
input_clock_t
*
,
bool
b_paused
,
mtime_t
i_date
);
/**
* This function returns the original system value date for the current
* This function returns the original system value date
and the delay
for the current
* reference point (a valid reference point must have been set).
*/
mtime_t
input_clock_GetSystemOrigin
(
input_clock_t
*
);
void
input_clock_GetSystemOrigin
(
input_clock_t
*
,
mtime_t
*
pi_system
,
mtime_t
*
pi_delay
);
/**
* This function allows to rebase the original system value date (a valid
...
...
src/input/control.c
View file @
028ea651
...
...
@@ -466,7 +466,8 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
case
INPUT_GET_PCR_SYSTEM
:
{
mtime_t
*
pi_system
=
va_arg
(
args
,
mtime_t
*
);
return
es_out_ControlGetPcrSystem
(
p_input
->
p
->
p_es_out_display
,
pi_system
);
mtime_t
*
pi_delay
=
va_arg
(
args
,
mtime_t
*
);
return
es_out_ControlGetPcrSystem
(
p_input
->
p
->
p_es_out_display
,
pi_system
,
pi_delay
);
}
case
INPUT_MODIFY_PCR_SYSTEM
:
...
...
src/input/es_out.c
View file @
028ea651
...
...
@@ -2624,7 +2624,8 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return
VLC_EGENERIC
;
mtime_t
*
pi_system
=
va_arg
(
args
,
mtime_t
*
);
*
pi_system
=
input_clock_GetSystemOrigin
(
p_pgrm
->
p_clock
);
mtime_t
*
pi_delay
=
va_arg
(
args
,
mtime_t
*
);
input_clock_GetSystemOrigin
(
p_pgrm
->
p_clock
,
pi_system
,
pi_delay
);
return
VLC_SUCCESS
;
}
...
...
src/input/es_out_timeshift.c
View file @
028ea651
...
...
@@ -678,7 +678,8 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
return
VLC_EGENERIC
;
mtime_t
*
pi_system
=
(
mtime_t
*
)
va_arg
(
args
,
mtime_t
*
);
return
es_out_ControlGetPcrSystem
(
p_sys
->
p_out
,
pi_system
);
mtime_t
*
pi_delay
=
(
mtime_t
*
)
va_arg
(
args
,
mtime_t
*
);
return
es_out_ControlGetPcrSystem
(
p_sys
->
p_out
,
pi_system
,
pi_delay
);
}
case
ES_OUT_MODIFY_PCR_SYSTEM
:
{
...
...
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