+0.1.99g :
+
+ * removed all "*vlc" aliases except "gvlc" and "fbvlc". The other sucked.
+ * new --synchro flag which lets you force which images are decoded.
+
Tue Aug 8 11:24:01 CEST 2000
0.1.99f :
# Check whether --enable-ggi or --disable-ggi was given.
if test "${enable_ggi+set}" = set; then
enableval="$enable_ggi"
- if test x$enable_ggi = xyes; then PLUGINS=${PLUGINS}"ggi "; ALIASES=${ALIASES}"ggivlc "; fi
+ if test x$enable_ggi = xyes; then PLUGINS=${PLUGINS}"ggi "; fi
fi
# Check whether --enable-glide or --disable-glide was given.
if test "${enable_glide+set}" = set; then
enableval="$enable_glide"
- if test x$enable_glide = xyes; then PLUGINS=${PLUGINS}"glide "; ALIASES=${ALIASES}"glidevlc "; fi
+ if test x$enable_glide = xyes; then PLUGINS=${PLUGINS}"glide "; fi
fi
# Check whether --enable-gnome or --disable-gnome was given.
:
fi
-if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; ALIASES=${ALIASES}"xvlc "; fi
+if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
fi
plugins : ${PLUGINS}
vlc aliases : ${ALIASES}
"
+
[if test x$enable_fb = xyes; then PLUGINS=${PLUGINS}"fb "; ALIASES=${ALIASES}"fbvlc "; fi])
AC_ARG_ENABLE(ggi,
[ --enable-ggi GGI support (default disabled)],
- [if test x$enable_ggi = xyes; then PLUGINS=${PLUGINS}"ggi "; ALIASES=${ALIASES}"ggivlc "; fi])
+ [if test x$enable_ggi = xyes; then PLUGINS=${PLUGINS}"ggi "; fi])
AC_ARG_ENABLE(glide,
[ --enable-glide Glide (3dfx) support (default disabled)],
- [if test x$enable_glide = xyes; then PLUGINS=${PLUGINS}"glide "; ALIASES=${ALIASES}"glidevlc "; fi])
+ [if test x$enable_glide = xyes; then PLUGINS=${PLUGINS}"glide "; fi])
AC_ARG_ENABLE(gnome,
[ --enable-gnome Gnome support (default disabled)],
[if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"gnome "; ALIASES=${ALIASES}"gvlc "; fi])
AC_ARG_ENABLE(x11,
[ --enable-x11 X11 support (default enabled)])
-if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; ALIASES=${ALIASES}"xvlc "; fi
+if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
fi
plugins : ${PLUGINS}
vlc aliases : ${ALIASES}
"
+
.B \-\-server <host>, \-\-port <port>
Choose the video server address and port.
.TP
+.B \-\-synchro <type>
+Choose a fixed synchro value instead of the internal auto-adaptative
+heuristics based on CPU usage.
+
+`I' displays only I images, `IP' displays I and P images, `IP+'
+displays I and P images and every second B image, and `IPB' forces
+displaying of all images.
+
+Note that the vlc is certainly going to crash if you ask it to
+display more images than your CPU can cope with.
+.TP
.B \-h, \-\-help
Print help and exit.
.TP
vlc_iface=<interface> network interface
vlc_vlan_server=<host> vlan server
vlc_vlan_port=<port> vlan server port
+.TP
+.B Synchro parameters:
+ vlc_synchro=<type> synchro algorithm
.SH SEE ALSO
.BR vls (1), vlms (1)
/* Maximum number of macroblocks in a picture. */
#define MAX_MB 2048
+/* The synchro variable name */
+#define VPAR_SYNCHRO_VAR "vlc_synchro"
+
/*****************************************************************************
* Video decoder configuration
*****************************************************************************/
#ifdef SAM_SYNCHRO
typedef struct video_synchro_s
{
+ /* synchro algorithm */
+ int i_type;
+
/* fifo containing decoding dates */
mtime_t i_date_fifo[16];
unsigned int i_start;
int displayable_p;
boolean_t b_all_B;
int displayable_b;
+ boolean_t b_dropped_last_B;
} video_synchro_t;
#define FIFO_INCREMENT( i_counter ) \
p_vpar->synchro.i_counter = (p_vpar->synchro.i_counter + 1) & 0xf;
+#define VPAR_SYNCHRO_DEFAULT 0
+#define VPAR_SYNCHRO_I 1
+#define VPAR_SYNCHRO_IP 2
+#define VPAR_SYNCHRO_IPplus 3
+#define VPAR_SYNCHRO_IPB 4
+
#endif
#ifdef MEUUH_SYNCHRO
#define OPT_SERVER 171
#define OPT_PORT 172
+#define OPT_SYNCHRO 180
+
/* Usage fashion */
#define USAGE 0
#define SHORT_HELP 1
{ "server", 1, 0, OPT_SERVER },
{ "port", 1, 0, OPT_PORT },
+ /* Synchro options */
+ { "synchro", 1, 0, OPT_SYNCHRO },
+
{ 0, 0, 0, 0 }
};
intf_MsgImm( COPYRIGHT_MESSAGE "\n" );
- /* Get the executable name */
+ /* Get the executable name (similar to the basename command) */
p_main->psz_arg0 = p_pointer = ppsz_argv[ 0 ];
while( *p_pointer )
{
main_PutPszVariable( INPUT_PORT_VAR, optarg );
break;
+ /* Synchro options */
+ case OPT_SYNCHRO:
+ main_PutPszVariable( VPAR_SYNCHRO_VAR, optarg );
+ break;
+
/* Internal error: unknown option */
case '?':
default:
" -g, --grayscale \tgrayscale output\n"
" --color \tcolor output\n"
"\n"
- " -a, --dvdaudio \tchoose DVD audio type\n"
- " -c, --dvdchannel \tchoose DVD audio channel\n"
- " -s, --dvdsubtitle \tchoose DVD subtitle channel\n"
+ " -a, --dvdaudio <type> \tchoose DVD audio type\n"
+ " -c, --dvdchannel <channel> \tchoose DVD audio channel\n"
+ " -s, --dvdsubtitle <channel> \tchoose DVD subtitle channel\n"
"\n"
" --novlans \tdisable vlans\n"
" --server <host> \tvideo server address\n"
" --port <port> \tvideo server port\n"
"\n"
+ " --synchro <type> \tforce synchro algorithm\n"
+ "\n"
" -h, --help \tprint help and exit\n"
" -H, --longhelp \tprint long help and exit\n"
" -v, --version \toutput version information and exit\n" );
/* Interface parameters */
intf_Msg( "\n"
"Interface parameters:\n"
- " " INTF_INIT_SCRIPT_VAR "=<filename> \tinitialization script\n"
+ " " INTF_INIT_SCRIPT_VAR "=<filename> \tinitialization script\n"
" " INTF_CHANNELS_VAR "=<filename> \tchannels list\n" );
/* Audio parameters */
" " INPUT_IFACE_VAR "=<interface> \tnetwork interface\n"
" " INPUT_VLAN_SERVER_VAR "=<hostname> \tvlan server\n"
" " INPUT_VLAN_PORT_VAR "=<port> \tvlan server port\n" );
+
+ /* Synchro parameters */
+ intf_Msg( "\n"
+ "Synchro parameters:\n"
+ " " VPAR_SYNCHRO_VAR "={I|IP|IP+|IPB} \tsynchro algorithm\n");
}
/*****************************************************************************
*/
if( p_vout->c_fps_samples > VOUT_FPS_SAMPLES )
{
- sprintf( psz_buffer, "%.2f fps/10", VOUT_FPS_SAMPLES * 1000000 * 10 /
+ sprintf( psz_buffer, "%lli fps/10", VOUT_FPS_SAMPLES * 1000000 * 10 /
( p_vout->p_fps_sample[ (p_vout->c_fps_samples - 1) % VOUT_FPS_SAMPLES ] -
p_vout->p_fps_sample[ p_vout->c_fps_samples % VOUT_FPS_SAMPLES ] ) );
Print( p_vout, 0, 0, RIGHT_RALIGN, TOP_RALIGN, psz_buffer );
static void RunThread ( vpar_thread_t *p_vpar );
static void ErrorThread ( vpar_thread_t *p_vpar );
static void EndThread ( vpar_thread_t *p_vpar );
+static int SynchroType ( );
/*****************************************************************************
* vpar_CreateThread: create a generic parser thread
vpar_InitBMBType( p_vpar );
vpar_InitDCTTables( p_vpar );
-
/*
* Initialize the synchro properties
*/
#ifdef SAM_SYNCHRO
+ /* Get an possible synchro algorithm */
+ p_vpar->synchro.i_type = SynchroType();
+
+ /* last seen PTS */
p_vpar->synchro.i_last_pts = 0;
/* for i frames */
p_vpar->synchro.displayable_p = 2 << 10;
p_vpar->synchro.b_all_B = 0;
p_vpar->synchro.displayable_b = 0;
+ p_vpar->synchro.b_dropped_last_B = 0;
/* assume there were about 3 P and 6 B images between I's */
p_vpar->synchro.i_P_seen = p_vpar->synchro.i_P_kept = 1 << 10;
p_vpar->synchro.i_B_seen = p_vpar->synchro.i_B_kept = 1 << 10;
intf_DbgMsg("vpar debug: EndThread(%p)\n", p_vpar);
}
+
+/*****************************************************************************
+ * SynchroType: Get the user's synchro type
+ *****************************************************************************
+ * This function is called at initialization.
+ *****************************************************************************/
+static int SynchroType( )
+{
+ char * psz_synchro = main_GetPszVariable( VPAR_SYNCHRO_VAR, NULL );
+
+ if( psz_synchro == NULL )
+ {
+ return VPAR_SYNCHRO_DEFAULT;
+ }
+
+ switch( *psz_synchro++ )
+ {
+ case 'i':
+ case 'I':
+ switch( *psz_synchro++ )
+ {
+ case '\0':
+ return VPAR_SYNCHRO_I;
+
+ case 'p':
+ case 'P':
+ switch( *psz_synchro++ )
+ {
+ case '\0':
+ return VPAR_SYNCHRO_IP;
+
+ case '+':
+ if( *psz_synchro ) return 0;
+ return VPAR_SYNCHRO_IPplus;
+
+ case 'b':
+ case 'B':
+ if( *psz_synchro ) return 0;
+ return VPAR_SYNCHRO_IPB;
+
+ default:
+ return VPAR_SYNCHRO_DEFAULT;
+
+ }
+
+ default:
+ return VPAR_SYNCHRO_DEFAULT;
+ }
+ }
+
+ return VPAR_SYNCHRO_DEFAULT;
+
+}
+
{
case I_CODING_TYPE:
- //intf_ErrMsg( " I %f %f\nI ", 1000000.0 / p_vpar->synchro.i_theorical_delay, 1000000.0 / p_vpar->synchro.i_delay );
+ if( p_vpar->synchro.i_type != VPAR_SYNCHRO_DEFAULT )
+ {
+ /* I, IP, IP+, IPB */
+ return( 1 );
+ }
+
return( p_vpar->synchro.b_all_I );
case P_CODING_TYPE:
- //return(1);
+ if( p_vpar->synchro.i_type == VPAR_SYNCHRO_I ) /* I */
+ {
+ return( 0 );
+ }
+
+ if( p_vpar->synchro.i_type >= VPAR_SYNCHRO_IP ) /* IP, IP+, IPB */
+ {
+ return( 1 );
+ }
+
if( p_vpar->synchro.b_all_P )
{
- //intf_ErrMsg( " p " );
return( 1 );
}
if( p_vpar->synchro.displayable_p * i_delay
< p_vpar->synchro.i_delay )
{
- //intf_ErrMsg( " - " );
return( 0 );
}
- p_vpar->synchro.displayable_p--;
- //intf_ErrMsg( " p> " );
+ p_vpar->synchro.displayable_p -= 1024;
+
return( 1 );
case B_CODING_TYPE:
+ if( p_vpar->synchro.i_type != VPAR_SYNCHRO_DEFAULT )
+ {
+ if( p_vpar->synchro.i_type <= VPAR_SYNCHRO_IP ) /* I, IP */
+ {
+ return( 0 );
+ }
+ else if( p_vpar->synchro.i_type == VPAR_SYNCHRO_IPB ) /* IPB */
+ {
+ return( 1 );
+ }
+
+ if( p_vpar->synchro.b_dropped_last_B ) /* IP+ */
+ {
+ p_vpar->synchro.b_dropped_last_B = 0;
+ return( 1 );
+ }
+
+ p_vpar->synchro.b_dropped_last_B = 1;
+ return( 0 );
+ }
+
if( p_vpar->synchro.b_all_B )
{
- //intf_ErrMsg( "b " );
return( 1 );
}
if( p_vpar->synchro.displayable_b <= 0 )
{
- //intf_ErrMsg( " " );
return( 0 );
}
if( i_delay < 0 )
{
- //intf_ErrMsg( "· " );
- p_vpar->synchro.displayable_b -= 0.5;
+ p_vpar->synchro.displayable_b -= 512;
return( 0 );
}
- //intf_ErrMsg( "b " );
- p_vpar->synchro.displayable_b--;
+ p_vpar->synchro.displayable_b -= 1024;
return( 1 );
}