summaryrefslogtreecommitdiffstats
path: root/defaultopts.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-77/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* vd_ffmpeg: disable codec direct rendering and slices by defaultwm42012-11-071-1/+0
| | | | | | | | | | | | | | | This caused failures when doing single threaded decoding in some cases. It's unknown what exactly the reasons are for these failures, but direct rendering is probably worthless anyway. Disable slices by default as well, just to be sure not to invoke broken code paths. Multithreading disables these too. The old behavior can be restored by passing the -dr1 -slices command line options. (-dr1 is left undocumented intentionally.) Multithreaded decoding worked fine, because vd_ffmpeg.c automatically disables direct rendering in this case.
* core: show quvi page title in window title, clean up libquvi handlingwm42012-10-141-1/+1
| | | | | | | | | | | | | | | | | Clean up handling of libquvi (which resolves URLs of streaming sites into URLs to the actual media playable by mpv). Move the code out of open.c to quvi.c, and invoke it explicitly from mplayer.c, instead of trying to resolve every filename passed to open_stream(). This allows easily passing metadata from the quvi context to the frontend. Expose QUVIPROP_PAGETITLE as "media-title" property, and use that instead of "filename" for the mplayer window title. (For YouTube, this is the video title.) It's cleaner too. Handle a potential reliability issue: check quvi_getprop return values. Since open.c contains barely anything but the open_stream() stub, move that to stream.c and delete open.c.
* Merge branch 'input_changes' into masterwm42012-10-121-0/+1
|\ | | | | | | | | | | | | | | Conflicts: DOCS/man/en/vo.rst etc/input.conf input/input.c m_property.c
| * sub: add --ass-style-override option to disable style overrideswm42012-10-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of options which modify ASS subtitle rendering. Most of these do things that can interfere with the styling done by subtitle scripts, resulting in incorrect rendering. Add the --ass-style-override option to make it easy to disable all overrides. This helps trouble- shooting, and makes it more practical to use the override features. (You can simply toggle the ass-style-override property at runtime, should one of the style override options break subtitle rendering at a certain point.) This mainly affects whether most --ass-* options are applied, as well as --sub-pos. Some things, like explicit style overrides loaded with --ass-force-style, can't be changed at runtime using the ass-style-override property.
* | Rename to "mpv"wm42012-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the name of this project to mpv. Most user-visible mentions of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the default config file location are changed as well. The new default config file location is: ~/.mpv/ Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI, which has been removed from mplayer2 ages ago. We don't have a logo, and the MS Windows resource files sort-of require one, so leave etc/mplayer.ico/.xpm as-is. Remove the debian and rpm packaging scripts. These contained outdated dependencies and likely were more harmful than useful. (Patches which add working and well-tested packaging are welcome.)
* | softvol, ao_pulse: prefer ao_pulse volume control by defaultwm42012-09-231-1/+2
|/ | | | | | | | | | | | | | | | | | --softvol is enabled by default. For most audio outputs, this is a good thing, as they have either their own (bad) soft volume implementation, or control the system mixer. With ao_pulse, the situation is a bit different: it supports per-application volume (i.e. volume control is not really global). More importantly, ao_pulse uses a rather large audio buffer, and changing the volume with mplayer's volume filter has a large delay. With the native ao_pulse volume control, it's instant, because PulseAudio's audio filtering happens at a later stage in its processing pipeline (inaccessible for mplayer). This means native volume control should really be allowed for ao_pulse, while it's the reverse for other audio outputs. Make --softvol a choice option, and add a new "auto" choice. This is default and will use PA's volume control with ao_pulse, and mplayer's volume filter otherwise (i.e. the old softvol behavior).
* mplayer: unbreak OSD with CONFIG_ENCODING undefinedwm42012-09-181-1/+1
| | | | | | | | | | | | | | Basically, the encoding code path wanted to set osdlevel=0 as default, while normal playback needs osdlevel=1. For this purpose, osdlevel was set to -1 (i.e. invalid) initially to detect whether the --osdlevel option was explicitly set. When encoding was not configured (CONFIG_ENCODING undefined), the osdlevel value was not set from -1 to 1 properly, and the OSD remained invisible by default. Fix this by getting rid of this logic. It shouldn't be needed, since osdlevel=1 never shows any OSD messages without user interaction. Should this ever change, we could still check whether encoding is in progress, or add another option to allow OSD rendering during encoding.
* encode: video encoding now supported using mencoder-like optionsRudolf Polzer2012-09-181-1/+1
|
* subs: always use sub decoder framework for libass renderingUoti Urpala2012-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | Remove subtitle selection code setting osd->ass_track directly and vf_ass/vf_vo code rendering the track directly with libass. Instead, do track selection and rendering with dec_sub.c functions. Before, mpctx->set_of_ass_tracks[] contained bare libass tracks generated from external subtitle files. For use with dec_sub.c, it now contains struct sh_sub instances with decoder already initialized. This commit breaks the sub_step command ('g' and 'y' keys) for libass-rendered subtitles. It could be fixed, but it's so useless - especially as with the existing implementation there's no practical way to get subtitle delay back to normal after using it - that I didn't bother. Conflicts: command.c mp_core.h mplayer.c
* image_writer: add option parsingwm42012-08-061-2/+0
| | | | | image_writer now provides its own option parsing, and screenshot.c and the mplayer frontend use it.
* mplayer: expand --title as property, remove --use-filename-titlewm42012-08-021-0/+1
| | | | | | | | | The --title option, which sets the GUI window caption, is now expanded as slave mode property string (like osd_show_property_text). Make the default value for --title include the filename. This makes a behavior similar to --use-filename-title the default. Remove the --use-filename-title option, as it's redundant now.
* mixer: make softvol default, and raise softvol-max to 200wm42012-07-301-1/+2
| | | | mplayer is not a mixer control panel.
* Merge remote-tracking branch 'origin/master'wm42012-07-281-3/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore bstr.c cfg-mplayer.h defaultopts.c libvo/video_out.c The conflict in bstr.c is due to uau adding a bstr_getline function in commit 2ba8b91a97e7e8. This function already existed in this branch. While uau's function is obviously derived from mine, it's incompatible. His function preserves line breaks, while mine strips them. Add a bstr_strip_linebreaks function, fix all other uses of bstr_getline, and pick uau's implementation. In .gitignore, change vo_gl3_shaders.h to use an absolute path additional to resolving the merge conflict.
| * options: support parsing values into substructsUoti Urpala2012-07-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an alternate mode for option parser objects (struct m_config) which is not inherently tied to any particular instance of an option value struct. Instead, this type or parsers can be used to initialize defaults in or parse values into a struct given as a parameter. They do not have the save slot functionality used for main player configuration. The new functionality will be used to replace the separate subopt_helper.c parsing code that is currently used to parse per-object suboptions in VOs etc. Previously, option default values were handled by initializing them in external code before creating a parser. This initialization was done with constants even for dynamically-allocated types like strings. Because trying to free a pointer to a constant would cause a crash when trying to replace the default with another value, parser initialization code then replaced all the original defaults with dynamically-allocated copies. This replace-with-copy behavior is no longer supported for new-style options; instead the option definition itself may contain a default value (new OPTDEF macros), and the new function m_config_initialize() is used to set all options to their default values. Convert the existing initialized dynamically allocated options in main config (the string options --dumpfile, --term-osd-esc, --input=conf) to use this. Other non-dynamic ones could be later converted to use this style of initialization too. There's currently no public call to free all dynamically allocated options in a given option struct because I intend to use talloc functionality for that (make them children of the struct and free with it).
* | Merge remote-tracking branch 'origin/master'wm42012-04-011-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bstr.c bstr.h etc/input.conf input/input.c input/input.h libao2/ao_pulse.c libmpcodecs/vf_ass.c libmpcodecs/vf_vo.c libvo/gl_common.c libvo/x11_common.c mixer.c mixer.h mplayer.c
| * options, x11+cocoa: add option --cursor-autohide-delayStefano Pigozzi2012-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add option --cursor-autohide-delay to control the number of milliseconds with no user interaction before the mouse cursor is hidden. There are two negative values with useful special meanings: * A value of -1 prevents the cursor from hiding (useful for users with multiple displays). * A value of -2 prevents the cursor from showing upon activity. The default is 1 second to keep the behaviour consistent with the past X11 backend implementation. Remove the vo_mouse_autohide field as it was always true.
| * options: move mixer.h options to structUoti Urpala2012-03-201-0/+1
| |
* | Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-051-1/+0
|\| | | | | | | | | | | Conflicts: mplayer.c screenshot.c
| * Update Libav API usesUoti Urpala2012-02-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change various code to use the latest Libav API. The libavcodec error_recognition setting has been removed and replaced with different semantics. I removed the "--lavdopts=er=<value>" option accordingly, as I don't think it's widely enough used to be worth attempting to emulate the old option semantics using the new API. A new option with the new semantics can be added later if needed. Libav dropped APIs that were necessary with all Libav versions until quite recently (like setting avctx->age), and it would thus not be possible to keep compatibility with previous Libav versions without adding workarounds. The new APIs also had some bugs/limitations in the recent Libav release 0.8, and it would not work fully (at least some avcodec options would not be set correctly). Because of those issues, this commit makes no attempt to maintain compatibility with anything but the latest Libav git head. Hopefully the required fixes and improvements will be included in a following Libav point release.
* | screenshot: add png compression settingwm42012-01-181-0/+1
| | | | | | | | | | | | | | | | The default compression setting is 7, which is hopefully a good balance between speed of compression, and resulting file sizes. The maximum png compression will be very slow even on fast computers. On the other hand, the lowest compression setting produces files of several MB size with normal video resolutions, which should be avoided as well.
* | screenshot: add jpg supportwm42012-01-181-0/+1
| | | | | | | | | | | | The screenshot image file type can now be selected with the --screenshot-filetype option. The --screenshot-jpeg-quality option controls the compression setting of the written JPEG image file.
* | osd: add setting to display OSD always on terminalwm42012-01-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the option --term-osd=force will cause mplayer to display all OSD messages on the terminal, even if there is video. Possible values for --term-osd: - auto: use video OSD, or of there's no video, the terminal (default) - off: always use video for OSD - force: always use terminal for OSD -term-osd and --term-osd are equivalent to --term-osd=force. This changes the meaning of the option, since -term-osd used to enable the OSD default behavior, i.e. --term-osd=auto. -noterm-osd has the same effect as --term-osd=off, and is kept for compatibility. Implementation note: The location for the OSD text was shared between the two code paths (it was in osd_state.osd_text). We can't rely on the fact that the video-OSD update code normally isn't run when --term-osd is called. When e.g. panscan is updated, the video OSD code will draw the OSD anyway. This would sometimes show unwanted OSD text on the video. Deal with this by putting the current terminal-OSD text in a different place (in MPContext.terminal_osd_text) to deal with this.
* options: change --ass-hinting default to 0Uoti Urpala2011-12-071-1/+0
| | | | | | | With current typical video sizes, font sizes are large enough that they don't really need hinting (and particularly so for font sizes in display-resolution rendered subtitles in fullscreen mode), and hinting apparently causes problems with some fonts.
* options: move libass-related options to structUoti Urpala2011-09-031-0/+3
|
* options, subs: add --ass-vsfilter-aspect-compatharklu2011-08-121-0/+1
| | | | | | | | | Add option --ass-vsfilter-aspect-compat and corresponding property ass_vsfilter_aspect_compat. The setting controls whether to enable the emulation of traditional VSFilter behavior where subtitles are stretched if the video is anamorphic (previously always enabled for native SSA/ASS subtitles). Enabled by default. Add 'V' as a new default keybinding to toggle the property.
* input: rework event reading and command queuingUoti Urpala2011-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* options: move sub_name, sub_auto and vobsub_name to structClément Bœsch2011-04-201-0/+1
|
* Merge branch 'sub'Uoti Urpala2011-01-261-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sub: sub/OSD: move some related files to sub/ subtitles: options: enable -ass by default subtitles: change default libass rendering style demux_mkv, chapters: change millisecond arithmetic to ns cleanup: rename ass_* functions to mp_ass_* subs: use correct font aspect ratio for libass + converted subs cleanup: some random minor code simplification and cleanup vf_vo: fix EOSD change detection bug sd_ass: remove subreader use, support plaintext markup subtitles: style support for common SubRip tags and MicroDVD core: ordered chapters: fix bad subtitle parameter subs/demux: don't try to enable sub track when creating it subtitles/demux: store duration instead of endpts in demux packets subtitles: add framework for subtitle decoders options: add special -leak-report option subtitles: remove code trying to handle text subs with libavcodec cleanup: move MP_NOPTS_VALUE definition to mpcommon.h subtitles: move global ass_track to struct osd_state core: move most mpcommon.c contents to mplayer.c core: move global "subdata" and "vo_sub_last" to mpctx subtitles: remove sub_last_pts hack options: move -noconfig to option struct, simplify
| * subtitles: options: enable -ass by defaultUoti Urpala2011-01-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are still some problems with -ass. For example some other subtitle options won't work the same way or at all with it enabled, and inserting the video filter for VOs that lack native rendering support won't work with different colorspaces. However I think that the benefit from styling support outweights those disadvantages, and also that the "discoverability" of features is better this way; it will be easier for people who encounter problems to find -noass than for people who see no styling to find out that they could add it with -ass. Enable -ass by default. Also fix other outdated information in the manpage entries for -ass and -fontconfig.
| * cleanup: some random minor code simplification and cleanupUoti Urpala2011-01-261-2/+0
| |
* | cleanup: remove unused MEncoder-related codeClément Bœsch2011-01-251-6/+0
|/ | | | | Remove some code and variables that were no longer used after MEncoder removal. Also remove some MEncoder references in comments.
* vd_ffmpeg: set thread count to number of cores on machine by defaultUoti Urpala2010-12-201-1/+0
| | | | | | | | | | | Make "-lavdopts threads=0" mean an autodetected number of threads, and make that the default value of the option. Also increase the upper limit of the option from 8 to 16. Add new file osdep/numcores.c which tries to determine the number of cores available on the machine. numcores.c is based (heavily modified) on public domain numcpus.c by Philip Willoughby <pgw99@doc.ic.ac.uk>, downloaded from http://csgsoft.doc.ic.ac.uk/numcpus/
* core: ordered chapters: add heuristic for merging inaccurate chaptersUoti Urpala2010-11-261-0/+1
| | | | | | | | | | Some Matroska files have inaccurate ordered chapter endpoints, and so parts where one chapter should end and the next begin at the same timestamp were not merged. This resulted in an unnecessary seek over a minimal distance. Add a heuristic to merge parts with a minimal gap or overlap between them. Based on patch by Hector Martin <hector@marcansoft.com>.
* options: more mplayer.c options moved to option structClément Bœsch2010-11-141-0/+3
| | | | | | Following options were moved: autoq, benchmark, [no]term-osd, term-osd-esc, playing-msg, [no]idle, [no]consolecontrols, list-properties.
* core: do initial A-V sync by modifying audio streamUoti Urpala2010-11-131-0/+1
| | | | | | | Add code to enforce matching pts with video when (re)starting the audio stream, by either cutting away the first samples or inserting silence at the beginning. New option -noinitial-audio-sync can be used to disable this and return to old behavior.
* audio: add -gapless-audio optionUoti Urpala2010-11-121-0/+1
| | | | | | | | | If the option is enabled and all audio has been buffered to the AO, then the player will move to the next file without waiting for the buffered audio to drain, while leaving the AO initialized. If the playback of the next file starts quickly enough (before the AO buffer empties) then it should continue writing audio to the same AO with no gap in between.
* options: move -cache-min and cache-seek-min to option structClément Bœsch2010-11-111-0/+2
|
* options: move some demux options to option structClément Bœsch2010-11-111-0/+1
| | | | | Following options were moved: audiofile, audiofile-cache, subfile, demuxer, audio-demuxer, sub-demuxer, [no]extbased.