Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
81db2a0b
Commit
81db2a0b
authored
Nov 21, 1999
by
Jean-Marc Dressler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mise en place du m�canisme de d�tection de changement de flux dans la synchro Polux
parent
59fd3a2a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
include/input.h
include/input.h
+2
-0
include/input_pcr.h
include/input_pcr.h
+3
-0
src/input/input_pcr.c
src/input/input_pcr.c
+12
-9
No files found.
include/input.h
View file @
81db2a0b
...
...
@@ -212,6 +212,8 @@ typedef struct pcr_descriptor_struct
mtime_t
delta_clock
;
mtime_t
delta_decode
;
/* represents decoder_time - pcr_time in usecondes */
mtime_t
last_pcr
;
count_t
c_average
;
/* counter used to compute dynamic average values */
count_t
c_pts
;
...
...
include/input_pcr.h
View file @
81db2a0b
...
...
@@ -9,6 +9,9 @@
* new_average = (old_average * c_average + new_sample_value) / (c_average +1) */
#define PCR_MAX_AVERAGE_COUNTER 40
/* Maximum allowed gap between two PCRs. */
#define PCR_MAX_GAP 1000000
/******************************************************************************
* Prototypes
******************************************************************************/
...
...
src/input/input_pcr.c
View file @
81db2a0b
...
...
@@ -29,11 +29,10 @@ void input_PcrReInit( input_thread_t *p_input )
{
ASSERT
(
p_input
);
pthread_mutex_lock
(
&
p_input
->
p_pcr
->
lock
);
p_input
->
p_pcr
->
delta_clock
=
0
;
p_input
->
p_pcr
->
c_average
=
0
;
p_input
->
p_pcr
->
c_pts
=
0
;
p_input
->
p_pcr
->
last_pcr
=
0
;
#ifdef STATS
p_input
->
p_pcr
->
c_average_jitter
=
0
;
...
...
@@ -42,8 +41,6 @@ void input_PcrReInit( input_thread_t *p_input )
/* For the printf in input_PcrDecode() (for debug purpose only) */
printf
(
"
\n
"
);
#endif
pthread_mutex_unlock
(
&
p_input
->
p_pcr
->
lock
);
}
/******************************************************************************
...
...
@@ -77,11 +74,6 @@ void input_PcrDecode( input_thread_t *p_input, es_descriptor_t *p_es,
ASSERT
(
p_es
);
p_pcr
=
p_input
->
p_pcr
;
if
(
p_es
->
b_discontinuity
)
{
input_PcrReInit
(
p_input
);
p_es
->
b_discontinuity
=
0
;
}
/* Express the PCR in microseconde
* WARNING: do not remove the casts in the following calculation ! */
...
...
@@ -91,6 +83,17 @@ void input_PcrDecode( input_thread_t *p_input, es_descriptor_t *p_es,
pthread_mutex_lock
(
&
p_pcr
->
lock
);
if
(
p_es
->
b_discontinuity
||
(
p_pcr
->
last_pcr
!=
0
&&
(
(
p_pcr
->
last_pcr
-
pcr_time
)
>
PCR_MAX_GAP
||
(
p_pcr
->
last_pcr
-
pcr_time
)
<
-
PCR_MAX_GAP
)
)
)
{
intf_DbgMsg
(
"input debug: input_PcrReInit()
\n
"
);
input_PcrReInit
(
p_input
);
p_es
->
b_discontinuity
=
0
;
}
p_pcr
->
last_pcr
=
pcr_time
;
if
(
p_pcr
->
c_average
==
PCR_MAX_AVERAGE_COUNTER
)
{
p_pcr
->
delta_clock
=
(
delta_clock
+
(
p_pcr
->
delta_clock
*
(
PCR_MAX_AVERAGE_COUNTER
-
1
)))
...
...
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