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
2e762050
Commit
2e762050
authored
Mar 15, 2005
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/video_output/vout_synchro.c: New --quiet-synchro config option.
parent
a6c7a464
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
40 deletions
+54
-40
include/vout_synchro.h
include/vout_synchro.h
+2
-1
src/libvlc.h
src/libvlc.h
+8
-1
src/video_output/vout_synchro.c
src/video_output/vout_synchro.c
+44
-38
No files found.
include/vout_synchro.h
View file @
2e762050
/*****************************************************************************
* vout_synchro.h: frame-dropping structures
*****************************************************************************
* Copyright (C) 1999-200
3
VideoLAN
* Copyright (C) 1999-200
5
VideoLAN
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -37,6 +37,7 @@ struct vout_synchro_t
int
i_frame_rate
;
int
i_current_rate
;
vlc_bool_t
b_no_skip
;
vlc_bool_t
b_quiet
;
/* date of the beginning of the decoding of the current picture */
mtime_t
decoding_start
;
...
...
src/libvlc.h
View file @
2e762050
/*****************************************************************************
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-200
2
VideoLAN
* Copyright (C) 1998-200
5
VideoLAN
* $Id$
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -277,6 +277,11 @@ static char *ppsz_align_descriptions[] =
#define SKIP_FRAMES_LONGTEXT N_( \
"Disable this option to disable frame drops on MPEG-2 streams.")
#define QUIET_SYNCHRO_TEXT N_("Quiet synchro")
#define QUIET_SYNCHRO_LONGTEXT N_( \
"Enable this option to avoid flooding the message log with debug " \
"output from the video output synchro.")
#define INPUT_CAT_LONGTEXT N_( \
"These options allow you to modify the behavior of the input " \
"subsystem, such as the DVD or VCD device, the network interface " \
...
...
@@ -925,6 +930,8 @@ vlc_module_begin();
change_short
(
'f'
);
add_bool
(
"skip-frames"
,
1
,
NULL
,
SKIP_FRAMES_TEXT
,
SKIP_FRAMES_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"quiet-synchro"
,
0
,
NULL
,
QUIET_SYNCHRO_TEXT
,
QUIET_SYNCHRO_LONGTEXT
,
VLC_TRUE
);
#ifndef SYS_DARWIN
add_bool
(
"overlay"
,
1
,
NULL
,
OVERLAY_TEXT
,
OVERLAY_LONGTEXT
,
VLC_TRUE
);
#endif
...
...
src/video_output/vout_synchro.c
View file @
2e762050
/*****************************************************************************
* vout_synchro.c : frame dropping routines
*****************************************************************************
* Copyright (C) 1999-200
4
VideoLAN
* Copyright (C) 1999-200
5
VideoLAN
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -130,6 +130,7 @@ vout_synchro_t * __vout_SynchroInit( vlc_object_t * p_object,
vlc_object_attach
(
p_synchro
,
p_object
);
p_synchro
->
b_no_skip
=
!
config_GetInt
(
p_object
,
"skip-frames"
);
p_synchro
->
b_quiet
=
config_GetInt
(
p_object
,
"quiet-synchro"
);
/* We use a fake stream pattern, which is often right. */
p_synchro
->
i_n_p
=
p_synchro
->
i_eta_p
=
DEFAULT_NB_P
;
...
...
@@ -216,7 +217,7 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type,
{
b_decode
=
(
pts
-
now
)
>
(
TAU_PRIME
(
I_CODING_TYPE
)
+
DELTA
);
}
if
(
!
b_decode
)
if
(
!
b_decode
&&
!
p_synchro
->
b_quiet
)
{
msg_Warn
(
p_synchro
,
"synchro trashing I ("
I64Fd
")"
,
pts
-
now
);
...
...
@@ -366,6 +367,7 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
if
(
p_synchro
->
i_eta_p
&&
p_synchro
->
i_eta_p
!=
p_synchro
->
i_n_p
)
{
if
(
!
p_synchro
->
b_quiet
)
msg_Dbg
(
p_synchro
,
"stream periodicity changed from P[%d] to P[%d]"
,
p_synchro
->
i_n_p
,
p_synchro
->
i_eta_p
);
...
...
@@ -379,6 +381,7 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
p_synchro
->
i_dec_nb_ref
=
p_synchro
->
i_nb_ref
;
#if 0
if( !p_synchro->b_quiet )
msg_Dbg( p_synchro, "I("I64Fd") P("I64Fd")[%d] B("I64Fd")"
"[%d] YUV("I64Fd") : trashed %d:%d/%d",
p_synchro->p_tau[I_CODING_TYPE],
...
...
@@ -394,8 +397,9 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
p_synchro->i_trashed_pic = p_synchro->i_not_chosen_pic
= p_synchro->i_pic = 0;
#else
if
(
p_synchro
->
i_pic
>=
100
)
if
(
p_synchro
->
i_pic
>=
100
)
{
if
(
!
p_synchro
->
b_quiet
)
msg_Dbg
(
p_synchro
,
"decoded %d/%d pictures"
,
p_synchro
->
i_pic
-
p_synchro
->
i_trashed_pic
,
...
...
@@ -411,6 +415,7 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
if
(
p_synchro
->
i_eta_b
&&
p_synchro
->
i_eta_b
!=
p_synchro
->
i_n_b
)
{
if
(
!
p_synchro
->
b_quiet
)
msg_Dbg
(
p_synchro
,
"stream periodicity changed from B[%d] to B[%d]"
,
p_synchro
->
i_n_b
,
p_synchro
->
i_eta_b
);
...
...
@@ -441,10 +446,10 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
if
(
next_pts
)
{
if
(
next_pts
-
p_synchro
->
current_pts
if
(
(
next_pts
-
p_synchro
->
current_pts
>
PTS_THRESHOLD
||
p_synchro
->
current_pts
-
next_pts
>
PTS_THRESHOLD
)
>
PTS_THRESHOLD
)
&&
!
p_synchro
->
b_quiet
)
{
msg_Warn
(
p_synchro
,
"vout synchro warning: pts != "
"current_date ("
I64Fd
")"
,
...
...
@@ -465,16 +470,16 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
(
next_dts
-
p_synchro
->
backward_pts
>
PTS_THRESHOLD
||
p_synchro
->
backward_pts
-
next_dts
>
PTS_THRESHOLD
)
)
>
PTS_THRESHOLD
)
&&
!
p_synchro
->
b_quiet
)
{
msg_Warn
(
p_synchro
,
"backward_pts != dts ("
I64Fd
")"
,
next_dts
-
p_synchro
->
backward_pts
);
}
if
(
p_synchro
->
backward_pts
-
p_synchro
->
current_pts
if
(
(
p_synchro
->
backward_pts
-
p_synchro
->
current_pts
>
PTS_THRESHOLD
||
p_synchro
->
current_pts
-
p_synchro
->
backward_pts
>
PTS_THRESHOLD
)
>
PTS_THRESHOLD
)
&&
!
p_synchro
->
b_quiet
)
{
msg_Warn
(
p_synchro
,
"backward_pts != current_pts ("
I64Fd
")"
,
...
...
@@ -486,10 +491,10 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
}
else
if
(
next_dts
)
{
if
(
next_dts
-
p_synchro
->
current_pts
if
(
(
next_dts
-
p_synchro
->
current_pts
>
PTS_THRESHOLD
||
p_synchro
->
current_pts
-
next_dts
>
PTS_THRESHOLD
)
>
PTS_THRESHOLD
)
&&
!
p_synchro
->
b_quiet
)
{
msg_Warn
(
p_synchro
,
"dts != current_pts ("
I64Fd
")"
,
p_synchro
->
current_pts
...
...
@@ -515,6 +520,7 @@ void vout_SynchroNewPicture( vout_synchro_t * p_synchro, int i_coding_type,
{
/* We cannot be _that_ late, something must have happened, reinit
* the dates. */
if( !p_synchro->b_quiet )
msg_Warn( p_synchro, "PTS << now ("I64Fd"), resetting",
now - p_synchro->current_pts - DEFAULT_PTS_DELAY );
p_synchro->current_pts = now + DEFAULT_PTS_DELAY;
...
...
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