Commit Graph

52253 Commits

Author SHA1 Message Date
Kacper Michajłow 4d5642887d win32: add WinMain 2024-05-06 22:01:17 +02:00
Kacper Michajłow 3ffb5c90ee player/configfiles: fix utime.h include for Windows SDK 2024-05-06 22:01:17 +02:00
Kacper Michajłow 7f6bfab0d3 stream_file: declare structures available only in Windows DDK 2024-05-06 22:01:17 +02:00
Kacper Michajłow 9fc2343512 osdep/mpv.rc: fix encoding of MPVCOPYRIGHT
llvm-rc doesn't allow multi-byte codes in narrow utf-8.
2024-05-06 22:01:17 +02:00
Kacper Michajłow ed7fe505b4 common: define some bits for Windows SDK 2024-05-06 22:01:17 +02:00
Kacper Michajłow 3ea684e7ef ao_wasapi_utils: define missing GUIDs for C 2024-05-06 22:01:17 +02:00
Kacper Michajłow 529cc38c67 ao_wasapi_changenotify: fix IsEqualPropertyKey for C 2024-05-06 22:01:17 +02:00
Kacper Michajłow 5cf0da2a6a various: remove unused sys/time.h include 2024-05-06 22:01:17 +02:00
Kacper Michajłow 323ed3cb10 osdep/compiler: clang also recognizes those attributes 2024-05-06 22:01:17 +02:00
Kacper Michajłow 041a925ada osdep/main-fn-win: add struct typedef for compatibility 2024-05-06 22:01:17 +02:00
Kacper Michajłow 419898267e osdep/semaphore: don't include files if they are not used 2024-05-06 22:01:17 +02:00
Kacper Michajłow 86abbb89a7 win32: fix platform checks 2024-05-06 22:01:17 +02:00
Kacper Michajłow 5c2918b4f3 io_utils: use mp_mkostemps instead of mkstemp 2024-05-06 22:01:17 +02:00
Kacper Michajłow b647201795 osdep/dirent: add implementation for Windows SDK build 2024-05-06 22:01:17 +02:00
Kacper Michajłow 7253a7dea9 ao_wasapi: fix include order
ks.h has to be included first.
2024-05-06 22:01:17 +02:00
Kacper Michajłow fffe723fc4 various: move strings.h inclusion to common.h 2024-05-06 22:01:17 +02:00
Kacper Michajłow 18ef834ef4 various: move unistd.h inclusion to common.h 2024-05-06 22:01:17 +02:00
Kacper Michajłow e1e09938c5 meson: add defines for Windows build to avoid warnings
See:
https://learn.microsoft.com/cpp/c-runtime-library/compatibility
https://learn.microsoft.com/cpp/c-runtime-library/security-features-in-the-crt
2024-05-06 22:01:17 +02:00
Kacper Michajłow 94eb07e3ea meson: remove Windows subsystem version, it is 6.0 by default 2024-05-06 22:01:17 +02:00
Guido Cella 6ec3e1549d command: add normalize-path command
This can be used e.g. by a bookmarking script to show normalized paths.
2024-05-05 20:29:27 +02:00
Guido Cella b6615cd474 DOCS/lua: fix some argument names
These need to coincide with the ones in command.c because they can be
specified in mp.command_native.
2024-05-05 20:29:07 +02:00
Guido Cella 67644888e7 DOCS/input: move escape-ass documentation
It should be next to expand-text and expand-path, not under Input
Commands that are Possibly Subject to Change.
2024-05-05 19:57:25 +02:00
Kacper Michajłow 053d971507 misc/path_utils: normalize win32 paths 2024-05-05 19:37:57 +02:00
Guido Cella 1d640c9887 player: normalize paths for resuming playback
Paths like foo.mkv, ./foo.mkv .//foo.mkv, ../"$(basename
"$PWD")"/foo.mkv, and C:\foo.mkv and C:/foo.mkv on Windows, use
different config files for resuming playback, so if you quit-watch-later
and later play the same file with a different path, mpv does not resume
playback. This commit normalizes the paths on Unix to fix this.
2024-05-05 19:37:57 +02:00
der richter 8a61929eb8 cocoa-cb: add support for macOS color space transformation (EDR/HDR)
by default utilises the color space of the screen on which the window is
located. if a specific value is defined, it will instead be utilised.

depending on the chosen color space the macOS EDR (HDR) support is
activated and that OS's transformation (tone mapping) is used.

Fixes #7341
2024-05-05 19:02:50 +02:00
der richter cb75ecf19f github/workflows: add swift linting 2024-05-05 18:30:58 +02:00
Guido Cella 1128989885 test: fflush between printf and abort
This is necessary to show the output with meson test. Followup to
06edb04692.
2024-05-05 17:51:34 +02:00
stax76 01d815d95d powershell-completion: add PowerShell command line completion 2024-05-05 15:38:46 +02:00
Guido Cella 1c42589ce0 DOCS/input: document sub-seek 0
Documents the functionality added by 155f7fa. Also make it clear than
can you can seek with arbitrary <skip>s instead of just 1 and -1.
2024-05-05 15:23:18 +02:00
Kacper Michajłow 427e07b93a docs: mention Cache section in sub-seek
sub-seek depends on cached range to know future subtitles, make it clear
in documentation how to control this range.
2024-05-05 15:08:20 +02:00
Guido Cella b086a404b5 command: return lavfi filters in option-info/[av]f/choices
This adds non-mpv filters to option-info/af/choices and
option-info/vf/choices, which allows completing them with set af/vf
<Tab> in console.lua.

