Commit Graph

573 Commits

Author SHA1 Message Date
wm4 34bee16faf input: split off some code from input.c to separate files
This is mostly just moving code around.
2013-12-26 17:13:25 +01:00
wm4 eef36f03ea msg: rename mp_msg_log -> mp_msg
Same for companion functions.
2013-12-21 22:13:04 +01:00
wm4 eba5d025d2 msg: convert defines to enum
Also get rid of MSGL_HINT and the many MSGL_DBG* levels.
2013-12-21 22:13:04 +01:00
wm4 ad2199128d path lookup functions: mp_msg conversions
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.
2013-12-21 21:43:17 +01:00
wm4 0335011f11 stream: mp_msg conversions
We also drop some slave mode stuff from stream_vcd.
2013-12-21 21:43:16 +01:00
wm4 d8d42b44fc m_option, m_config: mp_msg conversions
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.
2013-12-21 21:05:02 +01:00
wm4 ed71606e65 input: rework how input sources are added
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.
2013-12-21 20:50:13 +01:00
Martin Herkt 2d3c7f3b90 input: make parse_cmd_strv take const args 2013-12-20 19:32:45 +01:00
wm4 18930ba7dd input, lua: add functions to take pre-split input commands
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.
2013-12-20 18:01:04 +01:00
wm4 25d4ae74f1 Rename getch2....c/h to terminal....c/h
"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.
2013-12-19 21:31:27 +01:00
wm4 1fe39b75db command: remove radio commands
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.
2013-12-19 21:25:40 +01:00
wm4 0112143fda Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
wm4 eb15151705 Move options/config related files from mpvcore/ to options/
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.
2013-12-17 02:07:57 +01:00
wm4 8d5214de0a Move mpvcore/input/ to input/ 2013-12-17 01:23:09 +01:00
wm4 d4bdd0473d Rename directories, move files (step 1 of 2) (does not compile)
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.
2012-11-12 20:06:14 +01:00
wm4 84829a4ea1 Merge branch 'osd_changes' into master
Conflicts:
	DOCS/man/en/options.rst
2012-11-01 02:12:47 +01:00
wm4 1809cbcc90 input: minor simplification 2012-11-01 02:12:18 +01:00
reimar 5d44d445ef input: fix off-by-one error
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.
2012-10-31 22:41:48 +01:00
wm4 48ce4ab7f9 screenshot: change "screenshot" input command
"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).
2012-10-24 21:56:34 +02:00
wm4 11ed093182 screenshot: allow taking screenshots with subtitles
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.
2012-10-24 21:56:34 +02:00
wm4 f2e662fe3f input: fix mp_cmd memory leak
mp_input_feed_key() didn't free the command, if it was discarded due
to the queue exceeding its maximum size.
2012-10-14 23:45:41 +02:00
wm4 73b44b44a4 input: minor simplification to mp_input_get_cmd() 2012-10-14 23:45:31 +02:00
wm4 187cbd7aa7 input: add input test mode
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.
2012-10-14 22:28:51 +02:00
wm4 ad5bc380e2 input: track location info for input commands
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.
2012-10-14 22:28:51 +02:00
wm4 9dfcd3e9a2 input: don't warn on commands for disabled optional features
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.
2012-10-14 21:43:15 +02:00
wm4 85d185441a Merge branch 'input_changes' into master
Conflicts:
	DOCS/man/en/vo.rst
	etc/input.conf
	input/input.c
	m_property.c
2012-10-12 11:53:53 +02:00
wm4 65fc530f0c Rename to "mpv"
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.)
2012-10-12 10:14:32 +02:00
wm4 e1b15dee4c commands: use "up" and "down" as 2nd argument for cycle command
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.
2012-10-12 10:13:43 +02:00
wm4 32fe890cc1 commands: add print_text input command to print text on the terminal
In theory, this could take over the role of the get_property slave
command, and is more general.
2012-10-12 10:13:43 +02:00
wm4 12da72e135 commands: sub_step takes only one argument 2012-10-12 10:10:33 +02:00
wm4 503b124659 commands: disable deprecation warnings
This disables warning messages when the legacy input command bridge is
used. For now, user input.confs should just keep working as if nothing
has changed. The deprecation warnings will be enabled again at a later
point, and the legacy bridge will be eventually removed.
2012-10-12 10:10:32 +02:00
wm4 ea90bdbfa2 commands: rename show_tracks/chapters_osd command 2012-10-12 10:10:32 +02:00
wm4 e79efd28f8 commands: more user-control whether a command shows OSD bars/messages
The "no-osd" prefix was introduced earlier to disable OSD selectively
based on the key binding. Extend this, and allow the user to force
display of an OSD bar ("osd-bar"), OSD message ("osd-msg") or both
("osd-msg-bar"). This changes mainly how property setting functions
behave.

The default behavior is still the same.
2012-10-12 10:10:32 +02:00
wm4 88849fd1d4 commands: add choice type to input commands
Allow using the choice type (as it used for command line) for arguments
of input commands. Change the magic integer arguments of some commands
(like seek) to use choices instead. The old numeric values are still
allowed (but only those which made sense before, not arbitrary
integers).

In order to do this, remove the input.c specific types (like
MP_CMD_ARG_INT) completely and specify commands using the m_option
types.

Also, add the special choice "-" to some arguments. It's supposed to
signify the default value, so arguments can be easily skipped. Maybe the
choice option should recognize this and not change the previous value,
but we'll leave this for later.

For now, leave compatibility integer values for all new choice
arguments, e.g. "0" maps to 0. We could let the choice option type do
this automatically, but we don't, because we want user input values and
internal mplayer values decoupled in general. The compatibility options
will be removed one day, too.

Also, remove optional args for strings - would require either annoying
additional code, or copying strings twice. It's not used, so remove it.
2012-10-12 10:10:32 +02:00
wm4 0de86f5bf3 input: warn about non-existing commands, add explicit "ignore" command
If a command is not found, warn about it at loading time (just like
other command parsing errors are printed at loading time).

Add an explicit "ignore" command. input.conf instructs users to use this
command to cancel out existing mapping. This clashed with the
warning added in this commit. Make "ignore" a real command and remove
the specialcasing for it from get_cmd_from_keys(). Now "ignore" is
ignored because it's not handled in command.c.
2012-10-12 10:10:32 +02:00
wm4 d232012287 input: handle escapes always in command parser
Previously, both the command parser and property expansion
(m_properties_expand_string) handled escapes with '\'. Move all escape
handling into the command parser, and remove it from the property code.

