Commit 5c856bcc authored by Christophe Massiot's avatar Christophe Massiot

* src/video_output/vout_synchro.c: Added a --no-skip-frames option (for

  compatibility with MPEG-2 HD, the current frame skipping algorithm seems
  to be too aggressive).
parent f45e22e5
......@@ -2,7 +2,7 @@
* vout_synchro.h: frame-dropping structures
*****************************************************************************
* Copyright (C) 1999-2003 VideoLAN
* $Id: vout_synchro.h,v 1.4 2004/01/25 18:17:08 zorglub Exp $
* $Id$
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr>
......@@ -36,6 +36,7 @@ struct vout_synchro_t
vout_thread_t * p_vout;
int i_frame_rate;
int i_current_rate;
vlc_bool_t b_no_skip;
/* date of the beginning of the decoding of the current picture */
mtime_t decoding_start;
......
......@@ -252,6 +252,10 @@ static char *ppsz_align_descriptions[] =
"aspect, or a float value (1.25, 1.3333, etc.) expressing pixel " \
"squareness.")
#define SKIP_FRAMES_TEXT N_("Skip frames")
#define SKIP_FRAMES_LONGTEXT N_( \
"Disable this option to disable frame drops on MPEG-2 streams.")
#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 " \
......@@ -879,6 +883,8 @@ vlc_module_begin();
add_bool( "fullscreen", 0, NULL, FULLSCREEN_TEXT,
FULLSCREEN_LONGTEXT, VLC_FALSE );
change_short('f');
add_bool( "skip-frames", 1, NULL, SKIP_FRAMES_TEXT,
SKIP_FRAMES_LONGTEXT, VLC_FALSE );
#ifndef SYS_DARWIN
add_bool( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT, VLC_TRUE );
#endif
......
......@@ -129,6 +129,8 @@ 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" );
/* We use a fake stream pattern, which is often right. */
p_synchro->i_n_p = p_synchro->i_eta_p = DEFAULT_NB_P;
p_synchro->i_n_b = p_synchro->i_eta_b = DEFAULT_NB_B;
......@@ -175,11 +177,13 @@ vlc_bool_t vout_SynchroChoose( vout_synchro_t * p_synchro, int i_coding_type,
+ (p_synchro->p_tau[(coding_type)] >> 1) \
+ p_synchro->i_render_time)
#define S (*p_synchro)
/* VPAR_SYNCHRO_DEFAULT */
mtime_t now, period;
mtime_t pts = 0;
vlc_bool_t b_decode = 0;
if ( p_synchro->b_no_skip )
return 1;
now = mdate();
period = 1000000 * 1001 / p_synchro->i_frame_rate
* p_synchro->i_current_rate / INPUT_RATE_DEFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment