* 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>
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;
"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 " \
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
}
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;
+ (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;