This removes the need to escape strings twice for commands that use
property expansion.

The command parser is practically rewritten: it uses m_option for the
actual parsing, and reduces hackish C-string handling.
2012-10-12 10:10:32 +02:00
wm4 b591688a27 input: verify input.conf on loading
When input.conf is loaded, verify each command and print a warning if
it's invalid or uses legacy commands. This is done for both the user's
and the embedded config files.

The diff is a bit noisy, because mp_input_parse_cmd() is changed to take
a bstr as argument instead of a char*.
2012-10-12 10:10:32 +02:00
wm4 45b432f4c3 commands: replace "switch" with "add" and "cycle"
Now it depends on the command whether a property wraps around, or stops
at min/max valid property value.

For practically all properties, it's quite unambiguous what the "switch"
command should have done, and there's technically no need to replace it
with these new commands. More over, most properties that cycle are
boolean anyway. But it seems more orthogonal to make the difference
explicit, rather than hardcoding it. Having different commands also
makes it more explicit to the user what these commands do, both just due
to the naming, and what wrapping policy is used. The code is simpler
too.
2012-10-12 10:10:31 +02:00
wm4 9939776e5e commands: make "aspect" property writeable, replaces "switch_ratio"
Move the code for "switch_ratio" to the M_PROPERTY_SET case of the
"aspect" property. The rules are exactly the same, e.g. setting a ratio
smaller than 0.1 sets the pixel aspect ratio to 1:1. For now, we define
that writing "0" sets the PAR to 1:1, and disallow -1 (possibly reserve
it to reset to default aspect ratio).
2012-10-12 10:10:31 +02:00
wm4 6f1486b397 commands: replace --hardframedrop, change framedropping property
Replace --hardframedrop with --framedrop=hard. Rename the framedrop
property from "framedropping" to "framedrop" for the sake of making
command line options have the same name as their corresponding
property. Change the property to accept choice values instead of
numeric values.

Remove unused/forgotten auto_quality variable.
2012-10-12 10:10:30 +02:00
wm4 a59eee4893 commands: remove third parameter for "switch"
This could change the direction (i.e. invoke STEP_PROPERTY_DOWN), but
you can just pass a negative value as second argument instead.
2012-10-12 10:10:30 +02:00
wm4 a749c61437 commands: rename osd_show_[property_]text and osd_show_progression
osd_show_[property_]text => show_text
osd_show_progression => show_progress

show_text, osd_show_property_text and osd_show_text both map to the
code for the previous osd_show_property_text. The only special thing
about osd_show_text is that you don't need to escape "$". Also,
unfortunately osd_show_property_text requires escaping things twice,
one time for the command parser, and the other time for the property
formatting code, while osd_show_text needed only one level of escaping.
2012-10-12 10:10:30 +02:00
wm4 950999dd7b commands: remove speed_set/speed_incr commands
Redundant with set/switch commands.
2012-10-12 10:10:30 +02:00
wm4 4e2fab5846 commands: rename properties, update input.conf
Use "-" instead of "_" in property names. The intent is that property
names and options names should be the same (if they refer to the same
thing), and options use "-" as word separator.

Rename some other properties too, e.g. "switch_audio" -> "audio".

Add a way to translate the old property names to the new ones, similar
to the input command legacy bridge.

Update input.conf. Use the new property names, and don't use legacy
commands.
2012-10-12 10:10:30 +02:00
wm4 cd25a671b5 commands: remove unimplemented "use_master" command
The implementation for this command was removed in 2002.
2012-10-12 10:10:30 +02:00
wm4 a668ae0ff9 commands: change input commands to make OSD usage explicit
Most input commands had their own policy whether to display an OSD
message for user feedback or not. Some commands had two variants, one
that showed an OSD message and one that didn't (e.g. step_property_osd
and step_property).

Change it such that all commands show a message on the OSD. Add a
"no-osd" modifier that disables OSD for that command. Rename the
"step_property" and "step_property_osd" command to "switch", and rename
"set_property" and "set_property_osd" to "set".

Note that commands which haven't used OSD before still don't use OSD.
That will possibly be fixed later. (E.g. "screenshot" could display an
OSD message instead of just printing a message on the terminal.)

The chapter and edition properties still produce OSD messages even with
"no-osd", because they don't map so well to the property_osd_display[]
mechanism.
2012-10-12 10:10:30 +02:00
wm4 e41378ea71 commands: simplify legacy command-to-property bridge
There are many input commands which are redundant to properties. They
were parsed like normal commands, but set_property_command() in
command.c handled them automatically using the property mechanism. This
still required having the command specifications around, and the code in
command.c was quite messy.

Replace this with a text based replacement mechanism. Some corner cases
are not handled: commands of form "seek_chapter 3 1" are supposed to set
the "chapter" property to 3. This use is probably rare, and doesn't show
up in the default input.conf.

The reason compatibility is kept is because breaking input.conf is quite
annoying, so a minimal effort is made to avoid this. Currently we print
an annoying warning every time a legacy command is used, though.

Also add a compatibility entry for "pt_step", which was removed some
time ago. Variations in whitespace are not handled, but it's good enough
to deal with old input.conf entries.
2012-10-12 10:10:30 +02:00
wm4 0a54f5e741 commands: remove legacy slave mode get commands
These have been replaced by properties. Also remove some other slave-
mode specific get commands that can be replaced by property uses.

The get_metadata() function didn't actually contain anything useful,
and just replicated code from other parts of mplayer.
2012-10-12 10:10:28 +02:00
wm4 f360f492d6 commands: fix parsing bug
When tabs are used as whitespace between command and the first string
parameter, the string is not correctly terminated.
2012-09-23 14:57:41 +02:00
Rudolf Polzer 416c03417e vf_rectangle: remove as it is very dirty and we have a replacement now 2012-09-18 21:08:20 +02:00
wm4 0f155921b0 core: manage tracks in the frontend
Introduce a general track struct for every audio/video/subtitle track
known to the frontend. External files (subtitles) are now represented
as tracks too. This mainly serves to clean up the subtitle selection
code: now every subtitle is simply a track, instead of using a messy
numbering that goes by subtitle type (as it was stored in the
global_sub_pos field). The mplayer fontend will list external subtitle
files as additional tracks.

The timeline code now tries to match the exact demuxer IDs of all
tracks. This may cause problems when Matroska files with different
track numberings are used with EDL timelines. Change demux_lavf not
to set demuxer IDs, since most time they are not set.
2012-09-18 21:04:45 +02:00
wm4 1fb275b7de command: remove sub_remove command
This messes deeply with the subtitle bookkeeping data structures, and
would have to be reimplemented anyway.

