| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of reallocating almost all of the shader string several times
per pass, build it into a fixed buffer that will be reallocated as
needed.
While this still uses a linear search and full comparison of the shader
text, this will compare the shader's string length first before doing a
full comparison as a nice side effect. (That's also why the fragment
shader is compared first - it's more likely to be different for
different cache entries than the vertex shader stub.)
|
| |
|
|
|
|
| |
For now only found in Libav.
|
|
|
|
|
| |
vd_lavc.c had this, and soon I'll need it in ad_lavc.c too. For now it's
unused.
|
|
|
|
|
|
| |
The mp_set_av_packet()/mp_pts_from_av() functions check whether the
timebase is set at all (i.e. AVRational.num!=0), so there's no need to
fiddle with pointers.
|
|
|
|
|
| |
Use bstr as appending buffer, which should avoid frequent reallocation
and copying. The previous commit should help with this a little.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, bstr_xappend_vasprintf() called vsnprintf() always twice:
once to determine how much output the call would produce, and a second
time to actually output the data to the (possibly resized) target
memory.
Change this so that it tries to output to the already allocated memory
first, and repeat the call only if allocation is required.
This is especially helpful, as bstr_xappend_vasprintf() is designed to
avoid reallocation when building strings. Usually, the second
vsnprintf() will happen only at the beginning, when the buffer hasn't
been extended to his largest needed size yet.
Not sure if there is a need to optimize this; but see the next commit.
|
|
|
|
|
| |
Broken in commit d6c99c85. vo_opengl_cb.c adds the corner case that
p->osd can be NULL. This make opengl-cb always crash.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
JSON IPC works on Windows now, and although the transports for each
plaform have similar characteristics, they unfortunately have different
names (Unix domain sockets on Linux/Unix vs. named pipes on Windows.)
Hopefully this change better reflects the purpose of the option too,
since with --input-ipc-server, mpv acts as an IPC server that can
service many simultaneous clients (as opposed to --input-file, which can
only do one-to-one IPC.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the JSON IPC protocol with named pipes, which are
probably the closest Windows equivalent to Unix domain sockets in terms
of functionality. Like with Unix sockets, this will allow mpv to listen
for IPC connections and handle multiple IPC clients at once. A few cross
platform libraries and frameworks (Qt, node.js) use named pipes for IPC
on Windows and Unix sockets on Linux and Unix, so hopefully this will
ease the creation of portable JSON IPC clients.
Unlike the Unix implementation, this doesn't share code with
--input-file, meaning --input-file on Windows won't understand JSON
commands (yet.) Sharing code and removing the separate implementation in
pipe-win32.c is definitely a possible future improvement.
|
|
|
|
|
| |
Also change the property to an int, since using double is questionable
and pointless.
|
|
|
|
|
|
|
|
|
| |
Shader miscompilation and bad output.
Regression probably since commit 93546f0c (or one of the following
ones).
Fixes #2982.
|
|
|
|
| |
Found by clang-tidy.
|
|
|
|
|
|
|
|
|
| |
Glitches when resizing are still possible, but are reduced. Other VOs
could support this too, but don't need to do so.
(Totally avoiding glitches would be much more effort, and probably not
worth the trouble. How about you just watch the video the player is
playing, instead of spending your time resizing the window.)
|
|
|
|
|
|
|
| |
Should reflect I/O speed.
This could go into the terminal status line. But I'm not sure how to put
it there, since it already uses too much space, so it's not there yet.
|
|
|
|
|
|
|
|
|
|
|
| |
The old algorithm produced results which were not uniformly distributed,
i.e. some particular shuffles were preferred over others.
The new algorithm is an implementation of the Fisher-Yates shuffle which
is guaranteed to shuffle uniformly given a sufficiently uniform rand()
and ignoring potential floating-point errors.
Signed-off-by: wm4 <wm4@nowhere>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, we have tried to create a GL 3.0 context. The main reason for
this is that many Mesa-based drivers did not support anything better.
But some drivers (Mesa AMD) will not report a higher OpenGL version,
because their compatibility mode is restricted. While later GL features
are reported as extensions just fine, there doesn't seem to be a way to
determine or enable higher GLSL versions.
Add some more shitty hacks to try to deal with this messed up situation,
and try to probe each interesting GL version separately (starting with
3.3, then 3.2 etc.). Other backends might suffer from similar problems,
but these will have to deal with it on their own.
Probably fixes #2938, or maybe not.
|
|
|
|
| |
This line was added in ae5df9be98e4193342321f30285655fcf88e7e63, and it appears to have been a typo.
|
|
|
|
|
|
|
|
|
| |
Prevents an infinite loop of configure event and set_fullscreen
request on Weston and other compositors respecting the protocol.
Fixes #2817
This reverts commit eb6b2b6e50e6e3d3db41190ad818d8b966750734.
|
|
|
|
|
|
| |
This colorspace has been historically used as a calibration target for
most digital projectors and sees some involvement in the UltraHD
standards, so it's a useful addition to mpv.
|
|
|
|
|
| |
The .exe extension *is* required. It only kind of worked without it due to the
--check-c-compiler flag.
|
|
|
|
|
| |
Apparently, you're not supposed to use msys2 pkg-config for mingw stuff.
Also, in msys2, python *is* python3.
|
| |
|
|
|
|
|
|
|
|
|
| |
This changes behavior somewhat. The old behavior can be restored by
running "mp.use_suspend=true". It was originally introduced for the OSC,
but I can't reproduce whatever misbehavior I was seeing.
(See mp.suspend()/resume() for explanations what the suspend mechanism
does.)
|
|
|
|
| |
Regression since commit 6640b22a.
|
|
|
|
|
| |
"Normal" seeks, which don't actually switch the segment, do not need to
reinit the decoders.
|
|
|
|
|
|
|
|
|
|
|
| |
converted_imgfmt will be used by the renderer logic to build an
appropriate shader chain. It doesn't influence the format of any
textures. Thus it doesn't matter whether the hw video surface is mapped
as RGB or RGBA. What matters is if the video actually contains alpha or
not. Since virtually all hardware decoder do not support alpha in any
way, this can be hardcoded as "no alpha".
This avoids unnecessary GPU work.
|
|
|
|
|
|
|
|
| |
This also gets rid of the kind of hard to read texture swizzle setup and
turns it into something dumber.
Assumes that we don't create any FBOs with 2 channel formats. (Only the
video source textures are handled by this commit.)
|
|
|
|
|
|
|
|
| |
This is particularly useful for opus which allows only a fairly restrictive set
of samplerates. If the codec doesn't provide a list of samplerates, just
continue to try the requsted one and hope for the best.
fixes #2957
|
|
|
|
| |
It duplicates the logic that was previously used here.
|
|
|
|
|
|
| |
This function chooses the best match to a given samplerate from a provided
list. This can be used, for example, by the ao to decide what samplerate to use
for output.
|
|
|
|
| |
Not quite sure when/why exactly this was broken.
|
|
|
|
|
|
| |
Regression since commit 93546f0c.
Fixes #2956.
|
|
|
|
|
|
|
|
| |
* Use the update-core command
* Add --check-c-compiler=gcc to be safe
* Add warning about potential pitfalls of adding C:\msys2\mingw64\bin to %PATH%
* Recommend winpty
* Add note about ANGLE
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously, gl->DXOpenDeviceNV was called twice using dxva2 with dxinterop. AMD
drivers refused to allow this. With this commit, context_dxinterop sets its own
implementation of MPGetNativeDisplay, which can return either a
IDirect3DDevice9Ex or a dxinterop_device_HANDLE depending on the "name" request
string. hwdec_dxva2gldx then requests both of these avoiding the need to call
gl->DXOpenDeviceNV a second time.
|
| |
|
|
|
|
|
| |
This will work for the X11 backend. It could be easily extended to
Wayland too, maybe.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drag&drop mechanisms typically support multiple types for the drop data.
Move most of the logic which types are accepted and preferred to
event.c, where the data is also interpreted.
(Maybe sorting the types by assigning scores is over-engineered, since
they're already sorted by preference, but it's actually not much more
code.)
Not very interesting/meaningful yet, but preparation for the next
commit.
|
|
|
|
|
|
| |
Reduces VO access and makes the code more self-contained. (One day the
windowing backend code should not access the VO anymore. We're just not
quite there yet.)
|
|
|
|
| |
In particular remove version.h to deal with my temporary build problem.
|
|
|
|
|
| |
mp_switch_track() doesn't do it automatically for whatever reason, so do
it here.
|
|
|
|
|
|
| |
Still not sure if the current text is actually understandable.
Also fix a typo.
|
|
|
|
|
|
|
| |
This also takes care of sending the required property change
notifications.
Fixes #2929 and maybe fixes #2920.
|
|
|
|
|
|
| |
TERM isn't used anymore (except possibly indirectly by vo_caca).
MPV_LEAK_REPORT should be thread-safe, modulo bugs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of displaying it only on playback start (or after switching
tracks), always display it even after a seek.
This helps with --lavfi-complex. You can now overlay e.g. audio
visualizations over cover art, and it won't break after a seek.
The downside is that this might make seeks with huge cover art slower.
There is also a glitch on seeking: since cover art pictures always
have timestamp 0, the playback time will be 0 for a moment after seek,
and then revert to audio PTS (as video is considered EOF). This is also
due to how lavfi's overlay filter behaves. (I'm not sure how to tell
lavfi that it's just a single frame.)
|
|
|
|
|
| |
Almost only a cosmetic change, although it decreases pointless
referencing/dereferencing of the cover art packet too.
|
|
|
|
| |
This is a shitty hack, but also not terribly offensive.
|
| |
|
| |
|
| |
|
|
|
|
| |
Also mention dxva2-copy along with vaapi-copy.
|
|
|
|
|
|
| |
Like dxinterop, this uses StretchRect or RGB conversion. This is unavoidable as
long as we use the dxva2 API, as there is no way to access the raw hardware
decoded Direct3D9 surfaces.
|
| |
|
|
|
|
|
| |
some extractors don't return a format_note for their audio stream which
resulted in commandv complaining "argument 4 is not a string" (got nil).
|
|
|
|
| |
Slightly improvement over the previous commit.
|
| |
|
|
|
|
| |
We _really_ try to discourage using older releases.
|
| |
|
|
|
|
| |
Moved to: https://github.com/mpv-player/mpv-examples
|
|
|
|
|
|
|
|
|
| |
This is simpler, because it doesn't have to wait from both threads for
synchronization.
Apart from being simpler/cleaner, this serves vague plans to stop/start
the demuxer thread itself automatically on demand (for the purpose of
reducing unneeded resource usage).
|
|
|
|
|
|
|
| |
This pause stuff is bothersome and is needed only for a few corner-
cases. This commit removes it from the demuxer public API and replaces
it with a demux_run_on_thread() function and refactors the code which
needed demux_pause(). The next commit will change the implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing the byte stream position without cooperation of the demuxer
seems a bit insane, and is certainly useless. A user should do factor
seeks instead. For formats like ts, this will actually translate to byte
seeks, while treating the rest of the playback chain a bit more
gracefully. With this argument, remove write access to this property.
If someone really complains, proper byte seeks could be added as seek
mode (although I'm going to need a convincing argument for this).
Read access changes too, but in a more subtle way.
|
| |
|
|
|
|
|
|
| |
No need to have them everywhere. The only exception/annoyance is
MAX_OSD_PARTS, which is now basically duplicated (and at runtime
initialization is checked with an assert()).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now, there was only 1 global ASS overlay that could be set by all
scripts. This was often perceived as bug when multiple scripts tried to
set their own ASS overlay.
This was kind of hard to solve because the script could set its own ASS
PlayResX/Y, which makes it impossible to share a single ASS_Renderer for
multiple scripts. The OSC unfortunately makes use of this feature (and
unfortunately can't be fixed because it's a POS), so we're stuck with
this complication.
Implement the worst-case solution and fix this by creating separate ASS
track and renderer objects for each script that wants to set an ASS
overlay.
The z-order is decided by the order the scripts set their text first.
This is essentially random, unless you do it at script init, and you
pass scripts in a specific order. Script initialization is currently
serialized (as a feature), so the first loaded script gets lowest
Z-order.
The Lua script API interestingly remains the same. (And also will remain
undocumented, unsupported, and potentially volatile.)
|
|
|
|
|
|
| |
All ASS objects used by the OSD renderer go into struct ass_state.
Preparation for the following commit.
|
|
|
|
|
|
|