| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
This is multiple times faster than just writing every pixel sequence
separately. Especially on slower terminal emulators. In general no need
to stress I/O, while we can just prepare the frame to print and do it
once.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is mostly motivated by missing
VK_KHR_portability_enumeration instance extension when enumerating the
devices. Which causes issues with MoltenVK which does not advertise full
Vulkan conformance.
To avoid duplicating code use pl_vk_inst_create() which correctly query
availability and enables the mentioned extension.
While at it fix the VkInstance leaking in vk_validate_dev().
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
the unfsContentFrame wasn't updated when externally resized leading to
a wrong unfs window size afterwards. update it on windowDidResize event
when not in fs, not animating and not live resizing.
|
|
|
|
|
|
|
|
|
| |
At least on some compositors, when the pointer enters a surface,
only a wl_pointer_enter event is generated, but not wl_pointer_motion.
This results in the initial mouse position being lost, which is
especially problematic when input simulation is used.
Fix this by setting the mouse position on pointer enter event.
|
|
|
|
|
|
|
|
|
|
|
| |
this broke with the recent refactor of the input handling. one of the
edge cases was not considered, where not every mouse down event has a
corresponding mouse up event, eg all double clicks or more only have one
up event after the first down event.
this was handled correctly previously.
Fixes #13777
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
split up AppHub header in obj-c and c parts and make it a bidirectional
bridging.
|
|
|
|
|
|
|
| |
win32 does not respect --native-keyrepeat option, and native key
repeat has been broken since 0ab3482f73a199b2e839ad4ec0a4b21adc1e75d5.
This lets mpv respect the --native-keyrepeat option on win32.
|
| |
|
|
|
|
| |
The backbuffer format is available.
|
|
|
|
|
| |
The target colorspace depends on whether the xv adaptor supports
setting BT.709 colorspace.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
add new app_bridge objc file for bridging between mpv core and app
functionality. replace old EventsResponder singleton with AppHub.
another step to clean up all App functionality and have one central
place for it.
|
|
|
|
|
|
|
| |
As no drivers were ever released with the unstable extension,
it's not needed anymore.
Not bumping the required headers version yet.
|
| |
|
| |
|
|
|
|
| |
also optimise option cache setup.
|
|
|
|
|
|
| |
since the option handler is not optional anymore and available on init
in cocoa-cb we don't need to duplicate this functionality in libmpv
anymore.
|
|
|
|
| |
gets rid of some unwrapping boilerplate and nil coalescing operators.
|
| |
|
| |
|
|
|
|
| |
delete now empty mpv helper
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both possible paths had bugs:
For OpenGL it passed EGL_CONTEXT_CLIENT_VERSION, which - in older versions
of the standard - was not permitted.
For GLES it always assumed EGL_CONTEXT_FLAGS_KHR to work, which belongs to the
aforementioned extension.
Ironically this was never a problem (probably saved by implementations
not being overly strict) except in 2024 on an emulated Android 14 device
that trips over this edge case. It is a mystery.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When 3cb9119984b88b31a5b958b1b83efe8d1cf0b818 introduced AVIF screenshot
support, FILE * in write functions were replaced by filenames. This
resulted in unnecessary duplication of FILE * handling code and the usage
of avio_open API made it hard to use exclusive open with it.
To unify file handling, use avio_open_dyn_buf instead which writes to
memory instead. This way FILE * can be used for the write functions
and file handling code can be deduplicated. Since we now control
the file opening, exclusive open can now be used for AVIF screenshots.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The screenshot command is documented to not overwrite existing files.
However, there is a race window between the filename is generated with
gen_fname and when the file is open to write. Specifically, the
convert_image function in this window can be very time consuming
depending on video and screenshot image format and size. This results
in existing file being overwritten because the file writing functions
don't check for the existance of file.
Fix this be opening the file in exclusive mode. Add overwrite parameter to
write_image for other operations that are documented to overwrite existing
files, like screenshot-to-file. Note that for write_avif, checking
existance is used instead because avio_open does not support exclusive
open mode.
|
|
|
|
|
| |
Allows compiler to do its job and optimize this code. We don't really
want to repack in-place.
|
|
|
|
|
| |
When a shell link is dropped onto the mpv window, the file name will be
replaced by the file name of its target so that the linked file is played.
|
|
|
|
|
|
|
|
| |
This commit allows image_writer to attach HDR metadata to AVFrames via
the corresponding AVFrameSideData attachments, if present. It does this
by calling pl_avframe_set_color, already used by mp_image_to_avframe.
Signed-off-by: Leo Izen <leo.izen@gmail.com>
|
|
|
|
|
|
|
| |
Fixes the issue described in https://github.com/mpv-player/mpv/issues/11862
for SDR files for non-d3d11 gpu-api. We currently don't have a smarter
way to get the real on-the-wire bpc for other APIs, so this is the best
that can be done.
|
|
|
|
| |
Needed for the next commit
|
|
|
|
| |
warning: embedding a directive within macro arguments has undefined behavior
|
| |
|
|
|
|
| |
warning: `static' is not at beginning of declaration
|
|
|
|
| |
warning: type qualifiers ignored on function return type
|
|
|
|
|
|
|
|
|
|
|
|
| |
Upstream ASS specification says that all subtitles should be rendered
with color primaries and transfer matching their associated video. But
as expected after further discussion the decision has been made to
fallback to SDR mode in case of HDR video.
See-Also: https://github.com/libass/libass/blob/649a7c2e1fc6f4188ea1a89968560715800b883d/libass/ass_types.h#L233-L237
See-Also: libass/libass#297
See-Also: mpv-player#13381
Fixes: mpv-player#13673
|
|
|
|
|
|
|
|
|
| |
Windows 10 top bar height cannot be adjusted individually when
WS_CAPTION is enabled due to buggy DWM NC drawing behavior. The issue is
fixed in Windows 11.
To keep consistent window look remove the border on each side, but only
on Windows 10.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows 11 draws border regardless, so we are 1px off on window size,
blending border with one line of video. Fix that by adding the border to
our internal windows size calculation.
Windows 10 on the other hand has a bug where specifying left and top NC
area will trigger title bar drawn in full height always. Keep old
behaviour in this case. Also while there is similar "visible" border
there, it seems to be transparent on Windows 10.
For high contrast themes, don't adjust title bar height and instead
remove WS_CAPTION to have the same border all around the window, as DWM
doesn't make borders invisible in this case.
|
| |
|
| |
|
|
|
|
|
| |
If the window-maximized is set while in fullscreen, it needs to be applied
when leaving fullscreen, as noted in the comment.
|
|
|
|
|
|
|
|
|
|
|
| |
With runtime geometry change, currently it only results in a
SetWindowPos call to resize the window. However, SetWindowPos doesn't
change the window maximized state, so Windows still thinks that the
window is maximized even though it no longer covers the whole workspace.
This results in visual glitches, and if the window is dragged afterwards
it's "restored" again.
Fix this by correctly setting the window maximized state in this case.
|
|
|
|
|
|
|
|
|
|
|
| |
Currently mpv always uses the previous window size when unmaximizing
or exiting fullscreen. This disregards compositor's preferenced size in
the configure event, resulting in wrong window size if changing window
state and size are delivered in the same configure event.
It's better to always respect the preferenced size instead, unless
the state change is due to runtime geometry change, where we want
to use our preference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the xdg_toplevel_configure handler, in some cases the geometry is
not equal to the width and height in the event. This can happen
when runtime geometry change is requested (a new size is set),
or in the case of wl->state_change || width == 0 || height == 0
(the old size is used).
However, prepare_resize always uses the width and height in the event
and not the corrected geometry here. This causes
xdg_surface_set_window_geometry using the wrong value resulting in
wrong size of window decoration. Amusingly, the debug message right
above it uses the correct size.
Fix this by using the updated geometry size instead. Since now all
prepare_resize have parameters of 0, the width and height parameters
are no longer needed.
Fixes: 828dd65ef84b4d8e95e70752b9eb0833909d1d23
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
8e793bde78f00fbb64223db30851c6d080c4abeb made that changing geometry
while maximized has no effect until the window is unmaximazed. However,
this behavior is inconsistent with setting window-scale on all of win32,
wayland, and x11, which always unmaximizes the window and sets the
window size.
Since setting geometry is conceptually similar to setting window-scale
(both change the window size), they should have the same behavior.
If not fullscreen, unmaximize window on runtime geometry change to
keep the behavior consistent with window-scale.
|
|
|
|
|
| |
Similar to other platforms. Also make sure that the x/y positions are set
on geometry update.
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, setting geometry on runtime only changes the window size
but not the position. This is because reset_size is only set if
the window size is changed, and vo_x11_highlevel_resize doesn't set
the window position without force_window_position enabled. Fix this
by setting the related flags and perform a window move when
geometry is updated.
Fixes 8e793bde78f00fbb64223db30851c6d080c4abeb.
|
|
|
|
|
| |
On supported APIs.
Fixes: https://github.com/mpv-player/mpv/issues/11862
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
We're using mp_sws here, so we should ask it for format support
and not the underlying library (usually swscale) directly.
|
|
|
|
|
|
|
|
|
|
| |
As the first aligned format this required a fix to reconfig().
Adding the other component-swapped formats in this group would be trivial
but I checked the DRM database [1] and no driver exists that supports
one of those but not YUYV and this is quite fringe as-is, so I opted not to.
[1] <https://drmdb.emersion.fr/formats>
|
| |
|
|
|
|
|
|
|
|
|
| |
The VO generic code tries to be helpful and resets this after
each reconfig. However for the simpler VOs the target params
are constant after a reconfig or even for the entire lifetime.
So it's clearly better to let the VO decide.
This also allows the VO to use a static buffer instead.
|
|
|
|
| |
Currently a theoretical concern because we handle all existing formats.
|
| |
|
| |
|
| |
|
|
|
|
| |
some redundant functions that jump through hoops.
|
|
|
|
| |
also make functions thread safe.
|
|
|
|
|
|
|
|
| |
Segfaults otherwise on uninit because some objects are created while
others are not. Move |