It's not sure what this was even useful for. Possibly for slave mode.
2012-09-07 16:06:36 +02:00
wm4 330c90cbb8 command: remove sub_log command
Not very useful, and introduced special cases. Just get rid of it, can
be reintroduced if in a better way if someone misses this feature.
2012-09-07 16:06:36 +02:00
wm4 27a8610c56 input: add ability to disable all default bindings for an input section
Add a flags parameter to mp_input_set_section(). Add a flag that defines
whether bindings in the default section are used or not. This is useful
for special functionality, where the normal key bindings may have
unwanted effects.

For example, it shouldn't be possible to seek during encoding. However,
you want to be able to cancel the encoding process gracefully. For that
purpose, the "encode" section of input.conf could be made exclusive:

    mp_input_set_section(mpctx->input, "encode", MP_INPUT_NO_DEFAULT_SECTION);

And input.conf could contain this definition:

    RIGHT seek 10
    q {encode} quit

Then only the key "q" would be bound during encoding.
2012-08-24 14:30:25 +02:00
wm4 41fbcee1f5 Remove dvdnav support (DVD menus)
When the internal mplayer MPEG demuxer was removed (commit 1fde09db),
the default demuxer when using dvdnav was set to libavformat. Now it
turns out that this doesn't work with libavformat. It will terminate
playback right after the audio runs out (instead of looping it like the
video, or whatever it's supposed to do). I'm not sure what exactly the
problem is, but since 1. even mplayer-svn can't handle DVD menus
directly (missing highlights), 2. DVD menus are essentially worthless,
and 3. I don't directly watch DVDs, don't bother with it and remove it.

For basic playback, there's still libdvdread support.

Also, use pkg-config for libdvdread, and drop support for in-tree
libdvdread. Remove support for in-tree libdvdcss as well.
2012-08-16 17:17:49 +02:00
wm4 94782e464d options: get rid of ambiguous option parsing
Options parsing used to be ambiguous, as in the splitting into option
and values pairs was ambiguous. Example:

    -option -something

It wasn't clear whether -option actually takes an argument or not. The
string "-something" could either be a separate option, or an argument
to "-option". The code had to call the option specific parser function
to resolve this.

This made everything complicated and didn't even have a real use. There
was only one case where this was actually used: string lists
(m_option_type_string_list) and options based on it. That is because
this option type actually turns a single option into a proxy for several
real arguments, e.g. "vf*" can handle "-vf-add" and "-vf-clr". Options
suffixed with "-clr" are the only options of this group which take no
arguments.

This is ambiguous only with the "old syntax" (as shown above). The "new"
option syntax always puts option name and value into same argument.
(E.g. "--option=--something" or "--option" "--something".)

Simplify the code by making it statically known whether an option takes
a parameter or not with the flag M_OPT_TYPE_OLD_SYNTAX_NO_PARAM. If it's
set, the option parser assumes the option takes no argument.

The only real ambiguity left, string list options that end on "-clr",
are special cased in the parser.

Remove some duplication of the logic in the command line parser by
moving all argument splitting logic into split_opt(). (It's arguable
whether that can be considered code duplication, but now the code is a
bit simpler anyway. This might be subjective.)

Remove the "ambiguous" parameter from all option parsing related code.

Make m_config unaware of the pre-parsing concept.

Make most CONF_NOCFG options also CONF_GLOBAL (except those explicitly
usable as per-file options.)
2012-08-05 23:51:49 +02:00
wm4 ebaaa41f2a Remove teletext support
Teletext requires special OSD support. Because I can't even test
teletext, I can't restore support for it. Since teletext can be
considered ancient and obscure, and since it doesn't make sense to keep
the remaining teletext code without being able to use it, I'm removing
it.
2012-08-03 00:12:46 +02:00
wm4 7059c15f4a mplayer: rip out --capture support
While this was an interesting idea, it wasn't actually useful.
Basically it dumped the raw data (as requested by the demuxer) into a
file. The result is only useful if the file format was raw or maybe
some MPEG packet stream, but not with most modern file formats.
2012-08-02 23:22:52 +02:00
wm4 9dbe8e1b84 input: change bind_keys() to use bstr
This seems rather pointless considering there are still stupid
bstrdup0()s left, but maybe this is the right direction.
2012-08-01 23:43:17 +02:00
wm4 b35d89d42b input: replace internal key binds with included etc/input.conf
The internal array of default key bindings is removed. Include the
file etc/input.conf at compile time (using the file2header tool), and
parse the default binds from etc/input.conf at startup time.

This lowers maintainance overhead, and makes sure the default bindings
and etc/input.conf don't deviate. Commit f30bf73bf2 already
made sure etc/input.conf matches the default bindings, so this commit
shouldn't change anything user-visible.
2012-08-01 22:52:28 +02:00
wm4 d1ccee76b1 input: refactor: store builtin key binds along user user binds
Builtin (i.e. default) binds are still separately handled, and this
commit shouldn't change any user-visible behavior.
2012-08-01 22:45:35 +02:00
wm4 deddef4c75 input: simplify input.conf parsing
Now input.conf is loaded into memory at once, instead of streaming the
file into the parser.

The real reason for this change is that I want to be able to read the
config file from memory. (Using fmemopen() would have been simpler, but
that is available on sane platforms only.)
2012-08-01 21:50:24 +02:00
wm4 c92538dfaa Remove dead code
This was done with the help of callcatcher [1]. Only functions which
are statically known to be unused are removed.

Some unused functions are not removed yet, because they might be needed
in the near future (such as open_output_stream for the encode branch).

There is one user visible change: the --subcc option did nothing, and is
removed with this commit.

[1] http://www.skynet.ie/~caolan/Packages/callcatcher.html
2012-08-01 17:07:35 +02:00
wm4 e9a18efa2b VO: add mechanisms to change VO commandline for VOs supporting it 2012-08-01 01:06:59 +02:00
wm4 89a17bcda6 mplayer: turn playtree into a list, and change per-file option handling
Summary:
- There is no playtree anymore. It's reduced to a simple list.
- Options are now always global. You can still have per-file options,
  but these are optional and require special syntax.
- The slave command pt_step has been removed, and playlist_next
  and playlist_prev added. (See etc/input.conf changes.)
  This is a user visible incompatible change, and will break slave-mode
  applications.
- The pt_clear slave command is renamed to playlist_clear.
- Playtree entries could have multiple files. This is not the case
  anymore, and playlist entries have always exactly one entry. Whenever
  something adds more than one file (like ASX playlists or dvd:// or
  dvdnav:// on the command line), all files are added as separate
  playlist entries.

Note that some of the changes are quite deep and violent. Expect
regressions.

The playlist parsing code in particular is of low quality. I didn't try
to improve it, and merely spent to least effort necessary to keep it
somehow working. (Especially ASX playlist handling.)

The playtree code was complicated and bloated. It was also barely used.
Most users don't even know that mplayer manages the playlist as tree,
or how to use it. The most obscure features was probably specifying a
tree on command line (with '{' and '}' to create/close tree nodes). It
filled the player code with complexity and confused users with weird
slave commands like pt_up.

Replace the playtree with a simple flat playlist. Playlist parsers that
actually return trees are changed to append all files to the playlist
pre-order.

It used to be the responsibility of the playtree code to change per-file
config options. Now this is done by the player core, and the playlist
code is free of such details.

Options are not per-file by default anymore. This was a very obscure and
complicated feature that confused even experienced users. Consider the
following command line:

    mplayer file1.mkv file2.mkv --no-audio file3.mkv

This will disable the audio for file2.mkv only, because options are
per-file by default. To make the option affect all files, you're
supposed to put it before the first file.

This is bad, because normally you don't need per-file options. They are
very rarely needed, and the only reasonable use cases I can imagine are
use of the encode backend (mplayer encode branch), or for debugging. The
normal use case is made harder, and the feature is perceived as bug.
Even worse, correct usage is hard to explain for users.

Make all options global by default. The position of an option isn't
significant anymore (except for options that compensate each other,
consider --shuffle --no-shuffle).

One other important change is that no options are reset anymore if a
new file is started. If you change settings with slave mode commands,
they will not be changed by playing a new file. (Exceptions include
settings that are too file specific, like audio/subtitle stream
selection.)

There is still some need for per-file options. Debugging and encoding
are use cases that profit from per-file options. Per-file profiles (as
well as per-protocol and per-VO/AO options) need the implementation
related mechanisms to backup and restore options when the playback file
changes.

Simplify the save-slot stuff, which is possible because there is no
hierarchical play tree anymore. Now there's a simple backup field.

Add a way to specify per-file options on command line. Example:

    mplayer f1.mkv -o0 --{ -o1 f2.mkv -o2 f3.mkv --} f4.mkv -o3

will have the following options per file set:

    f1.mkv, f4.mkv: -o0 -o3
    f2.mkv, f3.mkv: -o0 -o3 -o1 -o2

The options --{ and --} start and end per-file options. All files inside
the { } will be affected by the options equally (similar to how global
options and multiple files are handled). When playback of a file starts,
the per-file options are set according to the command line. When
playback ends, the per-file options are restored to the values when
playback started.
2012-07-31 21:33:26 +02:00
wm4 08caadb9c0 bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstr
Replace all uses of bstr() with bstr0().
Also remove the ridiculous C++ workaround.
2012-07-28 23:47:42 +02:00
wm4 42c3a30008 commands: add show_tracks_osd command to display audio and subtitle tracks on OSD
The command lists the audio and subtitle tracks in the current file on the
OSD. It also marks the currently active streams.
Video streams are not shown, as files with more than one video stream are
exceedingly rare.
2012-07-28 20:57:44 +02:00
wm4 af7a29424c commands: add show_chapters_osd command to display chapters on OSD
The command lists the chapters in the current file on the OSD. It also
marks the current chapter.

This is actually a cheap replacement for the chapter select libmenu
functionality.
2012-07-28 20:57:40 +02:00
wm4 51e198c2a1 Merge remote-tracking branch 'origin/master'
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 2ba8b91a97. 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.
2012-07-28 17:24:05 +02:00
Uoti Urpala dc2a4863af options: support parsing values into substructs
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).
2012-07-16 21:08:42 +03:00
wm4 2793e7eb70 Merge remote-tracking branch 'origin/master' 2012-05-20 11:42:44 +02:00
Uoti Urpala c02d0ee703 options: change --input=keylist, cmdlist implementation
Change the --input=keylist and --input=cmdlist suboptions to use the
"print function" option type. This changes their semantics somewhat,
and now some other output can appear after the printed lists (before,
they called "exit(0)" directly). I'm not aware of any program parsing
the output which could be affected.
2012-05-07 23:21:23 +03:00
wm4 97ac824124 Merge remote-tracking branch 'origin/master'
Conflicts:
	bstr.c
	bstr.h
	libvo/cocoa_common.m
	libvo/gl_common.c
	libvo/video_out.c
	mplayer.c
	screenshot.c
	sub/subassconvert.c

Merge of cocoa_common.m done by pigoz.

Picking my version of screenshot.c. The fix in commit aadf1002f8 will
be redone in a follow-up commit, as the original commit causes too many
conflicts with the work done locally in this branch, and other work in
progress.
2012-04-29 10:01:28 +02:00
Stefano Pigozzi 86790494d3 OSX, input: implement wakeup in response to Cocoa events
Add code to wake up the select() call in input.c when an OSX event is
available and a Cocoa OpenGL backend is initialized.

Fixes the slow response to input or other events in Cocoa-based VOs
during long select() sleeps (e.g., when mplayer2 is paused) introduced
by commit 7040968.
2012-04-26 21:03:10 +03:00
wm4 1aa2e36122 Merge remote-tracking branch 'origin/master'
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
2012-04-01 22:52:33 +02:00
Uoti Urpala a0de4bc500 ao_pulse, core: make pulse thread wake up core for more data
For ao_pulse, the current latency is not a good indicator of how soon
the AO requires new data to avoid underflow. Add an internal pipe that
can be used to wake up the input loop from select(), and make the
pulseaudio main loop (which runs in a separate thread) use this
mechanism when pulse requests more data. The wakeup signal currently
contains no information about the reason for the wakup, but audio
buffers are always filled when the event loop wakes up.

Also, request a latency of 1 second from the Pulseaudio server. The
default is normally significantly higher. We don't need low latency,
while higher latency helps prevent underflows reduces need for
wakeups.
2012-03-26 03:55:31 +03:00
Uoti Urpala 215035b31a input.c: simplify command definitions
Change command definitions to allow writing the command definition
table in more readable format.
2012-03-25 22:30:38 +03:00
wm4 f561c19fe1 x11: input: add print and menu keys 2012-03-25 22:30:37 +03:00
wm4 166a7de4cf input: allow unicode keys and reassign internal key codes
This moves all key codes above the highest valid unicode code point
(which is 0x10FFFF). All key codes below MP_KEY_BASE now directly map
to unicode (KEY_ENTER is 13, carriage return). Configuration files
(input.conf) can contain unicode characters in UTF-8 to map non-ASCII
characters/keys.

This shouldn't change anything user visible, except that "direct key
codes" (as used in input.conf) will change their meaning.

Parts of the bstr functions taken from libavutil's GET_UTF8 and
slightly modified.
2012-03-25 22:30:37 +03:00
wm4 6de8120822 Merge remote-tracking branch 'origin/master' into my_master
Conflicts:
	command.c
	mp_core.h
	mplayer.c
	screenshot.c
2012-03-16 19:14:44 +01:00
wm4 a1244111a7 windows support: unicode filenames
Windows uses a legacy codepage for char* / runtime functions accepting
char *. Using UTF-8 as the codepage with setlocale() is explicitly
forbidden.

Work this around by overriding the MSVCRT functions with wrapper
macros, that assume UTF-8 and use "proper" API calls like _wopen etc.
to deal with unicode filenames. All code that uses standard functions
that take or return filenames must now include osdep/io.h. stat()
can't be overridden, because MinGW-w64 itself defines "stat" as a
macro. Change code to use use mp_stat() instead.

This is not perfectly clean, but still somewhat sane, and much better
than littering the rest of the mplayer code with MinGW specific hacks.
It's also a bit fragile, but that's actually little different from the
previous situation. Also, MinGW is unlikely to ever include a nice way
of dealing with this.
2012-03-09 20:48:54 +02:00
wm4 f440a244e3 input: fix OSD cycling 2012-02-12 19:09:41 +01:00
wm4 489f61aa4c commands: add pt_clear command to clear playlist
This deletes all playlist elements, except the currently active
playlist entry.

NOTE: this doesn't remove parent nodes in the case when we really have
a play tree (as opposed to a play list). Apparently this doesn't cause
any harm.
2012-02-10 19:14:19 +01:00
wm4 02fedc7bab input.c: simplify command definitions
Using type = -1 for terminating the command argument list was an
unnecessary complication. Change it to 0 to make use of default
initialization. Remove the explicit termination from the command
definitions. Now the argument list is automatically terminated by C
default initialization rules.

Also remove other redundant {0} initializers.

When an argument's default value is actually initialized to something other
than 0, make the field being initialized explicit (e.g. {1} becomes
{.i = 1}).

Try to make use of whitespace more consistent.
2012-01-26 03:06:59 +01:00
wm4 064f8c2fb6 Merge branch 'utf8_input' into my_master 2012-01-18 04:19:24 +01:00
wm4 fdc7155ced x11: add print and menu keys 2012-01-18 04:13:27 +01:00
wm4 a63e880400 input: allow unicode keys and reassign internal key codes
This moves all key codes above the highest valid unicode code point (which
is 0x10FFFF). All key codes below MP_KEY_BASE now directly map to unicode.
Configuration files (input.conf) can contain unicode characters in UTF-8
to map non-ASCII characters/keys.

This shouldn't change anything user visible, except that "direct key codes"
(as used in input.conf) will change their meaning.
2012-01-18 04:11:48 +01:00
wm4 f9141fc36f input: simplify previous commit a bit more
Less mutable state = better.
2012-01-18 02:53:23 +01:00
wm4 98203198b6 input: fix crashes with libmenu
Note: now that libmenu has been removed, the related code in input.c has
been removed. If libmenu is ever added back, a queue_remove() function
that can remove any item in the input queue will be required.

libmenu triggered some special case that caused crashes by double frees.
In particular the queue_pop function is used, expecting to remove an element
that is not necessarily always the one that queue_pop removes. Fix by
adding a queue_remove functions. Rewrite the other queue functions, since
these are probably buggy as well. queue_pop didn't even attempt to
maintain the doubly linked list.
2012-01-18 02:52:34 +01:00
wm4 3041ee8d6c core: add screenshot mode for actual VO window contents
The screenshot command normally converts the currently displayed video
frame to an image. Add support for an alternative screenshot mode
that is supposed to capture the real window contents. Such a
screenshot contains a possibly scaled version of the frame, the OSD,
and subtitles.

Add a default key binding Alt+s for taking screenshots in this mode.

This needs special VO support, and might not work with all VOs (this
commit does not yet contain an implementation for any VO, only the
infrastructure).
2011-11-25 23:56:28 +02:00
Uoti Urpala 8b5efd6455 libmenu: remove OSD menu functionality (--menu)
Something like the OSD menu functionality could be useful. However the
current implementation has several problems and would require a
relatively large amount of work to get into good shape. As far as I
know there are few users of the existing functionality. Nobody is
working on the existing code and keeping it compiling at all while
changing other code would require extra work. So delete the menu code
and some related code elsewhere that's used by nothing else.
2011-10-25 07:05:47 +03:00
wm4 75eab4f72a video, options: implement better YUV->RGB conversion control
Rewrite control of the colorspace and input/output level parameters
used in YUV-RGB conversions, replacing VO-specific suboptions with new
common options and adding configuration support to more cases.

Add new option --colormatrix which selects the colorspace the original
video is assumed to have in YUV->RGB conversions. The default
behavior changes from assuming BT.601 to colorspace autoselection
between BT.601 and BT.709 using a simple heuristic based on video
size. Add new options --colormatrix-input-range and
--colormatrix-output-range which select input YUV and output RGB range.
Disable the previously existing VO-specific colorspace and level
conversion suboptions in vo_gl and vo_vdpau. Remove the
"yuv_colorspace" property and replace it with one named "colormatrix"
and semantics matching the new option. Add new properties matching the
options for level conversion.

Colorspace selection is currently supported by vo_gl, vo_vdpau, vo_xv
and vf_scale, and all can change it at runtime (previously only
vo_vdpau and vo_xv could). vo_vdpau now uses the same conversion
matrix generation as vo_gl instead of libvdpau functionality; the main
functional difference is that the "contrast" equalizer control behaves
somewhat differently (it scales the Y component around 1/2 instead of
around 0, so that contrast 0 makes the image gray rather than black).
vo_xv does not support level conversion. vf_scale supports range
setting for input, but always outputs full-range RGB.

The value of the slave properties is the policy setting used for
conversions. This means they can be set to any value regardless of
whether the current VO supports that value or whether there currently
even is any video. Possibly separate properties could be added to
query the conversion actually used at the moment, if any.

Because the colorspace and level settings are now set with a single
VF/VO control call, the return value of that is no longer used to
signal whether all the settings are actually supported. Instead code
should set all the details it can support, and ignore the rest. The
core will use GET_YUV_COLORSPACE to check which colorspace details
have been set and which not. In other words, the return value for
SET_YUV_COLORSPACE only signals whether any kind of YUV colorspace
conversion handling exists at all, and VOs have to take care to return
the actual state with GET_YUV_COLORSPACE instead.

To be changed in later commits: add missing option documentation.
2011-10-16 21:11:11 +03:00
harklu 9e6933440a options, subs: add --ass-vsfilter-aspect-compat
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.
2011-08-12 14:19:10 +03:00
Uoti Urpala fddb59a6c3 commands: parsing: fix string argument quoting/escaping
Parsing of commands with string arguments had several problems. First,
escape handling modified the original string, which broke keyboard
command definitions with strings containing escapes. Second, in an
argument like "\\" the second quote was incorrectly considered escaped
even though the preceding '\' was itself escaped. Third, an
unterminated quoted string resulted in the argument being set to NULL
even if this violated the declared the minimum number of arguments to
the command type; this could cause a crash in the code executing the
parsed commands. Fix by rewriting the string argument parsing. Also
change int/float argument parsing so that the whole command is
rejected on error.
2011-08-05 03:21:14 +03:00
Uoti Urpala 0958620591 bstr: rename BSTR() -> bstr()
Rename the BSTR() function to bstr(). The former caused a conflict
with some Windows OS name, and it's no longer a macro so uppercase
naming is less appropriate.
2011-07-27 08:38:12 +03:00
Uoti Urpala d6890a7b53 input: fix input.conf parse errors
Commit df899f59be removing a write outside a buffer triggered another
problem, as for some reason the code did not 0-terminate its read
buffer in the specific case that it had encountered an EOF, and as a
result could parse contents left in the buffer for a second time.
Usually this resulted in parsing error messages. Fix the problem by
rewriting the offending code in a less hacky form.
2011-07-20 04:41:51 +03:00
Uoti Urpala c2f5465bcc input: fix problem with key autorepeat
Recent commit 82b8f89bae ("input: rework event reading and command
queuing") had a problem in the handling of commands generated by
autorepeat code (this code is only used with joystick and Apple IR
remote input). Fix (still untested though).
2011-07-18 01:18:45 +03:00
Uoti Urpala 82b8f89bae 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 07:36:09 +03:00
Uoti Urpala 1916b95b8d cleanup: remove some unnecessary input.[ch] typedefs
Remove some unnecessary typedefs and remove pointless mp_ prefix from
some internal struct names.

Change the type of the "close_func" pointers from "void f(int fd)" to
"int f(int fd)" so that using standard close() there is valid.

Delete some useless assert() statements.

Move internal MP_MAX_KEY_DOWN define from input.h to input.c.
2011-07-16 21:32:37 +03:00
Uoti Urpala df899f59be input.c: remove write to buffer[-1] in parse_config() 2011-07-11 06:05:19 +03:00
Clément Bœsch 2174cbfa2f cleanup: silence most of the clang warnings 2011-07-09 04:23:24 +03:00
Uoti Urpala a77e5f07ed Merge branch 'mplayer1_changes' 2011-06-29 11:39:06 +03:00
Uoti Urpala 4e1e23b2e9 input: clean up messages with button combination names
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.
2011-06-29 08:54:15 +03:00
reimar 9737ae2196 input: support up to 20 mouse buttons
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
2011-06-29 07:46:58 +03:00
Grigori Goronzy 17db5cc98f input: add useful default pointer button bindings
Add two mouse button bindings:
1) left button double click toggles fullscreen
2) right button pauses/unpauses
2011-06-14 19:58:55 +03:00
Uoti Urpala 618f760866 input: make slave command file descriptors nonblocking
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.
2011-05-04 18:53:17 +03:00
Clément Bœsch 6506d4ad84 cleanup: remove more warnings 2011-05-02 00:46:48 +03:00
Uoti Urpala 5c4b059f16 input: rewrite -key-fifo-size limiting logic
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.
2011-05-02 00:44:21 +03:00
Uoti Urpala b9eaafe1ed input: modify interpretation of doubleclick events
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.
2011-05-02 00:44:21 +03:00
Uoti Urpala ed5279db29 cleanup: input.c: simplify some string handling code
Replace manual loops with strspn() / strcspn().
2011-05-02 00:44:21 +03:00
Uoti Urpala 3832d67afd cleanup: reformat input.c 2011-05-02 00:44:21 +03:00
Uoti Urpala 23cb829072 input: move all key code lists to input/keycodes.h
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.
2011-05-02 00:43:31 +03:00
Uoti Urpala 3e86228fad input: don't interrupt processing at unbound events
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.
2011-05-01 14:44:05 +03:00
Uoti Urpala d6072d7408 input: sleep in event loop even if there are no input fds
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.
2011-04-22 09:34:03 +03:00
Uoti Urpala 1f1ef44dd1 input: accept Shift modifier for Enter and Tab keys
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.
2011-02-05 02:16:17 +02:00
Uoti Urpala 7f576e8b66 input: remove incorrect "CTRL" keyname alias for backspace
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.
2011-02-05 02:13:58 +02:00
Uoti Urpala 0afb326035 Merge branch 'hr-seek'
* 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
2010-12-20 19:17:43 +02:00
Uoti Urpala 5bb2f9787f input: add default keybindings Shift+[arrow] for small exact seeks 2010-12-20 19:02:24 +02:00
Uoti Urpala 67fd58d6f0 input: support bindings with modifier keys for X input
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.
2010-12-20 19:02:24 +02:00
Uoti Urpala f0649f13d6 core: add support for precise non-keyframe-limited seeks
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.
2010-12-20 19:02:16 +02:00
Uoti Urpala 4a26b4c024 cosmetics: remove unused code, small formatting tweaks 2010-12-20 06:42:04 +02:00
reimar a7f4b6b102 commands: Allow cycling subtitles backwards with 'J'
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32680 b3059339-0415-0410-9bf9-f77b7e298cf2

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32714 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:21:53 +02:00
cboesch fe3c4810e1 cleanup: remove NULL checks before free() all over the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 13:11:20 +02:00
Clément Bœsch a3124a4f5d options: add OPT_MAKE_FLAGS macro, creates "opt/noopt" flag pair 2010-11-04 06:44:12 +02:00
Uoti Urpala 3cb3bbbddc Add a simple capture feature (-capture)
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
2010-11-02 07:48:31 +02:00
reimar dbd5feedd5 new slave command: af_cmdline, for changing audio filter options
Add experimental af_cmdline slave command to allow changing filter
options at runtime.

