Commit Graph

36881 Commits

Author SHA1 Message Date
wm4 5162c2709e msg: cosmetic changes
In particular, condense the legacy MSGT_ defines and move them to the
end of the file.
2013-12-20 21:07:57 +01:00
wm4 591a6722d2 msg: change hack to silence command line pre-parse error messages
mp_msg_levels[] will go away.
2013-12-20 21:07:57 +01:00
wm4 78292058cc terminal: remove separate formatting for --msgmodule
Instead, --msgmodule uses the same formatting as -v.
2013-12-20 21:07:57 +01:00
wm4 4d4b822171 terminal: abstract terminal color handling
Instead of making msg.c an ifdef hell for unix vs. windows code, move
the code to separate functions defined in terminal-unix.c/terminal-
win.c.

Drop the code that selects random colors for --msgmodule prefixes.
2013-12-20 21:07:57 +01:00
Martin Herkt a4fe95b0d8 w32_common: support file drag and drop 2013-12-20 20:27:56 +01:00
Martin Herkt 2d3c7f3b90 input: make parse_cmd_strv take const args 2013-12-20 19:32:45 +01:00
wm4 2f6144c74b osc: use mp.send_commandv
See previous commit. Drop no-osd prefixes, as this is the default for
send_commandv anyway. send_command should probably be renamed later.
2013-12-20 18:02:01 +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 833eba5304 terminal: move SIGTTOU signal handler setup code
This comes with a real change in behavior: now the signal handler is set
only when the terminal input code is active (e.g. not with
--no-consolecontrols), but this should be ok.
2013-12-19 21:31:33 +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 8c7ea10873 crosscompile-mingw.txt: fix instructions
The instructions hardcode some paths, so it sure would be better if the
listed commands actually use this path.
2013-12-19 21:31:18 +01:00
wm4 5e0c4ec3e8 player: replace some overlooked mp_msgs
There are still some using IDENTIFY, and some without context in
configfiles.c.
2013-12-19 21:31:18 +01:00
wm4 7a8207a3fb options: use M_OPT_EXIT with -V
Otherwise, output will actually be muted during pre-pase stage, and it
will exit before running it again with output enabled.
2013-12-19 21:27:09 +01:00
wm4 b4aa39a817 ta: fix compilation with NDEBUG 2013-12-19 21:27:02 +01:00
wm4 b97b92fe40 m_option.h: actually remove config.h include
This was supposed to be done in commit 80b34ebe.
2013-12-19 21:26:09 +01:00
wm4 f5b6710bec stream: remove stale MAX_STREAM_PROTOCOLS define 2013-12-19 21:25:51 +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
Martin Herkt d2e750ccd6 w32_common: fix mouse clicks
Apparently this has been broken for a year or so. The were three
reasons for the breakage here:

    1. The window dragging hack prevented any DOWN event from
       passing through since it always returned before we even got
       the button.
    2. The window style had CS_DBLCLKS in its flags, so we did not
       get any DOWN events when the OS had detected a double click
       (instead expecting us to handle a DBL event).
    3. We never sent any mouse buttons when mouse movement handling
       was disabled.
2013-12-19 21:04:10 +01:00
wm4 03e53ab430 ao_wasapi: fix includes
Broken due to recent header renaming. Untested.
2013-12-18 17:14:31 +01:00
wm4 6ae36d3225 vf_lavfi: don't access AVFilterPad directly
Direct access is deprecated.
2013-12-18 17:13:13 +01:00
wm4 b170248389 ad_lavc: work around deprecation warning
request_channels has been deprecated for years (request_channel_layout
is the replacement), but it appears it's still needed despite the
deprecation at least on older libavcodec versions.

