Commit Graph

259 Commits

Author SHA1 Message Date
Uoti Urpala e5e8effca8 Add a context argument to mp_input_add_event_fd callback 2008-04-23 13:41:04 +03:00
Uoti Urpala 1f086d4376 input/input.c: Minor simplification 2008-04-23 13:41:04 +03:00
diego c9b0ef9bca Get rid of recursive make for the input/ subdirectory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26340 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-06 23:09:06 +00:00
reimar 6ac6e38c28 Fix handling of comments in input.c, current code had useless ifs and in addition
could treat more data as comments than correct.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26222 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-03-11 14:44:19 +00:00
diego a21190b9d3 joystick.c is only ever compiled on Linux, remove pointless #ifdef
around the whole file and dummy functions.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26112 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-28 18:32:17 +00:00
diego 8efb2fa21c Add MPLAYER_ prefix to multiple inclusion guards.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-22 09:09:46 +00:00
diego 835c654bb0 typo fix: inited --> initialized
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-02-14 14:23:55 +00:00
ben e28bd7c6de Add new command to switch between dvdnav titles
Based on parts of dvdnav monster patches from Otvos Attila



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25845 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-24 19:14:05 +00:00
eugeni f817a5dc52 Add ass_use_margins command and property to shift subtitles to margins and back
on the fly.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25842 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-23 21:18:32 +00:00
reimar e5fc538ba5 Fix some types to const
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25794 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-19 11:42:03 +00:00
reimar 2054c24a34 Remove a useless cast
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25754 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-15 09:27:22 +00:00
reimar 003ffcfe79 Make several mapping tables related to input processing const.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25737 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-13 16:13:54 +00:00
uau b5aa5692cd Remove unnecessary <signal.h> includes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25654 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-09 01:17:49 +00:00
reimar 876b028289 Do not use exit_player in the signal handler, this code just can not
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
2008-01-08 21:40:44 +00:00
nicodvb d18dab693a properties to change angle; patch by oattila chello hu
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25604 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-05 14:31:03 +00:00
diego d505bb051b 10l: Replace #define with #endif where I really meant to write #endif.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25582 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-02 00:19:19 +00:00
diego 2b6af2000b Add multiple inclusion guards to all header files that lack them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25581 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-01-01 21:35:58 +00:00
ulion b6870cc5ba From now on, libmenu does not steal all input keys from input modules.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25530 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-26 13:13:48 +00:00
ulion 38473dd468 Add new function for parsing and queueing multi-commands separated by \n or \r.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25347 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-11 08:03:47 +00:00
ulion 5319009dfe Ignore heading spaces when parsing command.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25331 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-10 01:46:02 +00:00
ulion a986e2a1f6 Remove hardcoded key->cmd bindings in libmenu, support custom key bindings
by menu config file.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25291 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-04 10:42:59 +00:00
ulion 9870aa54e3 Do not queue empty cmd.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25256 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-12-02 15:53:33 +00:00
ulion 7961a457ba Use const char * to replace a char * parameter.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25178 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-27 08:27:20 +00:00
ulion 595de9b1fc Support select subtitle by source, add 4 properties:
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
2007-11-25 04:09:04 +00:00
ulion ac46121b3b Fix cmd filter memory leak, free the cmd after filter ate it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24987 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-11-08 05:19:56 +00:00
ulion bc81f68d3a Fix input.conf parse bug when comment follows key binding in the same line.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24906 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-31 01:23:33 +00:00
ulion 9e5f80ded3 Fix input command parser for using only tab to separate the arguments.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24844 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-10-23 00:44:22 +00:00
diego 4d190ca5fc spelling cosmetics
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24663 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-29 19:56:17 +00:00
diego 43bd3a468e warning fixes:
input.c: In function 'mp_input_set_section':
input.c:1640: warning: suggest parentheses around assignment used as truth value
input.c:1643: warning: suggest parentheses around assignment used as truth value
mga_common.c: In function 'mga_init':
mga_common.c:394: warning: suggest parentheses around assignment used as truth value
playtreeparser.c: In function 'parse_smil':
playtreeparser.c:523: warning: suggest parentheses around assignment used as truth value
libmpdemux/demux_ts.c: In function 'ts_parse':
libmpdemux/demux_ts.c:2795: warning: suggest parentheses around assignment used as truth value
libmpdemux/demux_ts.c: In function 'demux_open_ts':
libmpdemux/demux_ts.c:591: warning: 'frame_length' may be used uninitialized in this function


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24444 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-13 13:16:30 +00:00
voroshil c4debc9042 Implement X/27/0 packet decoding.
It contains information about navigation links.