Patch by Adrian Stutz [adrian sttz ch]

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32505 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:37 +02:00
reimar 650e8147c1 input: try to open "-input -file=" file even if stat() fails
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
2010-11-02 04:18:37 +02:00
Uoti Urpala 0e0d88ede9 Merge svn changes up to r31256 2010-05-30 16:39:41 +03:00
reimar d7f19144b1 Document that time argument is in milliseconds.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31252 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 18:44:41 +00:00
diego 72ba1c8fec Drop pointles _st suffix from struct mp_cmd_filter and mp_cmd_bind_section.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31246 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 23:36:03 +00:00
Uoti Urpala 7795726e0f Merge svn changes up to r31033 2010-04-26 18:25:34 +03:00
Uoti Urpala 4785c2617e Merge svn changes up to r30967 2010-04-26 17:42:20 +03:00
Uoti Urpala 4cb23ad350 input: remove unused "paused" arguments from some functions 2010-04-25 22:48:18 +03:00
cehoyos 40ac0d3109 Add slave commands for loading and unloading audio filters at runtime.
Patch by Jehan Hysseo, hysseo zemarmot net


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31030 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-04-11 18:59:19 +00:00
cehoyos 543504363f Add osd_show_progression: Show progress bar and elapsed/total time.
Patch by Hugo Chargois, hugo D chargois A free fr


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31028 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-04-09 19:20:52 +00:00
diego 2c7f1f8156 Mark input-related m_option_t arrays as const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31002 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-04-04 16:15:38 +00:00
diego 70c66c0476 Rename get_path.[ch] --> path.[ch].
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
2010-03-20 23:38:27 +00:00
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
Uoti Urpala bc1d0ca37d Merge svn changes up to r30798 2010-03-10 02:35:02 +02:00
reimar 67f9e11d93 Support all line ending types in mp_input_read_cmd.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30779 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 23:09:15 +00:00
diego 93c1e23c47 Mark some more functions that are not used outside of their files as static.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30632 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-18 09:26:00 +00:00
Uoti Urpala 287b62163e Merge svn changes up to r29912 2009-11-16 07:01:46 +02:00
Uoti Urpala 98ee8dd159 Add yuv_colorspace property, implemented in vo_vdpau and vo_xv
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>
2009-11-15 17:03:41 +02:00
cehoyos 2a5611473c Remove CONFIG_TV_TELETEXT.
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
2009-11-07 16:40:42 +00:00
Uoti Urpala 7e63b068bd UI: Make the 'D' key print the new deinterlace status
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'.
2009-09-19 05:34:40 +03:00
Uoti Urpala a0854c1978 commands: Add set_property_osd and step_property_osd 2009-09-19 05:30:20 +03:00
Anton Khirnov 87366694d8 Remove the internal GUI
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.
2009-07-07 21:49:42 +03:00
Uoti Urpala a2037a2eff Merge svn changes up to r29412 2009-07-07 02:56:01 +03:00
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
Amar Takhar e306174952 Translation system changes part 2: replace macros by strings
Replace all MSGTR_ macros in the source by the corresponding English
string.
2009-07-07 01:38:20 +03:00
Amar Takhar b5972d6f14 Translation system changes part 1: wrap translated strings
Replace mp_msg() calls which have a translated string as the format
argument with mp_tmsg and add _() around all other translated strings.
2009-07-07 01:28:07 +03:00
ben 71723dc2c6 Increase slave mode buffer so that one can load files with a deeper
path (or bigger URLs).
Patch by Mathieu Schroeter (mathieu DOT schroeter AT gamesover DOT ch).



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29403 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-06-26 20:21:38 +00:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
Uoti Urpala cf9edda1d3 Merge svn changes up to r29117 2009-04-01 02:43:47 +03:00
diego cfda7714e9 Rename 'default-binds' input option to 'default-bindings'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29058 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-25 21:31:56 +00:00
Uoti Urpala ae2faad666 Merge svn changes up to r28951 2009-03-14 23:52:45 +02:00
reimar 4a5c933303 Add an option to disable the default key binding that MPlayer includes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28878 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-03-08 09:14:30 +00:00
reimar 062f66bbca Make pausing_keep_force the default for the set_mouse_pos and key_down_event -
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
2009-03-07 13:25:55 +00:00
Uoti Urpala a3ab9e8e46 Merge svn changes up to r28149 2008-12-14 17:28:16 +02:00
diego 64a2ccee54 Add standard GPL license header.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28146 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-12-13 18:28:00 +00:00
Uoti Urpala ebb4abf208 Merge svn changes up to r27682
Addition of the "outdir" suboption to vo_png in svn was reverted
before merging.

