Previously messages that printed key/button names would have extra
names in button combinations appended after the main message,
resulting in output like:
No bind found for key 'MOUSE_BTN1'.-MOUSE_BTN3
Add a function that creates a complete combination name and use that
for all such messages. The above example changes to:
No bind found for key 'MOUSE_BTN1-MOUSE_BTN3'.
Other affected messages are a input.conf parsing error message and a
message about a bound command being invalid.
Increase the number of supported mouse buttons from 10 to 20. There
really seem to be input devices with at least 12.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33391 b3059339-0415-0410-9bf9-f77b7e298cf2
Neither fd 0 slave input (-slave) nor additional opened fds (-input
file=X) were set to nonblocking mode as they should have been. Fix.
Also rename the horribly generic USE_SELECT #define used for a
specific slave input detail.
Instead of strictly limiting the number of total entries in the
internal fifo, make the overall buffer bigger and try to limit entries
based on how many bound commands they're expected to generate. Now
doubleclick and button down events aren't counted for that limit.
Normally the sequence down-doubleclick-up generates at most one
command, so this better matches the quantity we actually want to
limit. Also add a mechanism to clear the button combination state kept
by input.c when the fifo is full; this avoids "stuck button" problems
due to button release events being dropped.
The key combination state clearing is partially based on MPlayer 1
changes by Reimar Döffinger (though overall the effects of this commit
are quite different). It still doesn't make "stuck button" problems
completely impossible; at least if the VO gets closed while a button
was down then nothing will send a button up event or reset state.
The code combining button presses into multibutton commands prevented
single click commands from triggering if a doubleclick event had been
generated from the same button press. As a result using the mouse
wheel to seek worked very badly. Special-case doubleclick events in
the event interpretation code to avoid this issue. This changes the
sequence of generated "keys" for press-release-press-release from
MOUSE_BTN0 MOUSE_BTN0-MOUSE_BTN0_DBL MOUSE_BTN0_DBL to
MOUSE_BTN0 MOUSE_BTN0_DBL MOUSE_BTN0.
"Keys" like MOUSE_BTN0-MOUSE_BTN0_DBL will never be generated now; any
existing configuration files using those need to be changed.
Move the definitions of all special key codes (those not passed by
ASCII value) to input/keycodes.h. Before they were spread between
osdep/keycodes.h, input/joystick.h, input/mouse.h and input/ar.h, plus
some special values in input.h. This was especially inconvenient as
the codes had to be coordinated to not conflict between the files.
The change requires a bit of ugliness as appleir.c includes
<linux/input.h> which contains various conflicting KEY_* definitions.
Work around this by adding a special preprocessor variable which can
be used to avoid defining these in keycodes.h.
The input code read at most one event per input or command fd. If this
event was not bound to any recognized command then no command was
returned, and higher-level code could not distinguish this case from
there being no pending events left. As a result unbound events would
cause extra latency in event processing. Change the input code to
continue reading events until it either finds one that maps to a
command or hits EOF/error.
The input loop select() call was only run if there was at least one
input file descriptor. However other code uses the input loop to wait;
this could result in the wait becoming a busy loop when running with
-noconsolecontrols (without that there is at least one input fd for
terminal input). Make the input loop call select() to sleep even if
there are no input file descriptors.
Enter and Tab are the only named keys (rather than identified by the
printable character they produce) with code below 256. Add a special
case to recognize the Shift modifier with them.
The keycodes.h file contains a KEY_CTRL define, then various control
keys expressed as "KEY_CTRL + 0" and so on. Back in 2002 when the key
name table in input.c was created this KEY_CTRL define was mistakenly
interpreted as a key name, apparently confusing it with the Ctrl key
(even though the input system didn't handle that key back then). As a
result there was an incorrect key name entry with the same key code as
backspace and name "CTRL". This incorrect entry was used when printing
the name of the key. Delete it.
* hr-seek:
input: add default keybindings Shift+[arrow] for small exact seeks
input: support bindings with modifier keys for X input
core: audio: make ogg missing audio timing workaround more complex
core: add support for precise non-keyframe-limited seeks
core: add struct for queued seek info
commands: add generic option -> property wrapper
options: add "choice" option type, use for -pts-association-mode
core: remove looping in update_video(), modify command handling a bit
core: seek: use accurate seek mode with audio-only files
core: avoid using sh_video->pts as "current pts"
libvo: register X11 connection fd in input event system
core: timing: add special handling of long frame intervals
core: move central play loop to a separate function
Conflicts:
DOCS/tech/slave.txt
Add support for binding commands to modifier+key combinations like
"Shift+Left" or "Ctrl+Alt+x", and support reading such combinations
from the output window of X VOs.
The recognized modifier names are Shift, Ctrl, Alt and Meta. Any
combination of those and then a non-modifier key name, separated by
'+', is accepted as a key name in input.conf. For non-special keys
that produce characters shift is ignored as a modifier. For example
"A" is handled as a key without modifiers even if you use shift to
write the capital letter; 'a' vs 'A' already distinguishes the
combinations with a normal keymap, and having separate 'a', 'Shift+A'
and 'A' (written with caps lock for example) would bring more
confusion than benefit.
Currently reading the modifier+key combinations is only supported in
the output window of those VOs that use x11_common.c event
handling. It's not possible to input the key combinations in other VOs
or in a terminal window.
Add support for seeking to an arbitrary non-keyframe position by
decoding video starting from the previous keyframe. Whether to use
this functionality when seeking is controlled by the new option
-hr-seek and a new third argument to the "seek" command. The default
is to use it for absolute seeks (like chapter seeks) but not for
relative ones. Because there's currently no support for cutting
encoded audio some desync is expected if encoded audio passthrough is
used. Currently precise seeks always go to the first frame with
timestamp equal to or greater than the target position; there's no
support for "matching or earlier" backwards seeks at frame level.
If a specified key is pressed during playback, the current stream is
captured to a file, similar to what -dumpstream achieves.
original patch by Pásztor Szilárd, don tricon hu
Taken from the following svn commits, but with several fixes and
modifications (one obvious user-visible difference is that the default
key binding is 'C', not 'c'):
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32524 b3059339-0415-0410-9bf9-f77b7e298cf2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32529 b3059339-0415-0410-9bf9-f77b7e298cf2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32530 b3059339-0415-0410-9bf9-f77b7e298cf2
Do not fail opening a -input file= file just because stat failed, but try
to call "open" in any case.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32497 b3059339-0415-0410-9bf9-f77b7e298cf2
Make code clearer by putting the "special case hack" inside the if.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32499 b3059339-0415-0410-9bf9-f77b7e298cf2
These files now contain different functions related to path handling.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2
Add a property to select YUV colorspace. Currently implemented only in
vo_vdpau and vo_xv. Allows switching between BT.601, BT.709 and
SMPTE-240M (vdpau only).
The xv support uses the "XV_ITURBT_709" attribute. At least my NVIDIA
card supports that; I don't know whether other xv implementations do.
Bind the colorspace switch to the 'c' key by default. 'c' is currently
used by vo_sdl for some fullscreen mode change thing, but at the moment
that does not conflict and if it will in the future then vo_sdl can
change.
VDPAU part based on a patch from Lauri Mylläri <lauri.myllari@gmail.com>
DVB teletext support is nearly finished, it will be possible to read
teletext from file, it will not be depending on reception any more.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29851 b3059339-0415-0410-9bf9-f77b7e298cf2
Define a way to show the property on the OSD and use step_property_osd
instead of step_property. Also change the mp_property_deinterlace()
function to use m_property_flag_ro() to make it print
'enabled/disabled' instead of 'yes/no'.
The GUI is badly designed and too closely coupled to the internal
details of other code. The GUI code is in bad shape and unmaintained
for years. There is no indication that anyone would maintain it in the
future either. Even if someone did volunteer to implement a better
integrated GUI having the current code in the tree probably wouldn't
help much. So get rid of it.
different behaviour is unlikely to make sense but it is better to handle
this in input.c instead of adding special cases to mplayer.c and being
able to override the default behaviour at least should not hurt.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28870 b3059339-0415-0410-9bf9-f77b7e298cf2
select can not work because lirc_nextcode buffers data internally,
causing events to be delayed until the next keypress in some cases.
Patch by Dennis Vshivkov [jaimor (at) orcon net nz]
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28380 b3059339-0415-0410-9bf9-f77b7e298cf2
Replace all USE_ prefixes by CONFIG_ prefixes to indicate
options which are configurable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
Parameters now use a string much more intuitive than previous int value.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27100 b3059339-0415-0410-9bf9-f77b7e298cf2
Mostly useful when used with -idle mode.
Patch by Mathieu Schroeter ( mathieu dot schroeter at gamesover dot ch )
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26909 b3059339-0415-0410-9bf9-f77b7e298cf2
The amount of computers capable of using it is too low in the field to
enable it by default.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26797 b3059339-0415-0410-9bf9-f77b7e298cf2
This requires Linux 2.6 with evdev and appleir drivers.
The keymapping is done to mimics the one that was done for MacOSX.
WARNING: Most distributions do not seems to bother and only let root
access to the device. Modify udev rules accordingly if you want regular
user to be able to use the remote.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26795 b3059339-0415-0410-9bf9-f77b7e298cf2