| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Saves a little bit of pain.
|
| |
|
|
|
|
|
|
|
| |
Remove the nonsensical print_lock too.
Things that are called from the option validator are not converted yet,
because the option parser doesn't provide a log context yet.
|
|
|
|
| |
Same deal as with video/fmt-conversion.c.
|
| |
|
| |
|
|
|
|
|
| |
Using m_property_do() is more complicated, and will have to be changed
later for mp_msg conversions.
|
| |
|
|
|
|
|
| |
Replacement for MSGT_IDENTIFY. Can't kill it off completely yet; certain
people would complain to me personally.
|
|
|
|
| |
Too bad.
|
|
|
|
|
|
| |
This is printed right before abort(), which is bad style anyway.
Converting this to mp_msg will help nobody, and passing through a mp_log
is effort.
|
|
|
|
|
|
| |
This ended up a little bit messy. In order to get a mp_log everywhere,
mostly make use of the fact that va_surface already references global
state anyway.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the messages printed on unknown pixel format messages.
Passing a mp_log to them would be too messy. Actually, this is a good
change, because in the past we often had trouble with these messages
printed too often (causing terminal spam etc.), and printing warnings or
error messages on the caller sides is much cleaner.
vd_lavc.c had a change earlier to print an error message if a decoder
outputs an unsupported pixel format.
|
|
|
|
| |
Adds an awkward mp_log argument for error messages.
|
|
|
|
|
|
| |
This requires the caller to provide a mp_log in order to see error
messages. Unfortunately we don't do this in most places, but I guess we
have to live with it.
|
|
|
|
|
|
|
|
|
| |
lcms2 has a global message callback for error reporting. If you don't
set this, these error messages are silently thrown away. I think we
still want the error messages, so we have to do dumb stuff to avoid
clashes. This doesn't handle the case if another library in the same
process sets the message callback, but at least this should exclude
possible memory errors when running multiple instances of mpv.
|
|
|
|
| |
Will be needed for other parts (especially in gl_lcms.c).
|
|
|
|
| |
Doesn't cover vdpau/vaapi parts yet, because these are a bit messier.
|
| |
|
|
|
|
|
|
|
|
|
| |
This has similar problems as the ALSA message callback, though in theory
we could use the Display handle to find the right mpv instance from the
global callback. It still wouldn't work if another library happens to
set the error handler at the same time. There doesn't seem much of an
advantage overriding the error handler (though it used to be required),
so remove it.
|
|
|
|
|
|
|
| |
This could output additional, potentially useful error messages. But the
callback is global and not library-safe, and would require us to add
additional state. Remove it, because it's obviously too much of a pain.
Also, it seems ALSA prints stuff to stderr anyway.
|
|
|
|
|
|
|
| |
I don't know under which circumstances this can error (other than a
broken format string). It seems it won't return an error code on I/O
errors, so maybe broken format strings are the only case. Either way,
don't continue if an error is returned.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have certain race conditions coming from doing multiple fprintf()
calls (setting up colors etc.). I'm not sure whether it would be worth
changing to code such that we do only one fprintf() call (and assume
this synchronizes access), but considering it would be hard to do
(Windows compatibility, ...), and that stdio uses per FILE locks anyway,
this is simpler and probably not less efficient. Also, there's no
problem handling the weird statusline special case this way.
Note that mp_msg_* calls which are silent won't acquire the lock, and
acquiring the lock happens on actual output only (which is slow and
serialized anyway).
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically, reimplement --msglevel. Instead of making the new msg code
use the legacy code, make the legacy code use the reimplemented
functionality.
The handling of the deprecated --identify switch changes. It temporarily
stops working; this will be fixed in later commits.
The actual sub-options syntax (like --msglevel-vo=...) goes away, but I
bet nobody knew about this or used this anyway.
|
|
|
|
|
| |
In particular, condense the legacy MSGT_ defines and move them to the
end of the file.
|
|
|
|
| |
mp_msg_levels[] will go away.
|
|
|
|
| |
Instead, --msgmodule uses the same formatting as -v.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
See previous commit. Drop no-osd prefixes, as this is the default for
send_commandv anyway. send_command should probably be renamed later.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
"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.
|
|
|
|
|
| |
The instructions hardcode some paths, so it sure would be better if the
listed commands actually use this path.
|
|
|
|
|
| |
There are still some using IDENTIFY, and some without context in
configfiles.c.
|
|
|
|
|
| |
Otherwise, output will actually be muted during pre-pase stage, and it
will exit before running it again with output enabled.
|
| |
|
|
|
|
| |
This was supposed to be done in commit 80b34ebe.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Broken due to recent header renaming. Untested.
|
|
|
|
| |
Direct access is deprecated.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Requires a small workaround.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This was a gettext-style macro to mark strings that should be
translated.
|
|
|
|
| |
assume yadif).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Get rid of the mp_ prefix.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Don't print an empty string if the command is missing.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
"-" 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Instead, do whatever the normal "quit" command does, which currently
is returning a status of 0.
|
|
|
|
|
|
|
|
|
|
| |
There's no reason why we should do this. For some reason, the existing
code reset terminal handling to default after unloading a file, just to
initialize it again when loading a new file.
Might be related to github issue #412, although I don't think it helps,
since the default SIGTERM handler _should_ kill the mpv process.
(It's still a nice simplification, though.)
|
|
|
|
|
|
|
| |
The OSD style settings depend on the PlayRes, simply because all style
values are implicitly scaled by the PlayResY in libass. Also, the OSC
changes the PlayResY in certain situations, so something could go wrong.
But not sure if this actually matters in practice.
|