Conflicts:
	command.c
	mplayer.c
2008-10-02 05:17:23 +03:00
reimar 97cf6acdab Add an experimental pausing_keep_force slave mode command prefix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27665 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-09-25 17:40:33 +00:00
Uoti Urpala 17d3e4b36d Merge svn changes up to r27441
Conflicts:

	cfg-common-opts.h
	command.c
	configure
	input/input.c
	libmpcodecs/dec_video.c
	libmpcodecs/vd.c
	libmpdemux/stheader.h
	libvo/sub.c
	libvo/video_out.c
	libvo/vo_xv.c
	libvo/vosub_vidix.c
	libvo/x11_common.c
	libvo/x11_common.h
	mp_core.h
	mplayer.c
	stream/stream.h
2008-08-08 02:13:09 +03:00
diego 141e81cce4 Rename a bunch of miscellaneous preprocessor directives.
Switch them from a HAVE_ to a CONFIG_ prefix.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27423 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 08:58:07 +00:00
diego 473e2824cb Rename all preprocessor directives related to Apple / Mac OS X.
Switch them from a HAVE_ to a CONFIG_ prefix.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27420 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-06 07:42:26 +00:00
diego 02135001b4 Change a bunch of video/audio-output-specific preprocessor directives from
a HAVE_ prefix to a CONFIG_ prefix.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-03 15:21:40 +00:00
Uoti Urpala 6cce822505 Merge svn changes up to r27399
Conflicts:

	libmpcodecs/vd.c
	libmpcodecs/ve_raw.c
	libvo/video_out.c
	libvo/x11_common.c
	mplayer.c
