aboutsummaryrefslogtreecommitdiffhomepage
path: root/input
Commit message (Collapse)AuthorAge
* input: allow input.conf bindings to be declared as builtinGravatar wm42014-02-25
| | | | | | This might be helpful if we ever want cascading config files. Also, we will probably need it if we change the default input.conf bindings, and want to provide compatibility input.conf files.
* command: fix loadfile commandGravatar wm42014-02-24
| | | | | | | | | | | | | | | This was broken by commit bb6b543812a724. Note that the original pull request was fine, but it was broken by my own stupidity when I was "improving" it. The problem is that the new loadfile argument was not considered optional anymore after my changes. The original pull request did handle this by setting .defval to a dummy value, but I removed that part. Fix it again by introducing a flag that designates that the parameter is optional. (I didn't want to add it to m_option.h, because technically, all options are optional, and it's not possible to have non-optional options.)
* command: provide per-file-options for loadfile commandGravatar xylosper2014-02-23
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Closes #575. Minor changes over original pull request.
* command: remove special casing for strings in input commandsGravatar wm42014-02-23
| | | | | | Until now, strings were the only allowed dynamically allocated argument type in input commands. Extend it so that it works for any type. (The string expansion in command.c is of course still string specific.)
* input: check for abort cmd in multi-commandsGravatar wm42014-02-20
| | | | | | | | | MP_CMD_COMMAND_LIST commands (used to implement key bindings with multiple commands) were not checked for abort commands. Implement it. Remove the remarks about multi-commands being special from the manpage. Seek coalescing is handled differently now, and the issue with abort commands is fixed with this commit.
* input: ignore modifiers when releasing keysGravatar James Ross-Gowan2014-02-20
| | | | | This prevents keys from getting stuck if the modifier is released before the base key.
* input, dvdnav: fix osc stealing input from dvdnavGravatar wm42014-02-19
| | | | | | | | | | This is a regression introduced from moving Lua scripts (including the OSC) to their own threads. Now OSC and dvdnav can add their bindings at the same time without coordination, which seems to result in the OSC winning most time, and thus overriding the dvdnav menu bindings. Fix this by adding a flag that makes dvdnav menu bindings take priority over all other bindings.
* input: minor simplification for --input-testGravatar wm42014-02-19
|
* input: debug output for registered bindingsGravatar wm42014-02-17
|
* input: don't let builtin bindings overwrite user bindingsGravatar wm42014-02-17
| | | | | This was already done, except when the bindings were in different input sections. This commit fixed it. Useful for scripts, probably.
* client API: add a client message eventGravatar wm42014-02-17
| | | | | This comes with a "script_message" input command, which sends these messages. Used by the following commits.
* keycodes: add const to a function argumentGravatar wm42014-02-17
|
* threads: add wrapper for initializing recursive mutexesGravatar wm42014-01-31
| | | | Damn this overly verbose pthread API.
* input: change mp_input_run_cmd signatureGravatar wm42014-01-04
| | | | | | | | I don't like this function at all, but it's basically a trick to get the input's mp_log instance in a case the mp_input_parse_cmd_strv() is almost certainly not going to output anything. But still make it somewhat more consistent with mp_input_parse_cmd_strv() - why force the caller to always use MP_ON_OSD_AUTO?
* video/out: remove some code duplication between X11 and waylandGravatar wm42014-01-04
| | | | | | Both X11 and Wayland support the same format for drag & drop operations (text/uri-list), and the code for that was copied from x11_common.c to wayland_common.c. Factor it out.
* input: move files drag and drop to a new event.c fileGravatar Stefano Pigozzi2014-01-04
| | | | | event.c will be used to feed the input queue with 'global' events that don't mesh well with the usual check_events path in mpv.
* input: use bstr_xappend()Gravatar wm42013-12-30
| | | | To get rid of mp_append_utf8_buffer().
* common: simplify and optimize string escape parsingGravatar wm42013-12-30
| | | | | | | | | | | This code is shared between input.conf parser and option parser. Until now, the performance didn't really matter. But I want to use this code for JSON parsing too, and since JSON will have to be parsed a lot, it should probably try to avoid realloc'ing too much. This commit moves parsing of C-style escaped strings into a common function, and allows using it in a way realloc can be completely avoided, if the already allocated buffer is large enough.
* input: print an error if reading input.conf failsGravatar wm42013-12-28
| | | | | | stream_read_complete() fails if the file is larger than the requested maximum size. But input.c didn't check for this case, and no indication that something went wrong was printed.
* options: simplify handling of some help optionsGravatar wm42013-12-26
|
* input: cosmetics: move code aroundGravatar wm42013-12-26
| | | | Rearrange the code in an attempt to make its organization more logical.
* input: split off some code from input.c to separate filesGravatar wm42013-12-26
| | | | This is mostly just moving code around.
* msg: rename mp_msg_log -> mp_msgGravatar wm42013-12-21
| | | | Same for companion functions.
* msg: convert defines to enumGravatar wm42013-12-21
| | | | Also get rid of MSGL_HINT and the many MSGL_DBG* levels.
* path lookup functions: mp_msg conversionsGravatar wm42013-12-21
| | | | | | | | | | | | | | | | | There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c.
* stream: mp_msg conversionsGravatar wm42013-12-21
| | | | We also drop some slave mode stuff from stream_vcd.
* m_option, m_config: mp_msg conversionsGravatar wm42013-12-21
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* input: rework how input sources are addedGravatar wm42013-12-21
| | | | | | | | | | | | | | Until now, there were two functions to add input sources (stuff like stdin input, slave mode, lirc, joystick). Unify them to a single function (mp_input_add_fd()), and make sure the associated callbacks always have a context parameter. Change the lirc and joystick code such that they take store their state in a context struct (probably worthless), and use the new mp_msg replacements (the point of this refactoring). Additionally, get rid of the ugly USE_FD0_CMD_SELECT etc. ifdeffery in the terminal handling code.
* input: make parse_cmd_strv take const argsGravatar Martin Herkt2013-12-20
|
* input, lua: add functions to take pre-split input commandsGravatar wm42013-12-20
| | | | | | | | | | | | | | So you can pass a command as list of strings (each item is an argument), instead of having to worry about escaping and such. These functions also take an argument for the default command flags. In particular, this allows setting saner defaults for commands sent by program code. Expose this to Lua as mp.send_commandv command (suggestions for a better name welcome). The Lua version doesn't allow setting the default command flags, but it can still use command prefixes. The default flags are different from input.conf, and disable OSD and property expansion.
* Rename getch2....c/h to terminal....c/hGravatar wm42013-12-19
| | | | | "getch2" really tells nothing about what the heck this code does. It'd be even worse when moving the rest of terminal handling code there.
* command: remove radio commandsGravatar wm42013-12-19
| | | | | | | Remove these because I'm too lazy to convert them to proper STREAM_CTRLs. Considering that probably nobody uses radio://, caring about this is a complete waste of time. I will add these commands back if someone asks for them, but I don't expect this to happen.
* Split mpvcore/ into common/, misc/, bstr/Gravatar wm42013-12-17
|
* Move options/config related files from mpvcore/ to options/Gravatar wm42013-12-17
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Move mpvcore/input/ to input/Gravatar wm42013-12-17
|
* Rename directories, move files (step 1 of 2) (does not compile)Gravatar wm42012-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'osd_changes' into masterGravatar wm42012-11-01
|\ | | | | | | | | Conflicts: DOCS/man/en/options.rst
* | input: minor simplificationGravatar wm42012-11-01
| |
* | input: fix off-by-one errorGravatar reimar2012-10-31
| | | | | | | | | | | | | | | | | | | | | | | | Fix off-by-one error in range check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35302 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: input/input.c This code is already quite different from mplayer-svn, but still the same bug.
| * screenshot: change "screenshot" input commandGravatar wm42012-10-24
| | | | | | | | | | | | | | "screenshot" now maps to "screenshot subtitles" by default, instead of "screenshot video". Swap the argument order: the more useful argument should come first. Remove the compatibility aliases for numeric choices (e.g. "screenshot 1 0" won't work anymore).
| * screenshot: allow taking screenshots with subtitlesGravatar wm42012-10-24
|/ | | | | | | | | | | | | | This adds a new screenshot mode "subtitles", which basically takes the video frame as decoded, and renders subtitles into it. This may fail for some pixel formats, because libswscale sucks. If this becomes ever a real problem, the code could be changed to convert the image to RGBA first (or whatever the image writer wants), and then render the subtitles into it. This would avoid the additional image copy needed with vo_xv too. But for now, it seems better to go with the current method in the common case: vo_opengl creates an image copy anyway, and drawing bitmaps to yv12 is better, as no color space conversion is involved in draw_bmp.c's up/downsampling conversion.
* input: fix mp_cmd memory leakGravatar wm42012-10-14
| | | | | mp_input_feed_key() didn't free the command, if it was discarded due to the queue exceeding its maximum size.
* input: minor simplification to mp_input_get_cmd()Gravatar wm42012-10-14
|
* input: add input test modeGravatar wm42012-10-14
| | | | | | | | | | | In input test mode, key bindings won't be executed, but are shown on the OSD. The OSD includes various information, such as the name of the key, the command itself, whether it's builtin, and the config file location it was defined. The input test mode can be enabled with "--input=test". No effort is spent trying to react to key bindings that normally exit the player; they are treated just like any other binding.
* input: track location info for input commandsGravatar wm42012-10-14
| | | | | | If parsing a command fails, its location is printed. The location is the path to the input.conf, and the line number of the key binding and the associated input command.
* input: don't warn on commands for disabled optional featuresGravatar wm42012-10-14
| | | | | | | | | Always recognize input commands for optional features (like TV commands etc.). If these features are disabled, the commands are parsed, but simply do nothing. This fixes annoying warnings on start with the default/builtin input.conf, if certain optional features are not compiled.
* Merge branch 'input_changes' into masterGravatar wm42012-10-12
|\ | | | | | | | | | | | | | | Conflicts: DOCS/man/en/vo.rst etc/input.conf input/input.c m_property.c
* | Rename to "mpv"Gravatar wm42012-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * commands: use "up" and "down" as 2nd argument for cycle commandGravatar wm42012-10-12
| | | | | | | | | | | | | | | | | | | | | | Allow the values "up" and "down" as step argument for the cycle input command. Previously, this argument was a float, which specified an arbitrary step value and direction (similar to the add command). Instead of "1" and "-1", "up" and "down" is to be used. Float values are still accepted. That capability might be removed in the future, as there's probably hardly any actual use for arbitrary step values.
| * commands: add print_text input command to print text on the terminalGravatar wm42012-10-12
| | | | | | | | | | In theory, this could take over the role of the get_property slave command, and is more general.