Modified patch from Otvos Attila oattila at chello dot hu


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24264 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 14:10:47 +00:00
diego 84157efa5a Clean up the way get_path is handled: Compile get_path.c to an object to link
against instead of directly #including the C file and replace the many extern
declarations by a proper header file.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-28 11:20:24 +00:00
reimar 40bb01cb45 Process any waiting commands (got_cmd set). Should fix e.g. smplayer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24245 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-27 15:21:12 +00:00
reimar 2d1a05ce75 Revert r24158, it is not necessary with unsigned bitfield
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24161 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 09:29:27 +00:00
reimar aceb7e5eb8 Change bitfield to unsigned so that we get the usual truth values
(1 = true, 0 = false) instead of -1 for true.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24160 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 09:27:43 +00:00
reimar 5488283cf6 Hack around broken bitfields in gcc 4.2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24158 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 07:35:35 +00:00
reimar cd2a7ee82f Fix invalid fd check, the bug is somewhere else though.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24157 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 07:30:17 +00:00
reimar fde163a48f HACK: check added fds for validity because otherwise mplayer
crashes due to using FD_SET on -1


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24156 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 07:08:49 +00:00
reimar 8adf56e9a3 Fix loads of warnings
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24155 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 06:52:17 +00:00
uau ad5c7d5bb1 Handle queued commands from input event functions immediately
Check whether an event handler called mp_input_queue_cmd and return the
command immediately if so. Currently x11_common.c creates commands from
mouse position updates.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24154 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:20 +00:00
uau 95a174a65a Add separate event input type for terminal+vo
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
2007-08-25 04:28:14 +00:00
uau 24802b1def Use a single select() for both key and slave input
Previous code used two separate select() calls one after another, so
that whenever it was running select() on one set of fds events in the
other set would go unnoticed until later. Now there's a single select()
which allows reacting immediately to any input source.

The behavior of the new code differs somewhat from the old; for example
multiple fds that stay readable are no longer handled in a round-robin
fashion and the total amount the process sleeps can differ. Some tuning
might be required later.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24151 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:11 +00:00
uau c51c1fc668 Make terminal input work more like VO key input
The Unix version of getch2() could either return an internally buffered
key or do a second-level select() in addition to the input.c one and
then read more data. Change getch2() to always add all read keys with
mplayer_put_key() (like video output window keyboard input does) and
remove the internal select() from the Unix version. Make input.c call
mplayer_get_key() directly.

The primary motivation for this change is to make combining multiple
event sources under one select() easier. Now getch2() only needs to be
called when the corresponding fd is readable, and it will be possible to
handle events from X-based VOs with the same code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24149 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:08 +00:00
uau dcd9ee6d5a Remove unused function
The only case which does not override mp_input_default_key_func in
mp_input_add_key_fd() is fd 0, but that is later special-cased not to
use the input function at all. Remove the useless default function.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24148 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:06 +00:00
uau 42b90fa1c3 Use bitfield instead of manual bit fiddling in input.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24147 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:04 +00:00
voroshil f1fbca4bdd Automatic TV channels scanning ability for MPlayer.
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
2007-08-23 16:09:30 +00:00
diego f7ad582be5 Clarify comment as pointed out by Ulion.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24062 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-15 08:34:45 +00:00
diego 8de8cfdeee cosmetics: prettyprint
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24058 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-14 14:30:27 +00:00
diego bcf0c984f0 Apple Remote support
patch by Zoltan Ponekker, pontscho kac.poliod hu
cleaned up by Ulion, ulion2002 gmail com with some help by Reimar and me


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24057 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-14 14:29:22 +00:00
voroshil 4f0d56b9ae Teletext support.
Part 2/5: options/slaves/configure/definitions/etc


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23920 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-29 17:55:28 +00:00
albeu 63865de207 Add a loop command and property.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23747 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-09 14:52:46 +00:00