#include <vlc_cpu.h>
#include <vlc_url.h>
#include <vlc_atomic.h>
+#include <vlc_modules.h>
#include "libvlc.h"
var_Create( p_libvlc, "snapshot-file", VLC_VAR_STRING );
var_Create( p_libvlc, "record-file", VLC_VAR_STRING );
+ /* some default internal settings */
+ var_Create( p_libvlc, "window", VLC_VAR_STRING );
+ var_Create( p_libvlc, "user-agent", VLC_VAR_STRING );
+ var_SetString( p_libvlc, "user-agent", "(LibVLC "VERSION")" );
+
/* Initialize playlist and get commandline files */
p_playlist = playlist_Create( VLC_OBJECT(p_libvlc) );
if( !p_playlist )
if( psz_codecs )
{
char *psz_morecodecs;
- if( asprintf(&psz_morecodecs, "%s,dmo,quicktime", psz_codecs) != -1 )
+ if( asprintf(&psz_morecodecs, "%s,dmo", psz_codecs) != -1 )
{
var_SetString( p_libvlc, "codec", psz_morecodecs);
free( psz_morecodecs );
free( psz_codecs );
}
else
- var_SetString( p_libvlc, "codec", "dmo,quicktime");
+ var_SetString( p_libvlc, "codec", "dmo");
}
#endif
+#ifdef __APPLE__
var_Create( p_libvlc, "drawable-view-top", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-view-left", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-view-bottom", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-clip-left", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-clip-bottom", VLC_VAR_INTEGER );
var_Create( p_libvlc, "drawable-clip-right", VLC_VAR_INTEGER );
+#endif
#ifdef WIN32
var_Create( p_libvlc, "drawable-hwnd", VLC_VAR_ADDRESS );
#endif
}
}
- /* TODO: write an internal function of this one, to avoid
- * unnecessary lookups. */
- char *mrl = make_URI( args[n] );
+ char *mrl = make_URI( args[n], NULL );
if( !mrl )
continue;
#ifdef WIN32 /* Pause the console because it's destroyed when we exit */
PauseConsole();
#endif
+ fflush( stdout );
}
/*****************************************************************************
{
utf8_fprintf( stdout, RED" %s:\n"GRAY,
module_gettext( m, p_item->psz_text ) );
- if( b_description && p_item->psz_longtext && *p_item->psz_longtext )
+ if( b_description && p_item->psz_longtext )
utf8_fprintf( stdout, MAGENTA" %s\n"GRAY,
module_gettext( m, p_item->psz_longtext ) );
}
{
utf8_fprintf( stdout, " %s:\n",
module_gettext( m, p_item->psz_text ) );
- if( b_description && p_item->psz_longtext && *p_item->psz_longtext )
+ if( b_description && p_item->psz_longtext )
utf8_fprintf( stdout, " %s\n",
module_gettext(m, p_item->psz_longtext ) );
}
utf8_fprintf( stdout, "\n %s\n",
module_gettext( p_parser, p_item->psz_text ) );
}
- if( b_description && p_item->psz_longtext
- && *p_item->psz_longtext )
+ if( b_description && p_item->psz_longtext )
{
if( b_color )
utf8_fprintf( stdout, CYAN " %s\n" GRAY,
if( p_item->min.i || p_item->max.i )
{
- sprintf( psz_buffer, "%s [%i .. %i]", psz_type,
- p_item->min.i, p_item->max.i );
+ sprintf( psz_buffer, "%s [%"PRId64" .. %"PRId64"]",
+ psz_type, p_item->min.i, p_item->max.i );
psz_type = psz_buffer;
}
}
}
- if( b_description_hack && p_item->psz_longtext
- && *p_item->psz_longtext )
+ if( b_description_hack && p_item->psz_longtext )
{
sprintf( psz_buffer, "%s%s",
module_gettext( p_parser, p_item->psz_longtext ),