Commit Graph

51601 Commits

Author SHA1 Message Date
Dudemanguy f575b3d1bd w32_common: remove executable bit from file
5736737750 mistakenly changed the mode
from 644 to 755. Change it back.
2023-12-15 10:27:44 -06:00
der richter c661435648 mac: add support for drag-and-drop option 2023-12-15 16:59:52 +01:00
Guido Cella 8ceaec1742 console.lua: clear the suggestions when you move the cursor
Clear completion suggestions from functions that move the cursor, so
that you can't insert suggestions at the wrong spot by pressing Tab
again after moving the cursor,

Also clear suggestions from some editing functions that were never
updated. It is not actually necessary to clear suggestions from
functions that remove text in front of the cursor, but since
handle_del() already clears them, let's just clear them everywhere.
2023-12-15 15:45:11 +00:00
Guido Cella 86c8ef5c1f console.lua: complete current-tracks sub-properties
Also inline option-info's sub-properties so we don't have to define
sub-properties at the top of the function for every one we decide to
complete.
2023-12-15 15:45:00 +00:00
Guido Cella b09deda37a console.lua: implement case-insensitive completion
This is useful for completing files and more rarely for profiles. It
will also be useful to third-party scripts interacting with the console
once the API to do it is merged.
2023-12-15 15:44:48 +00:00
der richter f805b180d0 mac: add support for window-id property
returns the NSWindow
2023-12-15 09:20:10 +01:00
Leo Izen e9d0a31dfe demux/codec_tags: add jxl/jpegxl extension mapping to image codecs
Add .jxl as a file extension that maps to an image codec. Note that
this will include animated JXL files, but .gif is also on that list so
they are not different in that regard.
2023-12-14 12:36:42 +01:00
karelrooted 3250f6e447 options: add --secondary-sub-pos
The default value is 0 (on the top of the screen)
2023-12-13 21:18:57 +00:00
Niklas Haas b690531f30 Revert "OSC: Remove merriment"
This reverts commit af2635d8c9, and
restores feature parity with VLC.
2023-12-13 19:29:39 +01:00
Mia Herkt af2635d8c9
OSC: Remove merriment
I honestly don’t care either way but I also don’t believe this innocent
and cute hat is worth repeatedly having people show up on the issue
tracker to aggressively virtue signal and then shit-talk the project
elsewhere when their “concerns” are ignored and made fun of.
For the record, I approve of neither brand of childish nonsense.

If your workflow depends on December festivities, feel free to use an
alternative OSC implementation.

Fixes #13082 and #9548
2023-12-13 18:06:22 +01:00
Dudemanguy 6d1383383b playlist: correctly populate playlist-path with the --playlist option
When using the --playlist option on the commandline, it would mark all
entries on the command as having the playlist-path of the value of that
passed option, not just the ones that were expanded from it. Fix this by
moving the playlist_populate_playlist_path to the same place where the
playlist file gets expanded.

Ref https://github.com/mpv-player/mpv/issues/13075#issuecomment-1852179164
2023-12-13 15:25:14 +00:00
nanahi 9b001b448c github/issue_template: unify spellings
"behavior" is written in US English form in all templates except here.
2023-12-12 18:56:40 +01:00
nanahi 415901dedd github/issue_template: request uploading attachments to github
https://0x0.st/ has a maximum retention period of 1 year, and much less
for larger files. Uploading them directly to github issue avoids this,
which most people are already doing anyway because of greater convenience.

log file: don't request 0x0.st.
sample files: recommend github first.
2023-12-12 18:56:40 +01:00
nanahi ebb7fbc5d2 github/issue_template: unify requested information across templates
Add more and unify requested information:

windows, linux, others: request GPU model to provide more info about
known hardware limitations and hardware/driver combo bugs.
windows, others: request general GPU info.
build: request meson version.
windows, linux, others: request backtrace in case of crash.
all: clarify the language of not attaching a log file.
2023-12-12 18:56:40 +01:00
Dudemanguy 9e27b1f523 sub: don't busy loop if the player is paused for cache
When updating subtitles while paused, mpv waits until a packet is
available. However in the case of a network stream, it is possible that
mpv will pause itself when buffering for cache reasons. This makes that
particular loop do a busy loop and can take a long time depending on
network streams. Simply just don't do the loop here if we are paused for
cache reasons. Fixes #13077.
2023-12-12 18:54:46 +01:00
Vonfry 8f22916f85 etc/mpv.desktop: add audio/vnd.wave and video/vnd.avi 2023-12-12 00:32:15 +01:00
nanahi 566a96f220 w32_common: rename some camelCase struct member names to snake_case 2023-12-10 16:35:40 +01:00
nanahi 66ebce758f win32: temporarily disable aero shake while dragging hack is active
The dragging hack can cause unwanted aero shake activation.
Prevent this by saving the window arrangement state before dragging,
temporarily disable it while dragging hack is active, and restore to
the original state after dragging ends.
2023-12-10 16:35:40 +01:00
nanahi 5736737750 win32: stop fullscreen window from moving while dragging hack is active
The mouse down handler checks w32->current_fs to determine whether
to begin the dragging hack. Unfortunately, the w32->current_fs value
is stale, because the input is handled asynchronously, and we cannot
wait for an up-to-date value if dragging needs to be kept resonsive.