2008-08-02 22:04:35 +03:00
diego 6138ec05eb Rename preprocessor directive HAVE_MENU --> CONFIG_MENU.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27377 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-30 18:07:19 +00:00
diego 3b31fa5717 Rename two GUI-related preprocessor directives:
HAVE_NEW_GUI --> CONFIG_GUI, HAVE_GTK2_GUI --> CONFIG_GTK2


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27375 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-30 13:44:59 +00:00
Uoti Urpala 04f3909a72 Merge svn changes up to r27374
Conflicts:

	cfg-common-opts.h
	cfg-mplayer.h
	command.c
	configure
	libmpcodecs/dec_video.c
	libmpcodecs/vd.c
	libmpcodecs/vf_vo.c
	libmpdemux/demuxer.h
	libmpdemux/stheader.h
	mp_core.h
	mplayer.c
	stream/stream_radio.c
2008-07-30 16:39:24 +03:00
diego 4b141479da Start unifying names of internal preprocessor directives.
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
2008-07-30 12:01:30 +00:00
Uoti Urpala de560e8167 Merge svn changes up to r27123
Conflicts:

	libmenu/menu_filesel.c
	libmenu/menu_pt.c
2008-06-23 03:58:44 +03:00
ben 59346bc23a Change DVDNAV command key names.
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
2008-06-19 18:51:42 +00:00
Uoti Urpala d5c868325c Merge svn changes up to r26979
Most of the conflicts are trivial.