Partial fix of #13017. Getting the filter options would required adding
af-list and vf-list properties.
2024-05-05 14:43:57 +02:00
Kacper Michajłow eab9737ea6 osc: remove trailing space
Fixes: b80e4e46a3
2024-05-05 14:38:18 +02:00
Kacper Michajłow 22ed5d0d3a demux_mkv: fix image detection
If blocks were already demuxed we would skip them and ask for new ones.
For files with few blocks it would return EOF without actually checking
the content.

Also make demux limit higher. In practice it doesn't matter, because if
it is image, video track will have only 1 block. And if it is not image
it will break on 2nd video block.

Fixes: #13975
2024-05-05 14:28:02 +02:00
Aman Karmani abe8f3f9df demux: keep track of ts information per stream type
Signed-off-by: Aman Karmani <aman@tmm1.net>
2024-05-05 14:11:47 +02:00
Kacper Michajłow 4cc9e6f999 win32: fix maximize state with --border=no
WS_POPUP windows cannot be maximized, so instead of forcing it with
unavoidable side-effects, change the window style before maximizing to
make it work correctly.
2024-05-05 14:02:57 +02:00
Guido Cella 646f31f196 sd_ass: don't log if subtitles have unknown duration
Users shouldn't have to care if subtitles' duration is unknown because
the only difference is that decode() sets a duration to packets without
one, if any.

The main difference was code intentionally breaking sub-seek, sub-step,
sub-start and sub-end for unknown duration subtitles for some reason,
but I removed it in 0f2370476b and 185fa9ffc6.

LRC subtitles always have unknown duration so if you use them having
this logged on every song is annoying, so only log it in verbose mode.
2024-05-05 13:59:41 +02:00
Kacper Michajłow d347ee0e91 ci/lint: use long commit hash
No reason to use short hash in script internally.
2024-05-05 13:54:07 +02:00
Kacper Michajłow e42e0f2e2a demux_mkv: make V_QUICKTIME codec detection generic
This allows playing files with any fourcc that is supported by mpv.
2024-05-05 13:53:43 +02:00
Matthias Hunstock 2414051d76 osd: show left arrow when playing backwards
If playback direction is backwards, display a triangle
pointing to the left as status symbol of OSD.
2024-05-05 13:47:20 +02:00
Matthias Hunstock 5631d83b5f tools: add narrow left arrow glyph for OSD
Add rotated arrow glyph on unused codepoint U+E00D.
2024-05-05 13:47:20 +02:00
Matthias Hunstock b80e4e46a3 osc: show left arrow when paused while playing backwards
Use existing glyph for playlist buttons to show a triangle
pointing left if playback is stopped with a backward playback
direction.
2024-05-05 13:47:20 +02:00
sfan5 c4b6d0da38 f_lavfi: reject filters with too many in/outs
The pad count serves as a minimum even if the filter has
dynamic inputs/outputs, so we should reject them here.

At least on FFmpeg 6.1 this results in no practical change
in the list accepted filters.

fixes: 8bf3fe7e2a
2024-05-04 16:13:03 +02:00
Kacper Michajłow 637bc6994f f_decoder_wrapper: clear decoder info on deinit
It is not longer valid and may cause use-after-free if used after
decoder itself is destroyed.

Fixes: #14051
2024-05-04 11:20:38 +02:00
sfan5 943a50b300 ci/mingw: update dependency versions 2024-05-03 23:44:51 +02:00
omar a26bbbd78d OSC: implemented user configurable colors 2024-05-03 16:50:49 +02:00
nanahi 861908c70f win32: make context menu items accessible from the window menu
This makes the context menu items accessible from the window menu,
which can be opened by either right-clicking on the title bar or
left-clicking on the mpv icon on the title bar.
2024-05-03 16:36:02 +02:00
nanahi ee2e14015d win32: move context menu init/uninit to GUI thread
Currently if VO init fails, the context menu is leaked. Additionally,
init/uninit are in the VO thread, while other accesses are in the GUI
thread.

Fix this by moving them to the GUI thread, similar to other resources.
This also lets init function take the mpv HWND in the next commit.
2024-05-03 16:36:02 +02:00
Dudemanguy cb613ba916 wayland: set wl->scaling if there is no wl->current_output yet
If we get either preferred_scale or preferred_buffer_scale this early
during initialization the wl->scaling value should be immediately
updated instead of being deferred until later for correct geometry.
Fixes #14019.
2024-05-03 16:18:35 +02:00
nanahi dec73f503f sub/osd: fix rounding when rescaling bitmap subtitle rects
With multiple rects touching each other without any gaps, the current
scale method can cause gaps or overlaps between rects. To make sure that
this does not happen, scale on the edges of the rects instead, and then
calculate the width and height from the results.

NB: while this is better than the status quo, it does not fix all
scaling artifacts because of the following:

- When two rects share a vertical edge but have different heights,
  misalignment will occur: after rounding rect heights to pixels,
  the height scale factor for the two rects will be slightly different.
  As a result, there will be misalignment between the scaled images.
- With a GPU renderer, different bitmap subtitle parts are rendered as
  different textures. This means that the pixel contents of the parts have
  different boundary conditions from the whole combined image. As a result,
  there will still be small gaps when the subtitle is scaled up.

The only way to properly address these points is to make sure that the
parts are combined to a single image at the native resolution before
being scaled. This can be partly achieved with --blend-subtitles=video.
2024-05-03 16:16:53 +02:00
nanahi e20ca15b66 win32: support multitouch
Use the multitouch API. To disable system's defualt mouse emulation,
set --native-touch=yes.
2024-05-03 16:14:03 +02:00