As a result, when the fullscreen state changes after the dragging
model loop is entered, the opposite value is used, so the window stays
draggable after entering fullscreen, and becomes undraggable after
exiting fullscreen.

With the resonsiveness and model loop constraints, the up-to-date
state must be queried inside WM_MOVING messages which are sent while
dragging. The message handler now checks if the dragging hack is active
while the window is in fullscreen, and overrides the new window position
with the current one, in effect prevents the window from being moved.

The old check is also removed, so the window is now draggable after
exiting fullscreen while dragging hack is active.
2023-12-10 16:35:40 +01:00
nanahi 5cc810e7f8 x11_common: fix compose key handling
Compose key doesn't function in X11 because XFilterEvent() isn't called,
and XNInputStyle is set to a wrong value. This results in KeyPress events
for the separate keyboard inputs in the compose key input sequence
instead of the composed character, making it impossible to input certain
characters which require compose key.

Fix this by calling the required XFilterEvent() and set XNInputStyle
to the correct value.
2023-12-10 14:55:41 +01:00
Dudemanguy 443c2487d7 filter_sdh: add full width parentheses to the enclosures string
Since these are technically parentheses, we'll treat them the same way
as normal parenthesis. Fixes #11155.
2023-12-08 18:14:06 +00:00
Dudemanguy ce958b7742 filter_sdh: add --sub-filter-sdh-enclosures option
This filter is a bit complicated, but one of the essential parts of it
is removing text enclosed by particular set of characters (e.g. text
inbetween []). This was previously hardcoded to only take into account
parenthesis and brackets, but people may want to filter more things so
make this customizable. The option only takes "left hand characters" so
the right pair is mapped internally if applicable. If not, then we just
use the same character. Fixes #8268 since the unicode character in
question can just be passed to this option.
2023-12-08 18:14:06 +00:00
Dudemanguy b7d85f0d4a filter_sdh: combine skip_bracketed and skip_parenthesized
These two functions are almost exactly the same. The parenthesis variant
is essentially just a special case with more conditions to not remove
text. These can easily be combined together into one generic
skip_enclosed function to handle both cases. We also use char * instead
of char for the character comparison here since not everything is
neccesarily 1 byte and can fit into a char. This will be useful for the
following commits where we extend this logic further.
2023-12-08 18:14:06 +00:00
sfan5 2193893be7 player/command: make new overlay-add arguments actually optional
fixes: 4754bd54c7
2023-12-08 18:31:33 +01:00
Graham Booker 4754bd54c7 player/command: add ability to scale overlay 2023-12-08 13:37:26 +01:00
Guido Cella f886eb5678 console.lua: cycle through completions 2023-12-06 19:06:58 +00:00
Christoph Heinrich c16f868dd7 console: automatically determine the font_hw_ratio
A simplified version of the text width estimation code from uosc.

An osd_overlay is created with compute_bounds=true for measuring the
width of the lower case alphabet at what's estimated to be the largest
font size possible without clipping.

The lower case alphabet was chosen to get decent results for proportional
fonts, even if they aren't officially supported.
2023-12-06 19:06:41 +00:00
nanahi 21bd301372 DOCS/interface-changes: document renaming of MP_KEY_BACK
The navigation key is renamed to avoid conflict with MP_KEY_FORWARD.
2023-12-06 11:07:37 +01:00
nanahi 79068baf43 win32: properly handle WM_XBUTTONUP and WM_XBUTTONDOWN
According to MS documentation, an application should return TRUE from
WM_XBUTTONUP and WM_XBUTTONDOWN if it processes these messages.
DefWindowProc generates the WM_APPCOMMAND message when it processes the
WM_XBUTTONUP message, so if an application properly handles WM_XBUTTONUP
messages, extra WM_APPCOMMAND messages won't be generated.

Because mpv doesn't properly handle these messages,
WM_XBUTTONUP causes APPCOMMAND_BROWSER_BACKWARD to be generated, resulting
in duplicated keys and improper fix 438ead7a, which prevents the processing
of the appcommand from sources other than mouse clicks.

Fix this by following the documentation, and the back and forward
appcommands can be added.
2023-12-06 11:07:37 +01:00
nanahi 4c47dbe22c input: add missing forward media key
XF86Back and XF86Forward are mostly used to navigate file and web browsers
to go back/forward in history. XF86Forward isn't recognized right now,
so add it.

