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
509d5ac4
Commit
509d5ac4
authored
Feb 12, 2001
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Tried to enhance picture dating on timebase discontinuities.
parent
2b65b38b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
include/config.h.in
include/config.h.in
+2
-2
src/video_parser/vpar_synchro.c
src/video_parser/vpar_synchro.c
+29
-3
No files found.
include/config.h.in
View file @
509d5ac4
...
...
@@ -211,11 +211,11 @@
/* Delay between vlan changes - this is required to avoid flooding the VLAN
* server */
#define INPUT_VLAN_CHANGE_DELAY (5*CLOCK_FREQ)
#define INPUT_VLAN_CHANGE_DELAY (
mtime_t)(
5*CLOCK_FREQ)
/* Duration between the time we receive the data packet, and the time we will
* mark it to be presented */
#define DEFAULT_PTS_DELAY (.2*CLOCK_FREQ)
#define DEFAULT_PTS_DELAY (
mtime_t)(
.2*CLOCK_FREQ)
#define INPUT_DVD_DEVICE_VAR "vlc_dvd_device"
#define INPUT_DVD_DEVICE_DEFAULT "/dev/dvd"
...
...
src/video_parser/vpar_synchro.c
View file @
509d5ac4
...
...
@@ -2,7 +2,7 @@
* vpar_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_synchro.c,v 1.8
2 2001/02/12 10:46:26
massiot Exp $
* $Id: vpar_synchro.c,v 1.8
3 2001/02/12 11:22:31
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
...
...
@@ -233,8 +233,9 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
vlc_mutex_lock
(
&
p_vpar
->
p_vout
->
change_lock
);
tau_yuv
=
p_vpar
->
p_vout
->
render_time
;
vlc_mutex_unlock
(
&
p_vpar
->
p_vout
->
change_lock
);
#ifdef VDEC_SMP
vlc_mutex_lock
(
&
p_vpar
->
synchro
.
fifo_lock
);
#endif
switch
(
i_coding_type
)
{
...
...
@@ -315,7 +316,9 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
}
}
#ifdef VDEC_SMP
vlc_mutex_unlock
(
&
p_vpar
->
synchro
.
fifo_lock
);
#endif
#ifdef DEBUG_VPAR
intf_DbgMsg
(
"vpar synchro debug: %s picture scheduled for %s, %s (%lld)"
,
i_coding_type
==
B_CODING_TYPE
?
"B"
:
...
...
@@ -352,7 +355,9 @@ void vpar_SynchroTrash( vpar_thread_t * p_vpar, int i_coding_type,
void
vpar_SynchroDecode
(
vpar_thread_t
*
p_vpar
,
int
i_coding_type
,
int
i_structure
)
{
#ifdef VDEC_SMP
vlc_mutex_lock
(
&
p_vpar
->
synchro
.
fifo_lock
);
#endif
if
(
((
p_vpar
->
synchro
.
i_end
+
1
-
p_vpar
->
synchro
.
i_start
)
%
MAX_DECODING_PIC
)
)
...
...
@@ -367,7 +372,9 @@ void vpar_SynchroDecode( vpar_thread_t * p_vpar, int i_coding_type,
/* FIFO full, panic() */
intf_ErrMsg
(
"vpar error: synchro fifo full, estimations will be biased"
);
}
#ifdef VDEC_SMP
vlc_mutex_unlock
(
&
p_vpar
->
synchro
.
fifo_lock
);
#endif
}
/*****************************************************************************
...
...
@@ -378,7 +385,9 @@ void vpar_SynchroEnd( vpar_thread_t * p_vpar, int i_garbage )
mtime_t
tau
;
int
i_coding_type
;
#ifdef VDEC_SMP
vlc_mutex_lock
(
&
p_vpar
->
synchro
.
fifo_lock
);
#endif
if
(
!
i_garbage
)
{
...
...
@@ -410,7 +419,9 @@ void vpar_SynchroEnd( vpar_thread_t * p_vpar, int i_garbage )
FIFO_INCREMENT
(
i_start
);
#ifdef VDEC_SMP
vlc_mutex_unlock
(
&
p_vpar
->
synchro
.
fifo_lock
);
#endif
}
/*****************************************************************************
...
...
@@ -430,6 +441,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
{
mtime_t
period
=
1000000
*
1001
/
p_vpar
->
sequence
.
i_frame_rate
*
p_vpar
->
sequence
.
i_current_rate
/
DEFAULT_RATE
;
mtime_t
now
=
mdate
();
switch
(
i_coding_type
)
{
...
...
@@ -479,7 +491,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
p_vpar
->
synchro
.
current_pts
+=
p_vpar
->
synchro
.
i_current_period
*
(
period
>>
1
);
#define PTS_THRESHOLD (period >> 2)
if
(
i_coding_type
==
B_CODING_TYPE
)
{
...
...
@@ -560,6 +572,20 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
}
#undef PTS_THRESHOLD
if
(
p_vpar
->
synchro
.
current_pts
+
DEFAULT_PTS_DELAY
<
now
)
{
/* We cannot be _that_ late, something must have happened, reinit
* the dates. */
intf_WarnMsg
(
2
,
"PTS << now (%lld), resetting"
,
now
-
p_vpar
->
synchro
.
current_pts
-
DEFAULT_PTS_DELAY
);
p_vpar
->
synchro
.
current_pts
=
now
+
DEFAULT_PTS_DELAY
;
}
if
(
p_vpar
->
synchro
.
backward_pts
+
DEFAULT_PTS_DELAY
<
now
)
{
/* The same. */
p_vpar
->
synchro
.
current_pts
=
0
;
}
#ifdef STATS
p_vpar
->
synchro
.
i_pic
++
;
#endif
...
...
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