| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
"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.
|
|
|
|
|
|
|
|
| |
This simplifies things, although it is slightly less efficient (probably
uses a bit more memory).
This also happens to fix that the OSC dropped the libass cache on every
frame.
|
|
|
|
|
|
|
|
| |
This doesn't have much value. It can't be accessed by anything else than
the actual subtitle renderer (sd_ass.c). sd_ass.c could create the
renderer itself, except that we apparently want to save memory (and some
font loading time) when using ordered chapters or multiple subtitle
tracks.
|
| |
|
|
|
|
|
|
|
|
| |
The end of the current segment will be the end of the file if there is
no next segment. Normally, this didn't matter much, since UNIX files
allow seeking past the end of the file. But when opening files from
HTTP, this would print confusing error messages. So explicitly check for
EOF before trying to read a segment.
|
|
|
|
|
| |
This option takes a playlist. The playlist will then be used as list of
potential segment files for use with ordered chapters.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add the mp_get_user_path() function, and make it expand special path
prefixes. Use it for some things in mpv which take filenames
(--input-config, --screenshot-template, opengl icc-profile suboption).
This allows accessing files in the mpv config dir without hardcoding the
config path by prefixing the path with ~~/. Details see manpage
additions.
|
|
|
|
| |
This way we probably do the right thing, and avoid all the menu shit.
|
| |
|
|
|
|
|
|
| |
Before this, they were displayed forever. Since some dvd screens seem
not to allow escaping from the still frame using the menu, this could
get you stuck forever.
|
|
|
|
|
|
|
|
|
| |
On dvdnav, caching kind of works but not really. (Not our fault, at
least not fully. It's due to libdvdnav being slightly misdesigned; see
previous commit for some explanations.)
The TV code is implemented in the demuxer, and the stream implementation
is just a wrapper, so caching makes no sense here.
|
|
|
|
|
|
| |
No idea why this was disabled. It was in the original MPlayer code,
which doesn't make much sense to me, because using the MPlayer stream
cache seems 100% broken due to design issues.
|
|
|
|
|
|
|
|
|
|
|
| |
Not sure how this should work. Using libdvdnav with a large FIFO doesn't
make sense either: data and control commands use the same stream, so if
you want to send input to libdvdnav, you just have to read from
libdvdnav all the time to get a reaction, which is not compatible with
maintaining a buffer that could remain full for a long time.
I have no idea either whether this improves or worsens anything, though
it might be more correct.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EOF is a special case. Normally, the reader will block until the cache
thread has new data. Obviously we don't want to do this on EOF, because
we'd potentially block forever. On the other hand, EOF will put the
cache thread into a waiting state, so if EOF recovers, this will happen
at a "later" point. This is bad if there is some kind of external event
that ends the EOF condition. In this case, a steram_read() call would
still return EOF. Make it so that the reader waits at least for one
iteration of the cache trying to rad a new block.
Also adjust some debug messages to not print file positions in hex.
|
|
|
|
|
|
| |
There was already something similar in the code that did the actual
seek, but I think seeking to the same position could still trigger an
actual seek due to weid interaction with the buffer.
|
|
|
|
|
| |
And use it in demux_lavf.c. It looks like otherwise, some data might be
left over, depending on how the hell av_seek_frame() behaves.
|
| |
|
|
|
|
|
| |
Not sure if this actually can happen. It doesn't remove the problem that
mpv sometimes shows highlights on nav screens which have no highlight.
|
|
|
|
|
|
|
|
|
|
|
| |
Use the scaled video size (i.e. as shown on the window) as reference for
zoom. This is the easiest way to fix different width/height scale
factors as they happen when zooming video with a pixel aspect ratio
other than 1:1.
Also fix the unscaled mode, so that it 1. doesn't scale even with
--video-zoom, and 2. doesn't scale by small amounts when the video is
cropped by making the window smaller than the video.
|
|
|
|
|
|
| |
Since dvb input is not seekable anyway, this would probably just flush
the stream buffer, but at least it'll avoid a bogus message about
seeking errors.
|
| |
|
| |
|
|
|
|
|
|
| |
This code tried to pass a still monotonic (even if not strictly
monotonic) PTS to the player, but as a result it remained stuck on
the PTS before a reset (since the PTS was lower).
|
|
|
|
|
| |
This set last_pts to bogus values, which is used for relative seeks.
The player usually uses absolute seeks, so this didn't matter much.
|
|
|
|
| |
Oops.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This readds a more or less completely new dvdnav implementation, though
it's based on the code from before commit 41fbcee. Note that this is
rather basic, and might be broken or not quite usable in many cases.
Most importantly, navigation highlights are not correctly implemented.
This would require changes in the FFmpeg dvdsub decoder (to apply a
different internal CLUT), so supporting it is not really possible right
now. And in fact, I don't think I ever want to support it, because it's
a very small gain for a lot of work. Instead, mpv will display fake
highlights, which are an approximate bounding box around the real
highlights.
Some things like mouse input or switching audio/subtitles stream using
the dvdnav VM are not supported.
Might be quite fragile on transitions: if dvdnav initiates a transition,
and doesn't give us enough mpeg data to initialize video playback, the
player will just quit.
This is added only because some users seem to want it. I don't intend to
make mpv a good DVD player, so the very basic minimum will have to do.
How about you just convert your DVD to proper video files?
|
|
|
|
| |
This is not needed, and actually completely incorrect.
|
|
|
|
|
|
|
|
| |
The code to remove a section from the active section array wasn't
correct (it should have tried to copy the elements in reverse), so just
replace it with a macro that does the intended thing.
Add some debug output to print the section stack.
|
| |
|
| |
|
| |
|