Because XF86AudioForward already takes the "FORWARD" name, rename the
browse keys to GO_BACK and GO_FORWARD instead.
2023-12-06 11:07:37 +01:00
Guido Cella df166997ae console.lua: simplify the condition to print to the terminal
This was a simpler fix to not print the console log to the OSD while
switching VO.
2023-12-06 10:59:40 +01:00
llyyr 562450f59e m_option: respect pathlist seperator when printing
Apparently we never did this
2023-12-04 20:35:50 +01:00
Mateusz Łukasik fd21e72bc1 mpv.desktop: add keywords 2023-12-04 20:34:31 +01:00
Kacper Michajłow 06e627048f image_writer: default to lossless AVIF screenshots
Also change the example to crf=23. crf=32 is pretty bad quality, don't
give users bad usage ideas.
2023-12-04 20:34:17 +01:00
Kacper Michajłow fca3e60827 image_writer: add missing mp_image_params in convert_image
Fixes chroma location for screenshots.

Also set the crop to full frame to not trip mp_image_params_equal check
if not necessary.
2023-12-04 20:34:17 +01:00
Kacper Michajłow a722194684 image_writer: print screenshot format in verbose log
It is useful information, not only for debugging.
2023-12-04 20:34:17 +01:00
Kacper Michajłow 4949cab734 image_writer: use common format selection for AVIF screenshots
--screenshot-avif-pixfmt no longer defaults to yuv420p.
2023-12-04 20:34:17 +01:00
Kacper Michajłow 8884902d8b Revert "github/workflows: install xxhash on msys2"
This reverts commit 67aa568437.
2023-12-04 09:56:27 +01:00
Kacper Michajłow dda14de13d Revert "ci/mingw: use vulkan-loader v1.3.266"
This reverts commit 9d8dfc7b49.
2023-12-04 09:56:27 +01:00
karelrooted ea0e9b74a3 meson: use subprocess-dummy.c fallback when fork func doesn't exist 2023-12-03 22:28:45 +01:00
Kacper Michajłow b323d2877a ao_wasapi: clean GUID definitions
Add ifndefs to define only when needed and remove some already defined
ones in mingw.
2023-12-03 22:24:13 +01:00
Kacper Michajłow a436af0f26 ao_wasapi: fix MP3 GUID
While CEA-861 defines MP2 as 0x5 and MP3 as 0x4, the GUIDs defined in
ksmedia.h are in reverse order.

See: https://github.com/MicrosoftDocs/windows-driver-docs/pull/3742
2023-12-03 22:24:13 +01:00
nanahi 26c6f228fe input: fix double click handling
On practically all platforms and GUI toolkits, a triggered double click
event clears the mouse input buffer so that the next click won't
trigger another double click event. mpv doesn't do this, so a third click
results in another double click event.

Fix this by resetting the double click timer after a double click event
is triggered which achieves the same effect.
2023-12-03 22:23:05 +01:00
der richter f551a9da34 mac: report modifier keys on precise scrolling
modifier keys weren't reported when using the trackpad to scroll.

Fixes #11195
2023-12-02 14:59:59 +01:00
der richter aaff9edf57 mac: fix initial window size and position when already maximized
in the case the window was already set to a maximized size via geometry
or related options (100%x100%) the maximize function would try to
maximize the window again. this reset the position and slightly
increased the size further.

to prevent this only maximize on init if we really want to maximize. in
the reverse case make a noop call by passing the current zoom state.

Fixes #11193
2023-12-02 14:58:01 +01:00
Dudemanguy 67aa568437 github/workflows: install xxhash on msys2
msys added xxhash has a makedep for libplacebo* which means we need to
install it in the CI as well if we want to build against it.

*: 07f4c34d22
2023-11-30 15:58:58 +00:00
Guido Cella 8b4a995a9d playloop: use a 16:9 ratio with --force-window
ca2b05c0fb changed the window size with --force-window and no video
tracks to be closer to 16:9, but I don't see why we shouldn't have an
actual 16:9 ratio. The advantage is that subtitles with fullscreen and
no video tracks will have the same size and position (depending on the
values of --sub-scale-with-window and --sub-use-margins) as with 16:9
videos, because there will be no (invisible) black bars.
2023-11-30 15:08:56 +00:00
sfan5 7dff735241 ci: remove dvbin from freebsd run
As it is now, the FreeBSD CI is failing because meson can't find the
dvb headers.
FreeBSD puts the relevant headers into /usr/local which is bothersome
and in fact required a workaround to be added to the Wayland detection
already (3bdf702b1d) but this should be
addressed by us adding the path to CFLAGS already.

With a more minimal example the detection works fine in my FreeBSD VM.
I'm at my wits end debugging this so just disable it for now.
2023-11-29 20:36:37 +01:00
sfan5 c69e3415d2 meson: enable dvbin by default again
This was disabled by default in 99cef59fc9 (from 2017)
due to build issues with old kernel headers.
Whatever was considered old at that time will be ancient now
and with the last commit there should be no isses auto-detecting it.
2023-11-29 20:36:37 +01:00
sfan5 67b75a3b34 meson: fix check for dvbin availability 2023-11-29 20:36:37 +01:00