aboutsummaryrefslogtreecommitdiffhomepage
path: root/input
Commit message (Collapse)AuthorAge
...
* player: use 4 as process exit code on user quitsGravatar wm42015-06-10
| | | | | | | | | | | | | So successful playback and user quit can be distinguished, for whatever reason you may want to do this. Normally, the "quit" command can be customized, but this does not work for quit commands sent by the terminal signal handler. One solution would be introducing something like "ON_SIGNAL" (equivalent to "CLOSE_WIN"), but considering there are a bunch of possible signals, I'd rather not get into this. So go with the dumb solution. Probably fixes #2029.
* command: remove deprecated get_property commandGravatar wm42015-05-27
| | | | | | This command has been deprecated in the 0.8.x and 0.9.x releases - get rid of it. Its only point ever was MPlayer compatibility, which broke years ago anyway.
* input: remove some unneeded thingsGravatar wm42015-05-26
| | | | | Wakeup FDs are not needed anymore (this code exists only for libwaio usage by now), and 2 other functions can be made private.
* input: allow - as separator between commands, instead of _Gravatar wm42015-05-25
| | | | | | | | | | Wnile it seems quite logical to me that commands use _ as word separator, while properties use -, I can't really explain the difference, and it tends to confuse users as well. So always prefer - as separator for everything. Using _ still works, and will probably forever. Not doing so would probably create too much chaos and confusion.
* input: add relative percentage seekGravatar rrooij2015-05-19
| | | | | | | | | | | Only absolute percentage seeking was permitted first. It is now also possible to seek by relative percentage. MPSEEK_FACTOR is used as seek_type. Fixes #1950. Signed-off-by: wm4 <wm4@nowhere>
* command: add playlist_shuffle commandGravatar wm42015-05-17
| | | | Fixes #965.
* ipc: avoid SIGPIPEGravatar wm42015-05-12
| | | | | | | | | Until now, we just blocked SIGPIPE globally. Fix it properly to get away from it. MSG_NOSIGNAL should be widely available and is part of the POSIX.1-2008 standard. But it's not available on OSX, because Apple is both evil and retarded. Thus we continue to ignore the problem on such shitty systems.
* input: filter out redundant mp_input_set_mouse_pos() callsGravatar wm42015-05-08
| | | | Prevents the OSC from showing up on start on Cocoa.
* ipc: silence some common info messagesGravatar wm42015-05-05
| | | | | | They are not really interesting. At least one user complained about the noise resulting from use with shell scripts, which connect and disconnect immediately.
* command: change the default action for rescan_external_filesGravatar wm42015-04-28
| | | | | | | | Now the rescan_external_files command will by default reselect the audio and subtitle streams. This should be more intuitive. Client API users and Lua scripts might break, but can be fixed in a backward-compatible way by setting the mode explicitly.
* client API: add a screenshot_raw commandGravatar wm42015-04-20
| | | | | | | | | Requested. The wild code for setting up the mpv_node probably deserves to be cleaned up later. Fixes #1800.
* Update license headersGravatar Marcin Kurczewski2015-04-13
| | | | Signed-off-by: wm4 <wm4@nowhere>
* options: add M_OPT_FILE to --input-confGravatar Philip Sequeira2015-03-31
| | | | | Someday I'll look through all the options and find whatever else is missing it...
* input: remove Linux joystick supportGravatar wm42015-03-24
| | | | | | | | | | | Why did this exist in the first place? Other than being completely useless, this even caused some regressions in the past. For example, there was the case of a laptop exposing its accelerometer as joystick device, which led to extremely fun things due to the default mappings of axis movement being mapped to seeking. I suppose those who really want to use their joystick to control a media player (???) can configure it as mouse device or so.
* input: remove classic LIRC supportGravatar wm42015-03-24
| | | | It's much easier to configure remotes as X11 input devices.
* input: use flag option type for some input commandsGravatar wm42015-03-04
| | | | | | | | | | This gets rid of the need for a second (or more) parameters; instead it can be all in one parameter. The (now) redundant parameter is still parsed for compatibility, though. The way the flags make each other conflict is a bit tricky: they have overlapping bits, and the option parser disallows setting already set bits.
* input: remove numeric compatibility parameters from commandsGravatar wm42015-03-04
| | | | | | MPlayer requires numeric values for input command parameters. mplayer2 also did. mpv changed these to choices using symbolic strings a long time ago, but left numeric choices for compatibility.
* input: handle closed pipe correctlyGravatar wm42015-02-26
|
* input: if FD is not writable, just don't write to the FDGravatar wm42015-02-26
| | | | This is for the case if the FD is a uni-directional pipe.
* input: allow passing FDs to --input-fileGravatar wm42015-02-26
|
* input: avoid creating world-writeable file with --input-unix-socketGravatar wm42015-02-26
| | | | | This requires fchmod(), which is not necessarily available everywhere. It also might not work at all. (It does work on Linux.)
* input: minor cleanupGravatar wm42015-02-18
| | | | | | | Add MP_KEY_MOUSE_ENTER to the ignored input if the user has disabled mouse input. Remove one instance of code duplication, and add a MP_KEY_IS_MOUSE_MOVE macro to summarize events that are caused by moving the mouse.
* input: add MOUSE_ENTER keybinding.Gravatar torque2015-02-18
| | | | Signed-off-by: wm4 <wm4@nowhere>
* command: add rescan_external_filesGravatar wm42015-02-16
| | | | | | | | | Requested. Hopefully will be useful for things that download and add external subtitles on demand. Or something. Closes #1586.
* x11: add XK_Cancel to the list of special keysGravatar Martin Herkt2015-02-14
| | | | | Some IR receivers emit this key by default for remote control buttons. Make it mappable.
* x11: make all XF86 special keys mappableGravatar wm42015-02-13
| | | | | | | | Makes all keys documented in XF86keysym.h mappable. This requires the user to deal with numeric keycodes; no names are queried or exported. This is an easy way to avoid adding all the hundreds of XF86 keys to our X11 lookup table and mpv's keycode/name list.
* ipc: put playback core to sleep while dequeuing commandsGravatar wm42015-02-13
| | | | | | | Happens to fix #1581 due to an unfortunate interaction with the way the VO does not react to commands for a while if a video frame is queued. Slightly improves other situations as well, if the client spams mpv with commands during playback.
* command: new commands audio_add/audio_remove/audio_reloadGravatar xylosper2015-02-03
| | | | | | | | These commands are counterparts of sub_add/sub_remove/sub_reload which work for external audio file. Signed-off-by: wm4 <wm4@nowhere> (minor simplification)
* input: fix dangling pointerGravatar wm42015-01-25
| | | | Removes undefined behavior that showed up as crap when running with -v.
* input, player: new command for mouse eventGravatar xylosper2015-01-23
| | | | | | | New command `mouse <x> <y> [<button> [single|double]]` is introduced. This will update mouse position with given coordinate (`<x>`, `<y>`), and additionally, send single-click or double-click event if `<button>` is given.
* input: handle mixing key press and up/down events betterGravatar wm42015-01-23
|
* client API: reasonable behavior if window is closedGravatar wm42015-01-12
| | | | | | | | | | | | | | | | Closing the video window sends CLOSE_WIN, which is normally mapped to the "quit" command. The client API normally disables all key bindings, and closing the window does nothing. It's simply left to the application to handle this. This is fine - an embedded window can not be destroyed by user interaction. But sometimes, the window might be destroyed anyway, for example because the containing window is destroyed. If this happens, CLOSE_WIN should better not be ignored. We can't expect client API users to handle this specially (by providing their own input.conf), so provide some fallback for this pseudo key binding. The "quit" command might be too intrusive (not every client necessarily handles "unexpected" MPV_EVENT_SHUTDOWN), but I think it's still reasonable.
* ipc: add enable_event and disable_event commandsGravatar wm42014-12-24
| | | | This was requested.
* ipc: report some user errors betterGravatar wm42014-12-24
| | | | | | | | | | | | | | | Using the IPC with a program, it's not often obvious that a newline must be sent to terminate a command. Print a warning if the connection is closed while there is still uninterpreted data in the buffer. Print the OS reported error if reading/writing the socket fails. Print an erro if JSON parsing fails. I considered silencing write errors if the write end is closed (EPIPE), because a client might send a bunch of commands, and then close the socket without wanting to read the reply. But then, mpv disconnects without reading further commands that might still be buffered, so it's probably a good idea to always print the error.
* command: extend revert_seek commandGravatar wm42014-12-17
| | | | | "revert_seek mark" basically forces the seekback point. It's basically a one-way bookmark.
* client API: be more lenient about mpv_suspend/resume mismatchesGravatar wm42014-12-15
| | | | | | | | | | | | Before this commit, this was defined to trigger undefined behavior. This was nice because it required less code; but on the other hand, Lua as well as IPC support had to check these things manually. Do it directly in the API to avoid code duplication, and to make the API more robust. (The total code size still grows, though...) Since all of the failure cases were originally meant to ruin things forever, there is no way to return error codes. So just print the errors.
* pipe-win32: possible fix for Windows XP deadlockGravatar James Ross-Gowan2014-12-11
| | | | | This fixes a hang with the VirtualBox OpenGL drivers. It might help with #1325 as well.
* input: add a hack to fix keyboard navigation with dvd/bd menuGravatar wm42014-12-04
| | | | | | | | | | If the user has LEFT/RIGHT/etc. bound in his input.conf, then these were overriding the menu keys in dvdnav mode. This hack works because the dvdnav crap happens to be the only user of MP_INPUT_ON_TOP. If it finds a default key binding in the dvdnav menu section, it will use that, instead of continuing search and possibly finding the user key bindings meant for normal playback.
* input, lua: make removing key bindings workGravatar wm42014-12-03
| | | | | | This just kept adding bindings to the input section, rather than defining it. One bad effect was that mp.remove_key_binding() in Lua didn't work.
* Do not call strerror()Gravatar wm42014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | ...because everything is terrible. strerror() is not documented as having to be thread-safe by POSIX and C11. (Which is pretty much bullshit, because both mandate threads and some form of thread-local storage - so there's no excuse why implementation couldn't implement this in a thread-safe way. Especially with C11 this is ridiculous, because there is no way to use threads and convert error numbers to strings at the same time!) Since we heavily use threads now, we should avoid unsafe functions like strerror(). strerror_r() is in POSIX, but GNU/glibc deliberately fucks it up and gives the function different semantics than the POSIX one. It's a bit of work to convince this piece of shit to expose the POSIX standard function, and not the messed up GNU one. strerror_l() is also in POSIX, but only since the 2008 standard, and thus is not widespread. The solution is using avlibc (libavutil, by its official name), which handles the unportable details for us, mostly. We avoid some pain.
* input: simplifyGravatar wm42014-11-24
|
* lua: always handle key repeat on the script sideGravatar wm42014-11-24
| | | | | | Simpler, and leaves the decision to repeat or not fully to the script (instead of requiring the user to care about it when remapping a script binding).
* lua, ipc: remove leftoversGravatar wm42014-11-24
| | | | | | MPV_EVENT_SCRIPT_INPUT_DISPATCH is now unused/deprecated. Also remove a debug-print from defaults.lua.
* command: don't queue framestepsGravatar wm42014-11-23
| | | | | If repeated framestep commands are sent, just unpause the player, instead of playing N frames for N repeated commands.
* input, lua: redo input handlingGravatar wm42014-11-23
| | | | | Much of it is the same, but now there's the possibility to distinguish key down/up events in the Lua API.
* input: set mouse area by default for all inputGravatar wm42014-11-23
| | | | | | | | | | Otherwise, mouse button bindings added by mp.add_key_binding() would be ignored. It's possible that this "breaks" some older scripts using undocumented Lua script functions, but it should be safe otherwise. Fixes #1283.
* Remove some unneeded NULL checksGravatar wm42014-11-21
| | | | Found by Coverity; also see commit 85fb2af3.
* ipc: fix confusion of write() return value and errnoGravatar wm42014-11-21
| | | | Found by Coverity.
* input: add a prefix to make any binding act on key repeatGravatar wm42014-11-20
| | | | | | The fact that it's a generic command prefix that is parsed even when using the client API is a bit unclean (because this flag makes sense for actual key-bindings only), but it's less code this way.
* command: add drop_buffersGravatar wm42014-11-20
| | | | | | | | | | | | | | | This command was actually requested on IRC ages ago, but I forgot about it. The main purpose is that the decoding state can be reset without issuing a seek, in particular in situations where you can't seek. This restarts decoding from the middle of the packet stream; since it discards the packet buffer intentionally, and the decoder will typically not output "incomplete" frames until it has recovered, it can skip a large amount of data. It doesn't clear the byte stream cache - I'm not sure if it should.