Conflicts:

	Makefile
	cfg-mplayer.h
	input/input.c
	libmenu/vf_menu.c
	libmpcodecs/dec_video.c
	libmpcodecs/vf_expand.c
	libmpcodecs/vf_vo.c
	libmpdemux/demux_mkv.c
	libmpdemux/demuxer.c
	libmpdemux/demuxer.h
	libvo/vo_directfb2.c
	libvo/vo_gl.c
	libvo/vo_winvidix.c
	libvo/vo_xv.c
	libvo/vo_xvidix.c
	libvo/vo_xvmc.c
	libvo/x11_common.c
	mplayer.c
	osdep/timer-linux.c
	stream/cache2.c
2008-06-04 08:10:48 +03:00
ben bc212e3500 Add a slave command to stop stream playback.
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
2008-05-27 18:39:57 +00:00
ben 9171b9dbe6 fix compilation of input.c if neither macosx/linux apple remote code
is compiled in



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26829 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-18 18:11:05 +00:00
ben 561e9503aa Keep AppleIR enabled by default on MacOSX but have it disable on Linux.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26799 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-18 12:11:17 +00:00
ben 974d4fadad Do not enable AppleIR by default.
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
2008-05-18 11:56:20 +00:00
ben dc6d14fb1b Add support for AppleIR Remote as an input under Linux systems.
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
2008-05-18 11:53:00 +00:00
Uoti Urpala a41db36b22 Merge svn changes up to r26783
Conflicts:

	Makefile
	common.mak
	configure
	libmpcodecs/vd_ffmpeg.c
	libmpdemux/demux_mkv.c
	libvo/vo_xv.c
	mplayer.c
