1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 10:02:17 +00:00
mpv/defaultopts.c

79 lines
2.1 KiB
C
Raw Normal View History

#include <stddef.h>
#include "config.h"
#include "defaultopts.h"
#include "options.h"
#include "mixer.h"
void set_default_mplayer_options(struct MPOpts *opts)
{
*opts = (const struct MPOpts){
.audio_driver_list = NULL,
.video_driver_list = NULL,
.fixed_vo = 1,
.softvol = SOFTVOL_AUTO,
.softvol_max = 200,
.ao_buffersize = -1,
.vo_wintitle = "mpv - ${media-title}",
2008-05-01 08:14:29 +00:00
.monitor_pixel_aspect = 1.0,
.vo_panscanrange = 1.0,
.cursor_autohide_delay = 1000,
2008-04-25 04:12:05 +00:00
.vo_gamma_gamma = 1000,
.vo_gamma_brightness = 1000,
.vo_gamma_contrast = 1000,
.vo_gamma_saturation = 1000,
.vo_gamma_hue = 1000,
.osd_level = 1,
.osd_duration = 1000,
2008-04-21 02:18:40 +00:00
.loop_times = -1,
2009-04-07 23:37:27 +00:00
.ordered_chapters = 1,
.chapter_merge_threshold = 100,
.stream_cache_min_percent = 20.0,
.stream_cache_seek_min_percent = 50.0,
.chapterrange = {-1, -1},
.edition_id = -1,
2008-04-16 04:11:12 +00:00
.user_correct_pts = -1,
.initial_audio_sync = 1,
.term_osd = 2,
.consolecontrols = 1,
.doubleclick_time = 300,
.audio_id = -1,
.video_id = -1,
.sub_id = -1,
.sub_visibility = 1,
.extension_parsing = 1,
.audio_output_channels = 2,
.audio_output_format = -1, // AF_FORMAT_UNKNOWN
2008-04-21 03:55:23 +00:00
.playback_speed = 1.,
.drc_level = 1.,
2008-04-24 04:36:43 +00:00
.movie_aspect = -1.,
.flip = -1,
2008-04-24 05:20:59 +00:00
.vd_use_slices = 1,
.sub_auto = 1,
#ifdef CONFIG_ASS
.ass_enabled = 1,
#endif
.ass_font_scale = 1,
.ass_vsfilter_aspect_compat = 1,
.ass_style_override = 1,
.use_embedded_fonts = 1,
.lavc_param = {
2008-04-24 00:59:21 +00:00
.workaround_bugs = 1, // autodetect
.error_concealment = 3,
},
.input = {
input: rework event reading and command queuing Rework much of the logic related to reading from event sources and queuing commands. The two biggest architecture changes are: - The code buffering keycodes in mp_fifo.c is gone. Instead key input is now immediately fed to input.c and interpreted as commands, and then the commands are buffered instead. - mp_input_get_cmd() now always tries to read every available event from every event source and convert them to (buffered) commands. Before it would only process new events until one new command became available. Some relevant behavior changes: - Before commands could be lost when stream code called mp_input_check_interrupt() which read commands (to see if they were of types that triggered aborts during slow IO tasks) and then threw them away. This was especially an issue if cache was enabled and slow to read. Fixed - now it's possible to check whether there are queued commands which will abort playback of the current file without throwing other commands away. - mp_input_check_interrupt() now prints a message if it returns true. This is especially useful because the failures caused by aborted stream reads can trigger error messages from other code that was doing the read; the new message makes it more obvious what the cause of the subsequent error messages is. - It's now possible to again avoid making stdin non-blocking (which caused some issues) without reintroducing extra latency. The change will be done in a subsequent commit. - Event sources that do not support select() should now have somewhat lower latency in certain situations as they will be checked both before and after select()/sleep in input reading; before the sleep always happened first even if such sources already had queued input. Before the key fifo was also handled in this manner (first key triggered select, but if multiple were read then rest could be delayed; however in most cases this didn't add latency in practice as after central code started doing command handling it queried for further commands with a max sleep time of 0). - Key fifo limiting is more accurate now: it now counts actual commands intead of keycodes, and all queued keys are read immediately from input devices so they can be counted correctly. - Since keypresses are now interpreted immediately, commands which change keybindings will no longer affect following keypresses that have already been read before the command is executed. This should not be an issue in practice with current keybinding behavior.
2011-07-17 01:47:50 +00:00
.key_fifo_size = 7,
2008-04-30 15:57:02 +00:00
.ar_delay = 100,
.ar_rate = 8,
.use_joystick = 1,
.use_lirc = 1,
.use_lircc = 1,
#ifdef CONFIG_APPLE_REMOTE
2008-04-30 15:57:02 +00:00
.use_ar = 1,
#endif
2009-03-31 23:26:34 +00:00
.default_bindings = 1,
2008-04-30 15:57:02 +00:00
}
};
}