So still set request_channels, but to it with the avoption API, which
hides the deprecation warning. This should also prevent mpv getting
trashed when libavcodec happens to bump its major version.
2013-12-18 17:12:49 +01:00
wm4 80b34ebea4 m_option: don't include config.h in header
Requires a small workaround.
2013-12-18 17:12:27 +01:00
wm4 2c08bf1bd7 Reduce recursive config.h inclusions in headers
In my opinion, config.h inclusions should be kept to a minimum. MPlayer
code really liked including config.h everywhere, though, even in often
used header files. Try to reduce this.
2013-12-18 17:12:21 +01:00
wm4 5e0424f17f stream: move O_BINARY dummy definition 2013-12-18 17:12:16 +01:00
wm4 4ed83fe2e5 Remove the _ macro
This was a gettext-style macro to mark strings that should be
translated.
2013-12-18 17:12:07 +01:00
Rudolf Polzer 761a013736 ildetect: add ILDETECT_FORCE_RUN (if interlacing could not be decided, assume yadif). 2013-12-18 10:56:33 +01:00
wm4 94369170b8 command: better check whether file duration is available 2013-12-17 13:49:11 +01:00
wm4 978e099b65 old-makefile: fix mpvcore references and the DIRS variable 2013-12-17 08:48:34 +01:00
11rcombs ad92c893a0 Fix OSX build; remove all remaining mpvcore references 2013-12-17 08:44:21 +01:00
wm4 0112143fda Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
wm4 73a5417950 Merge mp_talloc.h into ta/ta_talloc.h 2013-12-17 02:18:16 +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 793f85945f Move libquvi stuff to stream/resolve/ 2013-12-17 01:40:26 +01:00
wm4 8d5214de0a Move mpvcore/input/ to input/ 2013-12-17 01:23:09 +01:00
wm4 053c743724 Rename mp_lua.c/h to lua.c/h 2013-12-17 01:15:48 +01:00
wm4 56eafe3344 Rename mp_core.h to core.h
Get rid of the mp_ prefix.
2013-12-17 01:08:53 +01:00
wm4 e449111429 Move mpvcore/player/ to player/ 2013-12-17 00:53:22 +01:00
wm4 7dc7b900c6 Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsg
The tmsg stuff was for the internal gettext() based translation system,
which nobody ever attempted to use and thus was removed. mp_gtext() and
set_osd_tmsg() were also for this.

mp_dbg was once enabled in debug mode only, but since we have log level
for enabling debug messages, it seems utterly useless.
2013-12-16 20:41:08 +01:00
wm4 3e6cd3ef19 input: remove LIRCCD support
This removes support for the "LIRC Client Daemon", which is separate
from LIRC, and hasn't been maintained for 10 years.

See github issue #413.
2013-12-16 20:21:25 +01:00
wm4 9662e3e509 command: mess with previous commit
Nothing actually used the returned length. Since the remaining time can
easily become 0 or negative (e.g. incorrectly estimated file duration),
the time_remaining function still needs 2 return values, though.
2013-12-16 20:14:43 +01:00
Vivek Jain 908dfa7949 command: scale osd’s time remaining by the current speed
Signed-off-by: wm4 <wm4@nowhere>
2013-12-16 20:07:50 +01:00
Alessandro Ghedini e51808ea22 manpage: fix --vf=expand aspect ratio example 2013-12-16 20:06:45 +01:00
wm4 86bf16f449 input: move multi-command parsing somewhere else
I'm planning to add a mode to pass commands as a pre-split list of
strings, and this will probably be useful to reach this goal.
2013-12-16 20:04:51 +01:00
wm4 bc723f1b68 input: adjust code to make quoted/not quoted cases more unified 2013-12-16 20:03:37 +01:00
wm4 19b506ea65 input: better error reporting for missing commands
Don't print an empty string if the command is missing.
2013-12-16 20:03:00 +01:00
wm4 5173900ed4 input: move some command flags into a bitfield 2013-12-16 20:03:00 +01:00
wm4 b65a6c3cd0 input: remove weird syntax for skipping optional arguments 2013-12-16 20:03:00 +01:00
wm4 fe367272bd manpage: undocument syntax for skipping optional arguments in input commands
"-" could skip optional arguments. I think this was a pretty bad idea,
because it introduced a weird special case.

I'll remove the special syntax, but keep compatibility for the "seek"
and "screenshot" commands.
2013-12-16 20:03:00 +01:00
wm4 e8f21b1f0a input: avoid using wakeup pipe if it's not needed
If input is not waiting for select(), writing to the wakeup pipe is
wasteful, and, if there are many wakeups, might even block the wakeup
threads if the pipe gets full.

However, if it's waiting for select(), the wakup pipe must be used to
unblock the waiting thread. Actually there's a small race condition: we
might determine that the main thread is in select(), and write to the
wakeup pipe (whether we do this while unlocked or locked doesn't really
matter). Then, the main thread might leave select() before reading from
the wakup pipe. This should be harmless, because at worst more wakeups
than needed happen, but never fewer.
2013-12-16 20:03:00 +01:00
wm4 048bb2464d mp_msg: define a bunch of convenience macros
In order to use bare mp_log contexts, I find myself creating dummy
structs (with a single "log" field) to use the MP_ERR() etc. macros,
which hardcode the idiom that a context struct has a log field. On the
other hand, just using mp_msg_log() is too much typing (and I want to
rename it to mp_msg() when the transition is done), so it seems nice to
have message printing macros that use mp_log directly.
2013-12-16 20:02:59 +01:00