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.
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.
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.
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.
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.
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
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.
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
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/.
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.
be called from a signal handler.
Instead only make the input system generate quit commands for the first
CTRL+C and otherwise do getch2_disable and exit.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25651 b3059339-0415-0410-9bf9-f77b7e298cf2
1. sub_source for current sub source (sub file, vobsub, or from demuxer).
2. sub_file for all subtitles from files.
3. sub_vobsub for all subtitles from vobsub.
4. sub_demux for all subtitles from demuxer.
Now mplayer can supply a stable and clear interface to external programs
using mplayer in slave mode to select a subtitle by its source and
its unique id for that source printed by mplayer using -identify parameter.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25157 b3059339-0415-0410-9bf9-f77b7e298cf2
Add an input/input.c fd type whose read function takes no arguments and
returns no value. If such a function reads key or command events it'll
add them to the queues itself. Use this type for terminal input which
was special-cased before. The event function for X11-based VOs will use
the same type later.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24152 b3059339-0415-0410-9bf9-f77b7e298cf2
Code is based on patch from Otvos Attila oattila at chello dot hu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24125 b3059339-0415-0410-9bf9-f77b7e298cf2
r23530 breaks policy: notification was not sent to mailing list,
agreements of other devs were not received.
Code also should be reviewed/cleaned up/fixed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23593 b3059339-0415-0410-9bf9-f77b7e298cf2
modified patch from Otvos Attila oattila at chello dot hu
Module uses zvbi library for all low-level VBI operations (like I/O with vbi
device, converting vbi pages into usefull vbi_page stuctures, rendering them
into RGB32 images).
All teletext related stuff (except properties, slave commands and rendering
osd in text mode or RGB32 rendered teletext pages in spu mode) is implemented
in tvi_vbi.c
New properties:
teletext_page - switching between pages
teletext_mode - switch between on/off/opaque/transparent modes
teletext_format - (currently read-only) allows to get format info
(black/white,gray,text)
teletext_half_page - trivial zooming (displaying top/bottom half of teletext
page)
New slave commands:
teletext_add_dec - user interface for jumping to any page by editing page number
interactively
teletext_go_link - goes though links, specified on current page
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23530 b3059339-0415-0410-9bf9-f77b7e298cf2
allows to bind one input key to several slave commands (independently for each section)
as shown below:
RIGHT seek +10
RIGHT {tv} tv_step_channel 1
RIGHT {dvdnav} dvdnav 4
Currenlty only "tv" section added.
patch by Otvos Attila oattila at chello dot hu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23497 b3059339-0415-0410-9bf9-f77b7e298cf2
Patch by Carl Eugen Hoyos [cehoyos <at> ag or at] with modifications by me.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20931 b3059339-0415-0410-9bf9-f77b7e298cf2
it's used to activate the button corresponding to the last mouse position.
This is a workaround against possibly buggy implementation of
upper_lower/upper_button_select() and friends; will be removed when
possible
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19918 b3059339-0415-0410-9bf9-f77b7e298cf2
string on the OSD. Based on a patch 'by someone named "veal" on irc'
that showed the filename.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18223 b3059339-0415-0410-9bf9-f77b7e298cf2
Move the volume and mute command to the command to property
bridge.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17912 b3059339-0415-0410-9bf9-f77b7e298cf2
Patch by Michael Behrisch < behrisch $ informatik * hu-berlin * de >
commited with the kind blessing of D. Richard Felker III
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15047 b3059339-0415-0410-9bf9-f77b7e298cf2
Based on patch by Steve Mueller (diffusor <at> ugcs (dot) caltech [dot] edu),
OSD support by Frank Schertan (scherthan (at) uni-landau <dot> de),
several modifications by me.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13711 b3059339-0415-0410-9bf9-f77b7e298cf2
add support for dvd subs and ogg subs into sub_select
document sub_select
vobsub_lang left as a link to sub_select for backwards compatibility
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13090 b3059339-0415-0410-9bf9-f77b7e298cf2
For a given subtitle language you can now chose to display
only the forced subtitles. Defaut is set to "show all subtitles"
so that current mplayer behaviour is not changed.
For DVD:
Use -forced_subs_only additionally to e.g. -slang en
if you are only interested in the forced subtitles.
For VobSub:
The idx file is now parsed for the "forced subs: ON/OFF" tag
and used according to its settings.
Key:
You can toggle the display of forced subtitles by pressing
"F" (upper case letter).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10918 b3059339-0415-0410-9bf9-f77b7e298cf2
Hi, I found that command line options brightness, hue, contrast and
saturation does not works, becouse mplayer apply it, before open tv
(kernel says invalid ioctl). Here are simple fix. Please apply.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10580 b3059339-0415-0410-9bf9-f77b7e298cf2
helps me.
Patch by Kir Kostuchenko <kir@users.sourceforge.net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10522 b3059339-0415-0410-9bf9-f77b7e298cf2
control. Possible values are top, center, and bottom,
with bottom being the default. Alignment is relevant when
it comes to positioning subtitles with one line (or fewer
lines) of text relative to multi-line subtitles.
It is implemented as a new command (sub_alignment) that
without an argument cycles the alignment (between top,
center, and bottom), or with an argument sets the
alignment (0 for top, 1 for center, 2 for bottom).
The key 'i' is bound to this command.
patch by Oskar Liljeblad (oskar@osk.mine.nu)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8535 b3059339-0415-0410-9bf9-f77b7e298cf2
(skip sections listed in a text file. it also supports creating them)
patch by Michael Halcrow <mah69@email.byu.edu>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8532 b3059339-0415-0410-9bf9-f77b7e298cf2
playing movies. It can be very useful when using desynched subtitles.
A new command 'sub_step' is added, which takes an integer argument.
'sub_step +1' will immediately display the next subtitle, adjusting
sub_delay as if one had used the 'sub_delay' command to navigate to
the subtitle. 'sub_step -1' displays the previous subtitle and
adjusts the sub_delay. By using these two commands you can navigate
among the subtitles without having to search blindly using 'sub_delay'.
patch by Oskar Liljeblad (oskar@osk.mine.nu)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8366 b3059339-0415-0410-9bf9-f77b7e298cf2
a video. I mapped it to the input-keyword "sub_visibility".
This keyword is mapped to the 'v' key on the keyboard. I tested the patch
with old-fashioned subtitles, with freetype subtitles and DVD subtitles.
Works fine. The patch also includes documentation updates.
patch by Uwe.Reder@3SOFT.de
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7629 b3059339-0415-0410-9bf9-f77b7e298cf2
Added a command queue to let mplayer send command to himself
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4822 b3059339-0415-0410-9bf9-f77b7e298cf2