| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
In idle mode (no file playing), the track properties such as vid/sid/aid
should return the option setting, instead of the value "no".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WCHAR is more portable. While at least MinGW, Cygwin, and MSVC actually
use 16 bit wchar_t, Midipix will have 32 bit wchar_t. In that context,
using WCHAR instead is more portable.
This affects only non-MinGW parts, so not all uses of wchar_t need to
be changed. For example, terminal-win.c won't be used on Midipix at
all. (Most of io.c won't either, so the search & replace here is more
than necessary, but also not harmful.)
(Midipix is not useable yet, so this is just preparation.)
|
| |
|
|
|
|
|
| |
They are not entirely full-featured in GLES 2, but they appear to
provide all we need. Thus we can enable them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used double-checked locking on pthread_mutex_t.requires_init in order
to lazily initialize static mutexes (since CRITICAL_SECTION has no
native way to do this). This was kind of unclean: we relied on MSVC
semantics for volatile (which apparently means all accesses are weakly
atomic), which is not such a good idea since mpv can't even be compiled
with MSVC.
Since it's too much of a pain to get weak atomics, just use INIT_ONCE
for initializing the CRITICAL_SECTION. Microsoft most likely implemented
this in an extremely efficient way. Essentially, it provides a mechanism
for correct double-checked locking without having to deal with the
tricky details. We still use an extra flag to avoid calling it at all
for normal locks.
(To get weak atomics, we could have used stdatomic.h, which modern MinGW
provides just fine. But I don't want this wrapper depend on MinGW
specifics if possible.)
|
|
|
|
|
|
|
|
|
|
|
| |
See manpage additions.
The main reason for adding this is that we can't guess whether the user
wants his config in his Windows profile or not. The user basically has
to tell mpv what should be done, and the "portable_config" directory
does this implicitly.
Fixes #2042 (approximately).
|
|
|
|
| |
Reverse engineered from tvservice.c.
|
|
|
|
|
| |
Was broken by 68bbab0e42e141896545f1f6e9699bcad2d685f8, which changed
the number of fields to scan, but not the expected return value.
|
|
|
|
|
|
|
| |
Remove the exception for decoding only 1 frame if VO framedrop is
disabled. This was originally done to be able to test potential
regressions when we enabled VO framedrop and decoding 2 frames by
default. It's not needed anymore.
|
|
|
|
| |
In fact, some source files do this.
|
|
|
|
|
|
| |
Instead of special-casing hwdec in the place where the video textures
are used, just set the textures in the image upload function. The
renderer code doesn't need to know whether hwdec interop is used at all.
|
| |
|
|
|
|
|
|
|
| |
This is an unfortunate fact of life. Maybe making this the default
wasn't such a good idea after all.
Also update etc/example.conf. It used an obsolete alias for "auto".
|
|
|
|
|
|
|
|
|
|
|
| |
As suggested in #2033.
Additionally, change "LGPLv2+" to "LGPLv2.1+". Since this was always
used with the "and later" phrase, this doesn't require any further
discussion.
Also clarify that the "+" means "or later". This should be clear to
anyone with a brain, but you never know with copyright.
|
|
|
|
|
|
|
|
|
|
| |
This detected whether an OpenGL context still provided legacy OpenGL if
the OpenGL version is modern (>= 3.0). This was actually only needed for
vo_opengl_old, because it relied on legacy functions. Since it's gone,
this code isn't needed either.
(Also, the removed comment about OpenGL 3.0 was wrong: you could just
query GL_CONTEXT_FLAGS and see if the forward compatible bit was set.)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In paused mode, we never entered the audio EOF state. This shows e.g. in
--keep-open mode, which will not set the eof-reached property correctly.
Regression since commit c06cd1b9. This commit was the wrong fix. We need
to respect the buffer state, and pausing has nothing to do with this.
Fixes #2167.
|
|
|
|
| |
Fixes #2165, more or less.
|
|
|
|
|
| |
This resulted in wrong behavior for values of scale-param1 between 0.0
and 0.5 (not inclusive).
|
|
|
|
|
|
| |
Only do it when the number of threads is autodetected, as more than 16
threads are still considered not recommended. (libavcodec prints a
warning.)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit fb8d15836695e883355c5ec6ff8463e7bbf39461.
Reallocating the FBOs on every resize is very slow. It affects resizing
the window, as well as changing the video size itself with e.g.
panscan. Since the original change was done based on a single user
complaint, but the change itself caused a lot of complaints, we decided
to just revert it.
|
|
|
|
|
|
|
|
|
|
| |
Allow setting an arbitrary amount, instead of the fixed 50%.
This is nto striclty backwards compatible. The defaults don't change,
but the --cache/--cache-default options now set the readahead portion.
So in practice, users who configured this until now will see the
double amount of cache being used, _plus_ the 75MB default backbuffer
will be in use.
|
|
|
|
|
|
| |
Currently, this is perfectly equivalent, because back_size is hardcoded
to buffer_size/2. But this fixes the logic for the case the back_size
can be configured freely.
|
|
|
|
| |
broekn by 739d345d6cf0ead2b25f03ca83123a081b506267
|
|
|
|
|
|
|
|
|
| |
If filters are disabled or reconfigured, attempt to remove and probe the
deinterlace filter again. This fixes behavior if e.g. a software deint
filter was automatically inserted, and then hardware decoding is enabled
during playback. Without this commit, initializing hw decoding would
fail because of the software filter; with this commit, it'll replace it
with the hw deinterlacer instead.
|
|
|
|
| |
In particular, get rid of the EUSERBROKEN message.
|
|
|
|
|
|
|
|
|
|
| |
Instead of calling it "future frames" and adding or subtracting 1 from
it, always call it "requested frames". This simplifies it a bit.
MPContext.next_frames had 2 added to it; this was mainly to ensure a
minimum size of 2. Drop it and assume VO_MAX_REQ_FRAMES is at least 2;
together with the other changes, this can be the exact size of the
array.
|
|
|
|
|
| |
This was requested multiple times by users, and it's not hard to
implement and/or maintain.
|
|
|
|
| |
This did nothing. It's a leftover from ancient times.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle a relatively recently introduced hack, that allows FLAC audio to
have arbitrary channel layouts, instead of just the predefined fixed
ones. This is actually supported by FFmpeg, but since the demuxer
(instead of the decoder) handles this in FFmpeg, we need to add special-
code to our mkv demuxer.
(The way FFmpeg does this seems a bit backwards, since now every demuxer
for a format that can handle FLAC needs to contain this logic as well.)
The FLAC hack is relatively terrible: we need to parse the FLAC headers,
look for a VorbisComment, parse the VorbisComment, and then retrieve
the magic WAVEFORMATEXTENSIBLE_CHANNEL_MASK entry. But the hack is
officially endorsed, as the official FLAC tools use it. (Although I
couldn't find a trace of it in the format specification. Should I be
surprised?)
|
|
|
|
|
| |
This was supposed to have changed back when oversample was reintroduced
in 3007250. Fixes #2155.
|
|
|
|
|
|
|
|
| |
This was a minor optimization to potentially avoid resampler
reconfiguration when the filter is reinitialized. But filter
reinitialization is a rare event, and the case when no reconfiguration
is needed is even rarer. As such, this is an unnecessary micro-
optimization and only adds potential for bugs.
|
|
|
|
|
|
|
|
|
| |
This message bloats verbose log output if e.g. audio speed is frequently
readjusted, such as when syncing audio to video. So don't print the
message if only speed is changed. (This case requires reconfiguration,
but can't change the input/output channel maps.)
Also do not print the message if no remixing is done at all.
|
| |
|
|
|
|
|
|
|
|
|
| |
This was requested by someone.
All code was written by myself; some minor changes by 2 contributors who
agreed to general LGPL relicensing. 1 line of code is by someone unknown
who possibly wasn't asked (setting the "display_fps" variable), and
which can be reasonably ignored as it makes up only 0.1% of the file.
|
| |
|
|
|
|
|
|
| |
Signed-off-by: wm4 <wm4@nowhere>
(With some heavy modifications from the original patch.)
|
|
|
|
|
|
|
|
|
|
|
|
| |
I still have no idea why this is needed, maybe some weird off-by-one
in some shitty driver? Either way, the difference for a working setup
shouldn't be too major, the most noticeable effect would be somewhat worse
performance when resizing the video during playback with interpolation
enabled using the mouse.
That's a specific enough side effect for me to not care as much about it.
Fixes #1814.
|
|
|
|
|
|
| |
Generates too much discussion and confusion.
Fixes #2051.
|
|
|
|
|
|
|
| |
Probably makes users happy who want bitmap subtitles to show up in the
screen margins, and stops them from doing idiotic crap with vf_expand.
Fixes #2098.
|
|
|
|
|
|
|
| |
It's the user's fault if he/she/it does something that is not
recommended.
Fixes #2110.
|
|
|
|
|
|
|
|
| |
There are some situations when redrawing is requested, but the current
frame was deleted. This could happen when switching e.g. hw decoding
mid-stream.
Separate uploading/drawing and fix the condition.
|
|
|
|
| |
broken since 4730e0aabab
|
|
|
|
| |
This avoids having to rewind the video for a second telecine detection pass.
|
|
|
|
|
|
|
| |
Just avoid some code duplication. Also, gl_video_set_options() having a
queue size output parameter is weird at best. While I don't appreciate
that this commit suddenly requires gl_video.c to deal with vo.c directly
in a special case, it's simply the best place to put this function.
|
|
|
|
|
|
| |
That was 2 too many.
Also fix a documentation comment.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The VO will be provided with future frames even if the format changes
mid-stream. This caused a crash if these frames were actually used (i.e.
interpolation mode was enabled).
Fixes a crash when deinterlacing is toggled during playback, and the
deinterlacer changes the stream format (as it can happen e.g. if the
decoder outputs nv12, which in turn happens with hw decoding).
(On a side note, future frames are always non-NULL. Also, the current
frame is of course always in the correct format.)
|
|
|
|
| |
Appears to be required by some hardware. Whatever.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vaQueryImageFormats() returns a randomly ordered list - so we shouldn't
assume the first format on the list which works is the best. This
effectively switches to nv12 instead of yuv420p on some drivers.
We handle this by reusing va_to_imgfmt[], and ordering it by preference.
We hardcode that GPUs prefer nv12 pver yuv420p. In theory we could do
complicated probing (allocate dummy surface + use vaDeriveImage on it,
then retrieve the FourCC) - but all things which could break assumption
in the future are not supported yet (like 10 bit or 4:4:4), so this is
fine.
|
|
|
|
|
|
| |
This reverts commit d660e67be9cc7d79d81e0c09c2720ea6d0a35e3a.
Fixes #2123.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes problems with --vo=opengl:interpolation. The issue here is that
vo_opengl retains more surfaces than what was preallocated for the
decoder. Until now, we just explicitly failed to decode frames for which
no additional surfaces are available. Since modern drivers usually are
fine with not "registering" surfaces before the decoder is created, just
allow allocating additional surfaces if needed.
(We also could probably recreate the HW decoder, since the HW decoder
should be stateless. But let's try to avoid raising the overall
complexity of the code.)
|
|
|
|
|
| |
After recent changes, there is no reason why gl_video_set_image() should
exist anymore. So merge it back into gl_video_upload_image().
|
| |
|
|
|
|
|
| |
You could actually run version.sh, and then the waf build system could
accidentally pick up the generated (and most likely stale) version.h.
|
|
|
|
|
|
|
| |
The interlaced frame test needs to be aware that the input mpi might be
NULL - this happens at the end of a stream when the input frames have
all been submitted but frames still need to be drained from the
decoder.
|
|
|
|
|
|
| |
These were deleted due to inactivity.
Fixes #2135.
|
| |
|
|
|
|
| |
The (...) was closed, but never opened.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ass_set_fonts() is called by mp_ass_configure_fonts(), which was called
every time a subtitle renderer was initialized. I'm not sure why this
was done - I can't find a good reason, and most likely there's none.
However, it did cause problems with an experimental libass branch. It
crashed some time after switching to a second subtitle track. The branch
will hopefully be merged soon, and it seems unlikely that libass wants
to fix its problems with its ridiculous API (rather it should normalize
its API so that the issue doesn't happen in the first place), so just
apply this change. It makes our code simpler too.
|
|
|
|
| |
Fixes #2116.
|
|
|
|
| |
Fixes #1983.
|
|
|
|
|
|
|
| |
Matroska doesn't follow the usual ReplayGain conventions, and doesn't
distinguish between track/album values.
Fixes #2128.
|
|
|
|
|
| |
For the following commit. Also print the replaygain values in verbose
mode.
|
|
|
|
|
| |
Requested by waf's developer. The ftp mirror is going to be closed down in
the short future.
|
|
|
|
|
| |
Previous code did not retrigger a relink when version.h changed since it
didn't use a waf task.
|
|
|
|
|
|
| |
Default key bindings in encoding mode also use code 4, because scripts
will probably want to fail if encoding is aborted (leaving an
incomplete file).
|
|
|
|
|
|
|
|
|
| |
|