2008-05-15 21:19:35 +03:00
reimar dd73597f8c usec_sleep(0) is not the same as not sleeping at all.
Fixes massive slowdown on Windows.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26718 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-05-10 14:03:42 +00:00
Uoti Urpala 9d27862072 input.c: Use talloc for all memory allocations
Convert the remaining non-talloc memory allocations so that everything
in the file consistently uses talloc. Make one additional minor code
simplification in read_cmd.
2008-05-01 08:10:49 +03:00
Uoti Urpala 8de8be1536 Move input options to option struct 2008-04-30 19:34:48 +03:00
Uoti Urpala d2f4db51fb input: Use talloc for struct mp_cmd and things under it 2008-04-30 14:46:21 +03:00
Uoti Urpala a5fdd8f6f9 input: Move command filedescriptor list to context struct 2008-04-30 14:46:21 +03:00
Uoti Urpala 423b95bf5c input: Move cmd_queue to context struct
Menu instances now also need a input context pointer to queue commands.
2008-04-30 14:46:21 +03:00
Uoti Urpala f7b608812e input.c: Change a static variable to local 2008-04-30 14:46:21 +03:00
Uoti Urpala bfcb3a7a81 input: Move key filedescriptor list to context struct
The context variable is now passed to VOs too as it's now needed to
add a callback on the X filedescriptor.
2008-04-30 14:46:17 +03:00
Uoti Urpala 32e52b8fd0 input.c: Move variable from static to local 2008-04-30 13:24:57 +03:00
Uoti Urpala a2b320fb04 input.c: Move key down state to context struct 2008-04-30 13:24:57 +03:00
Uoti Urpala f7879d206e input.c: Use talloc for command bind allocations 2008-04-30 13:24:57 +03:00
Uoti Urpala d0e8292629 input.[ch]: Move some type definitions from .h to .c
These aren't used outside input.c.
2008-04-30 13:24:57 +03:00
Uoti Urpala a4240ff361 input.c: Remove mp_input_ prefixes from static function names
The prefixes make the code unnecessarily verbose for no real benefit.
2008-04-30 13:24:57 +03:00
Uoti Urpala f328386c33 input.c: Make two functions static 2008-04-30 13:24:57 +03:00
Uoti Urpala 66db9ec7d6 Remove INITIALIZED_INPUT from mpctx->initialized_flags
The input functions are never uninited except at exit. Move the uninit
to player exit function and remove the flag.
2008-04-30 13:24:56 +03:00
Uoti Urpala 7b085d4514 input: Move command bind variables to context struct 2008-04-30 13:24:56 +03:00
Uoti Urpala 9e9932d4d7 Create a context for input.c state
Start moving static variables to a context struct. Only autorepeat
state is moved to the struct in this commit.

mp_input_check_interrupt now requires the context variable. Change
stream functions to pass it. It's still stored in a static variable in
stream/.
2008-04-30 13:24:54 +03:00
Uoti Urpala bde509648f input.c: Remove _st prefix from struct names 2008-04-30 06:30:34 +03:00
Uoti Urpala 3e389c5284 input.c: Use union instead of void * 2008-04-29 12:58:29 +03:00
Uoti Urpala 986e519fc9 input: Remove separate mp_input_add_event_fd
Use the same mp_input_add_key_fd for all uses and add a context
argument to its callback that was before only in the event fd
callbacks. Instead of checking in input.c whether keys were inserted
to the keypress FIFO during the callback do the check in the callback
before returning and set return value accordingly.
2008-04-29 12:55:23 +03:00