X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Flibvlc-module.c;h=a8a83baa73741ec53ba7e53cc26221439d6b772f;hb=6f8cdd0f826a12a1dc10c741222c2a6299a01d7f;hp=de7483caf2fa7e71711fc0d21dbb9e99b23c722a;hpb=e9d4099b9d0b4d90dfbb361b1eace95a81c0738e;p=vlc diff --git a/src/libvlc-module.c b/src/libvlc-module.c index de7483caf2..a8a83baa73 100644 --- a/src/libvlc-module.c +++ b/src/libvlc-module.c @@ -36,6 +36,7 @@ #include #include +#include #include "libvlc.h" //#define Nothing here, this is just to prevent update-po from being stupid @@ -420,6 +421,11 @@ static const char *const ppsz_align_descriptions[] = #define EMBEDDED_LONGTEXT N_( \ "Embed the video output in the main interface." ) +#define DISPLAY_TEXT N_("X11 display") +#define DISPLAY_LONGTEXT N_( \ + "X11 hardware display to use. By default VLC will " \ + "use the value of the DISPLAY environment variable.") + #define FULLSCREEN_TEXT N_("Fullscreen video output") #define FULLSCREEN_LONGTEXT N_( \ "Start video in fullscreen mode" ) @@ -451,6 +457,28 @@ static const char *const ppsz_align_descriptions[] = "Hide mouse cursor and fullscreen controller after " \ "n milliseconds, default is 3000 ms (3 sec.)") +#define DEINTERLACE_TEXT N_("Deinterlace") +#define DEINTERLACE_LONGTEXT N_(\ + "Deinterlace") +static const int pi_deinterlace[] = { + 0, -1, 1 +}; +static const char * const ppsz_deinterlace_text[] = { + "Off", "Automatic", "On" +}; + +#define DEINTERLACE_MODE_TEXT N_("Deinterlace mode") +#define DEINTERLACE_MODE_LONGTEXT N_( \ + "Deinterlace method to use for video processing.") +static const char * const ppsz_deinterlace_mode[] = { + "discard", "blend", "mean", "bob", + "linear", "x", "yadif", "yadif2x" +}; +static const char * const ppsz_deinterlace_mode_text[] = { + N_("Discard"), N_("Blend"), N_("Mean"), N_("Bob"), + N_("Linear"), "X", "Yadif", "Yadif (2x)" +}; + static const int pi_pos_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 }; static const char *const ppsz_pos_descriptions[] = { N_("Center"), N_("Left"), N_("Right"), N_("Top"), N_("Bottom"), @@ -572,15 +600,13 @@ static const char *const ppsz_pos_descriptions[] = "This avoids flooding the message log with debug output from the " \ "video output synchronization mechanism.") -#define VOUT_EVENT_TEXT N_("key and mouse event handling at vout level.") -#define VOUT_EVENT_LONGTEXT N_( \ - "This parameter accepts values : 1 (full event handling support), " \ - "2 (event handling only for fullscreen) or 3 (No event handling). " \ - "Full event handling support is the default value.") +#define KEYBOARD_EVENTS_TEXT N_("Key press events") +#define KEYBOARD_EVENTS_LONGTEXT N_( \ + "This enables VLC hotkeys from the (non-embedded) video window." ) -static const int pi_vout_event_values[] = { 1, 2, 3 }; -static const char *const ppsz_vout_event_descriptions[] = - { N_("Full support"), N_("Fullscreen-only"), N_("None") }; +#define MOUSE_EVENTS_TEXT N_("Key press events") +#define MOUSE_EVENTS_LONGTEXT N_( \ + "This enables handling of mouse clicks on the video." ) /***************************************************************************** * Input @@ -706,6 +732,10 @@ static const char *const ppsz_clock_descriptions[] = #define INPUT_FAST_SEEK_LONGTEXT N_( \ "Favor speed over precision while seeking" ) +#define INPUT_RATE_TEXT N_("Playback speed") +#define INPUT_RATE_LONGTEXT N_( \ + "This defines the playback speed (nominal speed is 1.0)." ) + #define INPUT_LIST_TEXT N_("Input list") #define INPUT_LIST_LONGTEXT N_( \ "You can give a comma-separated list " \ @@ -989,11 +1019,6 @@ static const char *const ppsz_clock_descriptions[] = "These options allow you to enable special CPU optimizations. " \ "You should always leave all these enabled." ) -#define FPU_TEXT N_("Enable FPU support") -#define FPU_LONGTEXT N_( \ - "If your processor has a floating point calculation unit, VLC can take " \ - "advantage of it.") - #define MMX_TEXT N_("Enable CPU MMX support") #define MMX_LONGTEXT N_( \ "If your processor supports the MMX instructions set, VLC can take " \ @@ -1024,6 +1049,20 @@ static const char *const ppsz_clock_descriptions[] = "If your processor supports the SSE3 instructions set, VLC can take " \ "advantage of them.") +#define SSSE3_TEXT N_("Enable CPU SSSE3 support") +#define SSSE3_LONGTEXT N_( \ + "If your processor supports the SSSE3 instructions set, VLC can take " \ + "advantage of them.") + +#define SSE4_1_TEXT N_("Enable CPU SSE4.1 support") +#define SSE4_1_LONGTEXT N_( \ + "If your processor supports the SSE4.1 instructions set, VLC can take " \ + "advantage of them.") + +#define SSE4_2_TEXT N_("Enable CPU SSE4.2 support") +#define SSE4_2_LONGTEXT N_( \ + "If your processor supports the SSE4.2 instructions set, VLC can take " \ + "advantage of them.") #define ALTIVEC_TEXT N_("Enable CPU AltiVec support") #define ALTIVEC_LONGTEXT N_( \ @@ -1325,6 +1364,10 @@ static const char *const ppsz_albumart_descriptions[] = #define SUBDELAY_UP_KEY_LONGTEXT N_("Select the key to increase the subtitle delay.") #define SUBDELAY_DOWN_KEY_TEXT N_("Subtitle delay down") #define SUBDELAY_DOWN_KEY_LONGTEXT N_("Select the key to decrease the subtitle delay.") +#define SUBPOS_UP_KEY_TEXT N_("Subtitle position up") +#define SUBPOS_UP_KEY_LONGTEXT N_("Select the key to move subtitles higher.") +#define SUBPOS_DOWN_KEY_TEXT N_("Subtitle position down") +#define SUBPOS_DOWN_KEY_LONGTEXT N_("Select the key to move subtitles lower.") #define AUDIODELAY_UP_KEY_TEXT N_("Audio delay up") #define AUDIODELAY_UP_KEY_LONGTEXT N_("Select the key to increase the audio delay.") #define AUDIODELAY_DOWN_KEY_TEXT N_("Audio delay down") @@ -1528,7 +1571,7 @@ vlc_module_begin () VOLUME_STEP_LONGTEXT, true ) add_integer( "aout-rate", -1, NULL, AOUT_RATE_TEXT, AOUT_RATE_LONGTEXT, true ) -#if !defined( __APPLE__ ) +#if HAVE_FPU && !defined( __APPLE__ ) add_bool( "hq-resampling", 1, NULL, AOUT_RESAMP_TEXT, AOUT_RESAMP_LONGTEXT, true ) #endif @@ -1551,7 +1594,7 @@ vlc_module_begin () add_bool( "audio-replay-gain-peak-protection", true, NULL, AUDIO_REPLAY_GAIN_PEAK_PROTECTION_TEXT, AUDIO_REPLAY_GAIN_PEAK_PROTECTION_LONGTEXT, true ) - add_bool( "audio-time-stretch", true, NULL, + add_bool( "audio-time-stretch", HAVE_FPU, NULL, AUDIO_TIME_STRETCH_TEXT, AUDIO_TIME_STRETCH_LONGTEXT, false ) set_subcategory( SUBCAT_AUDIO_AOUT ) @@ -1575,7 +1618,12 @@ vlc_module_begin () change_safe () add_bool( "grayscale", 0, NULL, GRAYSCALE_TEXT, GRAYSCALE_LONGTEXT, true ) - add_bool( "fullscreen", 0, NULL, FULLSCREEN_TEXT, +#if defined (HAVE_MAEMO) +# define FULLSCREEN_DEFAULT true +#else +# define FULLSCREEN_DEFAULT false +#endif + add_bool( "fullscreen", FULLSCREEN_DEFAULT, NULL, FULLSCREEN_TEXT, FULLSCREEN_LONGTEXT, false ) change_short('f') change_safe () @@ -1584,6 +1632,9 @@ vlc_module_begin () #ifdef __APPLE__ add_deprecated_alias( "macosx-embedded" ) /*deprecated since 0.9.0 */ #endif + add_string( "x11-display", NULL, NULL, + DISPLAY_TEXT, DISPLAY_LONGTEXT, true ) + add_deprecated_alias( "xvideo-display" ) /* deprecated since 1.1.0 */ add_bool( "drop-late-frames", 1, NULL, DROP_LATE_FRAMES_TEXT, DROP_LATE_FRAMES_LONGTEXT, true ) /* Used in vout_synchro */ @@ -1591,10 +1642,12 @@ vlc_module_begin () SKIP_FRAMES_LONGTEXT, true ) add_bool( "quiet-synchro", 0, NULL, QUIET_SYNCHRO_TEXT, QUIET_SYNCHRO_LONGTEXT, true ) - add_integer( "vout-event", 1, NULL, VOUT_EVENT_TEXT, VOUT_EVENT_LONGTEXT, true ) - change_safe() - change_integer_list( pi_vout_event_values, ppsz_vout_event_descriptions, NULL ) - add_deprecated_alias( "x11-event" ) /* renamed since 1.0.0 */ + add_bool( "keyboard-events", true, NULL, KEYBOARD_EVENTS_TEXT, + KEYBOARD_EVENTS_LONGTEXT, true ) + add_bool( "mouse-events", true, NULL, MOUSE_EVENTS_TEXT, + MOUSE_EVENTS_LONGTEXT, true ) + add_obsolete_integer( "vout-event" ) /* deprecated since 1.1.0 */ + add_obsolete_integer( "x11-event" ) /* renamed since 1.0.0 */ #ifndef __APPLE__ add_bool( "overlay", 1, NULL, OVERLAY_TEXT, OVERLAY_LONGTEXT, false ) #endif @@ -1665,7 +1718,14 @@ vlc_module_begin () add_integer( "align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT, true ) change_integer_list( pi_align_values, ppsz_align_descriptions, NULL ) add_float( "zoom", 1, NULL, ZOOM_TEXT, ZOOM_LONGTEXT, true ) - + add_integer( "deinterlace", 0, NULL, + DEINTERLACE_TEXT, DEINTERLACE_LONGTEXT, false ) + change_integer_list( pi_deinterlace, ppsz_deinterlace_text, 0 ) + change_safe() + add_string( "deinterlace-mode", "blend", NULL, + DEINTERLACE_MODE_TEXT, DEINTERLACE_MODE_LONGTEXT, false ) + change_string_list( ppsz_deinterlace_mode, ppsz_deinterlace_mode_text, 0 ) + change_safe() set_subcategory( SUBCAT_VIDEO_VOUT ) add_module( "vout", "video output", NULL, NULL, VOUT_TEXT, VOUT_LONGTEXT, @@ -1764,6 +1824,8 @@ vlc_module_begin () add_bool( "input-fast-seek", false, NULL, INPUT_FAST_SEEK_TEXT, INPUT_FAST_SEEK_LONGTEXT, false ) change_safe () + add_float( "rate", 1., NULL, + INPUT_RATE_TEXT, INPUT_RATE_LONGTEXT, false ) add_string( "input-list", NULL, NULL, INPUT_LIST_TEXT, INPUT_LIST_LONGTEXT, true ) @@ -1930,8 +1992,7 @@ vlc_module_begin () set_category( CAT_ADVANCED ) set_subcategory( SUBCAT_ADVANCED_CPU ) add_category_hint( N_("CPU"), CPU_CAT_LONGTEXT, true ) - add_bool( "fpu", 1, NULL, FPU_TEXT, FPU_LONGTEXT, true ) - change_need_restart () + add_obsolete_bool( "fpu" ) #if defined( __i386__ ) || defined( __x86_64__ ) add_bool( "mmx", 1, NULL, MMX_TEXT, MMX_LONGTEXT, true ) change_need_restart () @@ -1945,6 +2006,12 @@ vlc_module_begin () change_need_restart () add_bool( "sse3", 1, NULL, SSE3_TEXT, SSE3_LONGTEXT, true ) change_need_restart () + add_bool( "ssse3", 1, NULL, SSSE3_TEXT, SSSE3_LONGTEXT, true ) + change_need_restart () + add_bool( "sse41", 1, NULL, SSE4_1_TEXT, SSE4_1_LONGTEXT, true ) + change_need_restart () + add_bool( "sse42", 1, NULL, SSE4_2_TEXT, SSE4_2_LONGTEXT, true ) + change_need_restart () #endif #if defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc64__ ) add_bool( "altivec", 1, NULL, ALTIVEC_TEXT, ALTIVEC_LONGTEXT, true ) @@ -2186,6 +2253,8 @@ vlc_module_begin () # define KEY_VOL_MUTE KEY_MODIFIER_COMMAND|KEY_MODIFIER_ALT|KEY_DOWN # define KEY_SUBDELAY_UP 'j' # define KEY_SUBDELAY_DOWN 'h' +# define KEY_SUBPOS_DOWN KEY_UNSET +# define KEY_SUBPOS_UP KEY_UNSET # define KEY_AUDIODELAY_UP 'g' # define KEY_AUDIODELAY_DOWN 'f' # define KEY_AUDIO_TRACK 'l' @@ -2269,7 +2338,7 @@ vlc_module_begin () */ # define KEY_TOGGLE_FULLSCREEN 'f' # define KEY_LEAVE_FULLSCREEN KEY_ESC -# define KEY_PLAY_PAUSE KEY_SPACE +# define KEY_PLAY_PAUSE ' ' # define KEY_PAUSE KEY_UNSET # define KEY_PLAY KEY_UNSET # define KEY_FASTER '+' @@ -2301,6 +2370,8 @@ vlc_module_begin () # define KEY_VOL_MUTE 'm' # define KEY_SUBDELAY_UP 'h' # define KEY_SUBDELAY_DOWN 'g' +# define KEY_SUBPOS_DOWN KEY_UNSET +# define KEY_SUBPOS_UP KEY_UNSET # define KEY_AUDIODELAY_UP 'k' # define KEY_AUDIODELAY_DOWN 'j' # define KEY_RANDOM 'r' @@ -2462,6 +2533,10 @@ vlc_module_begin () SUBDELAY_UP_KEY_TEXT, SUBDELAY_UP_KEY_LONGTEXT, true ) add_key( "key-subdelay-down", KEY_SUBDELAY_DOWN, NULL, SUBDELAY_DOWN_KEY_TEXT, SUBDELAY_DOWN_KEY_LONGTEXT, true ) + add_key( "key-subpos-up", KEY_SUBPOS_UP, NULL, + SUBPOS_UP_KEY_TEXT, SUBPOS_UP_KEY_LONGTEXT, true ) + add_key( "key-subpos-down", KEY_SUBPOS_DOWN, NULL, + SUBPOS_DOWN_KEY_TEXT, SUBPOS_DOWN_KEY_LONGTEXT, true ) add_key( "key-audiodelay-up", KEY_AUDIODELAY_UP, NULL, AUDIODELAY_UP_KEY_TEXT, AUDIODELAY_UP_KEY_LONGTEXT, true ) add_key( "key-audiodelay-down", KEY_AUDIODELAY_DOWN, NULL, @@ -2685,7 +2760,7 @@ vlc_module_begin () change_short( 'p' ) change_internal () change_unsaveable () - add_bool( "ignore-config", false, NULL, IGNORE_CONFIG_TEXT, "", false ) + add_bool( "ignore-config", true, NULL, IGNORE_CONFIG_TEXT, "", false ) change_internal () change_unsaveable () add_bool( "save-config", false, NULL, SAVE_CONFIG_TEXT, "", @@ -2755,6 +2830,8 @@ const struct action libvlc_actions[] = { "key-vol-mute", ACTIONID_VOL_MUTE, }, { "key-subdelay-down", ACTIONID_SUBDELAY_DOWN, }, { "key-subdelay-up", ACTIONID_SUBDELAY_UP, }, + { "key-subpos-down", ACTIONID_SUBPOS_DOWN, }, + { "key-subpos-up", ACTIONID_SUBPOS_UP, }, { "key-audiodelay-down", ACTIONID_AUDIODELAY_DOWN, }, { "key-audiodelay-up", ACTIONID_AUDIODELAY_UP, }, { "key-audio-track", ACTIONID_AUDIO_TRACK, },