| Commit message (Collapse) | Author | Age |
|
|
|
| |
libmpv does not need this.
|
|
|
|
|
|
|
|
|
|
| |
Also refactors the usage of tex_upload to make ra_tex_upload_pbo a
RA-internal thing again.
ra_buf_pool has the main advantage of being dynamically sized depending
on buf_poll, so for OpenGL we'll end up only using one buffer (when not
persistently mapping) - while for vulkan we'll use as many as necessary,
which depends on the swapchain depth anyway.
|
|
|
|
|
| |
Also use lavfi setfield instead of removed field-dominance.
Remove missing remainder of field-dominance in docs.
|
|
|
|
|
|
| |
As pointed out by uau on IRC, the pointer to info is still used outside
of the lock. An extremely small race condition window, but still a race
condition.
|
|
|
|
|
|
|
|
|
|
| |
The struct m_thread_info pointer is part of an array, that will be
reallocated if another thread is created while the run_thread is just
being called. In previous versions of this code, the pointer was stable
(as long as the thread existed), so this was overlooked.
Fixes #4770. I'm not sure why this triggers it so reliably, while it
remained undetected otherwise.
|
|
|
|
|
|
|
|
| |
Completely untested (rsound dev libs unavailable on my system). Trivial
enough that it's very likely that it'll just work. No port selection,
but could be added by parsing it as part of the device name.
Should fix #4714.
|
|
|
|
|
|
|
| |
Somewhat lazy fix. The code isn't particularly robust or correct wrt.
window embedding.
Fixes #4784.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds handling of spherical video metadata: retrieving it from
demux_lavf and demux_mkv, passing it through filters, and adjusting it
with vf_format. This does not include support for rendering this type of
video.
We don't expect we need/want to support the other projection types like
cube maps, so we don't include that for now. They can be added later as
needed.
Also raise the maximum sizes of stringified image params, since they
can get really long.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This broke screensaver/powersave inhibition with at least KDE and
LXDE. This is a release blocker.
Since fdo, KDE and GNOME idiots seem to be unable to reach
a consensus on a simple protocol, this seems unlikely to get
fixed upstream this year, so revert this change.
Fixes #4752.
Breaks #4706 but I don’t give a damn.
This reverts commit 3f75b3c3439241c209349908fa190c0382e44f05.
|
|
|
|
| |
This reverts commit 6694048272619b7f91d161c040b818ff63e65279.
|
|
|
|
| |
Unused since 16e0a3948288.
|
| |
|
|
|
|
|
| |
it's unused and added automatically. we need to guard the deactivation
since it's a 10.12+ feature.
|
|
|
|
| |
silence build warnings, clean up code style and remove unused code.
|
|
|
|
|
| |
make the menu bar look more like a standard macOS menu bar, with all the
standard menu items like About, Help, Open, etc.
|
| |
|
|
|
|
|
|
| |
dst was not supposed to be initialized, the mp_audio_ setters (which
initialize dst's fields) assume it is -> shit happens. Regression from
recent changes. Was probably harmless.
|
|
|
|
| |
Surprisingly makes the code shorter, not longer
|
|
|
|
| |
These were left behind by e4bc563fd2dc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- tex_uploads args are moved to a struct
- the ability to directly upload texture data without going through a
buffer is made explicit
- the concept of buffer updates and buffer polling is made more explicit
and generalized to buf_update as well (not just mapped buffers)
- the ability to call tex_upload/buf_update on a tex/buf is made
explicit during tex/buf creation
- uploading from buffers now uses an explicit offset instead of
implicitly comparing *src against buf->data, because not all buffers
may actually be persistently mapped
- the initial_data = immutable requirement is dropped. (May be re-added
later for D3D11 if that ever becomes a thing)
This change helps the vulkan abstraction immensely and also helps move
common code (like the PBO pooling) out of ra_gl and into the
opengl/utils.c
This also technically has the side-benefit / side-constraint of using
PBOs for OSD texture uploads as well, which actually seems to help
performance on machines where --opengl-pbo is faster than the naive code
path. Because of this, I decided to hook up the OSD code to the
opengl-pbo option as well.
One drawback of this refactor is that the GL_STREAM_COPY hack for
texture uploads "got lost", but I think I'm happy with that going away
anyway since DR almost fully deprecates it, and it's not the "right
thing" anyway - but instead an nvidia-only hack to make this stuff work
somewhat better on NUMA systems with discrete GPUs.
Another change is that due to the way fencing works with ra_buf (we get
one fence per ra_buf per upload) we have to use multiple ra_bufs instead
of offsets into a shared buffer. But for OpenGL this is probably better
anyway. It's possible that in future, we could support having
independent “buffer slices” (each with their own fence/sync object), but
this would be an optimization more than anything. I also think that we
could address the underlying problem (memory closeness) differently by
making the ra_vk memory allocator smart enough to chunk together
allocations under the hood.
|
|
|
|
|
|
|
|
|
| |
Instead of merging it into render_dst. This is better for vulkan,
because blitting in vulkan both does not require a FBO *and* requires a
different image layout.
Also less "hacky" for OpenGL, since now the weird blit=FBO requirement
is an implementation detail of ra_gl
|
| |
|
|
|
|
|
| |
Also update to use newer lavfi-bridges for the relevant filters to
shut up warnings about deprecated crop filter.
|
|
|
|
|
|
|
|
| |
This affects small seeks backwards while within the buffer. Demuxers
usually avoid this, so it's probably not triggered very often. (Although
demux_mkv.c potentially triggers it often, and it uses stream_peek() to
explicitly guarantee that it can use this code to seek back.) The
condition is complex enough to warrant an assertion.
|
|
|
|
| |
More betterer.
|
| |
|
|
|
|
| |
These are no longer valid anyway, and the code doesn't use them.
|
|
|
|
| |
Sigh...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is pretty pointless, but I believe it allows us to claim that the
new code is not affected by the copyright of the old code. This is
needed, because the original mp_audio struct was written by someone who
has disagreed with LGPL relicensing (it was called af_data at the time,
and was defined in af.h).
The "GPL'ed" struct contents that surive are pretty trivial: just the
data pointer, and some metadata like the format, samplerate, etc. - but
at least in this case, any new code would be extremely similar anyway,
and I'm not really sure whether it's OK to claim different copyright. So
what we do is we just use AVFrame (which of course is LGPL with 100%
certainty), and add some accessors around it to adapt it to mpv
conventions.
Also, this gets rid of some annoying conventions of mp_audio, like the
struct fields that require using an accessor to write to them anyway.
For the most part, this change is only dumb replacements of mp_audio
related functions and fields. One minor actual change is that you can't
allocate the new type on the stack anymore.
Some code still uses mp_audio. All audio filter code will be deleted, so
it makes no sense to convert this code. (Audio filters which are LGPL
and which we keep will have to be ported to a new filter infrastructure
anyway.) player/audio.c uses it because it interacts with the old filter
code. push.c has some complex use of mp_audio and mp_audio_buffer, but
this and pull.c will most likely be rewritten to do something else.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extracts non-ANGLE specific code to d3d11_helpers.c, which is
modeled after egl_helpers.c. Currently the only consumer is
context_angle.c, but in future this may allow the D3D11 device and
swapchain creation logic to be reused in other backends.
Also includes small improvements to D3D11 device creation. It is now
possible to create feature level 11_1 devices (though ANGLE does not
support these,) and BGRA swapchains, which might be slightly more
efficient than ARGB, since its the same format used by the compositor.
|
|
|
|
| |
Oops.
|
| |
|
|
|
|
|
|
| |
If it doesn't work this time, I'll remove all X11 screensaver code.
Fixes #4763.
|
|
|
|
| |
Commit 697c4389a9e6 worked "almost". I couldn't test it at the time.
|
|
|
|
| |
Used the wrong binding.
|
|
|
|
|
|
|
|
|
|
| |
This is for legacy GL: if VAOs are not available, the helper has to
specify vertex attributes again on every rendering. gl_vao_init() keeps
the vertex array for this purpose. Unfortunately, a temporary argument
was passed to the function, instead of the permanent copy.
Also, it didn't use num_entries (instead expected the array being
terminated by a {0} entry). Fix that source code indentation too.
|
|
|
|
|
|
|
|
|
| |
This reverts commit ea40fa36eef15384b4c0218fb102f92f5cd1cdff.
This caused strange runtime failure on Raspbian (when running mpv,
vc_dispmanx_display_open() returned 0, while other dispmanx using
programs were fine). The problem must have been something about the
compiler flags, maybe linking order or set of include paths.
|
|
|
|
|
|
|
| |
These are useless and shouldn't be confused with normal RGB formats.
Replace the earlier hack checking the format name with a proper check.
(Not sure when this flag was added. Libav won't have it anyway, but also
no bayer formats.)
|
|
|
|
| |
Like AV_PIX_FMT_GBRPF32LE.
|
|
|
|
| |
As announced by the previous deprecation.
|
|
|
|
| |
No reason to have it in a higher level.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refresh seeks are automatically issued when changing filters, which
improves user experience if these filters change buffering or such.
The refresh seek could actually overwrite a previously ongoing seek:
set pause yes
set time-pos 10
set vf ""
Here, the video code issued a refresh seek to the previous video
position, which could be different from the previously triggered (and
still ongoing) seek, this overwriting the seek.
Factor all refresh seek handling into a new function, and make it handle
ongoing seeks correctly.
Remove the weird new canonical_pts field, which actually had no use.
Fixes #4757.
|
|
|
|
|
|
|
|
|
|
|
| |
Commit f1d161d55f45 accidentally added the handle_force_window() call if
no track is selected.
This was OK, but breaks something like "mpv *", where some files are not
playable (like subtitle files) - the unplayable files would remove and
recreate the VO window, which is annoying.
Just drop the call again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit c6fafbffaca1 we accidentally set the logical texture size to
the cropped video size, which is not correct. This caused rendering
artifacts in some cases.
Use the video surfaces size instead. Since the current mp_image_params
contains the cropped size only, wrapper texture creation has to be moved
to the _map function. Move the same code for the mixer case (strictly
speaking this is not needed, but seems more symmetric).
(Also there is no need to clear gl_textures on uninit - leftover from
the old hwdec mapper API. So we just drop that part.)
Fixes #4760.
|
|
|
|
| |
I imagine this is useful. Or maybe it isn't.
|
|
|
|
|
|
|
|
|
|
|
| |
This oddly triggers bogus EOF when switching filter graphs between two
audio files (in this case, "[vid1]f[vo];[aid2]f[ao]"->"[aid1]f[ao]",
with aid2 being an external audio source).
This commit also fixes desync when seeking with an external file
connected via --lavfi-complex.
(Yes, the audio resync code is cursed.)
|
|
|
|
|
|
|
|
| |
Tends to be somewhat glitchy if subtitles are enabled, and you enable
and disable tracks.
On error, this will disable --lavfi-complex, which will result in
whatever behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was _always_ called, even if the resampling was static, or the
filter was inserted for format conversion only. This should have been
fine, as I expected the function not to enable resampling when the
compensation is unset, and the source/target rates are the same. But
this is not the case, and it always enables resampling.
So explicitly avoid the call. If we have already called it successfully,
it's better not do avoid it (to overwrite the previous compensation
value), but it will also be cheap/no-op then.
Probably fixes #4716.
|
| |
|