Commit Graph

52797 Commits

Author SHA1 Message Date
Mike Will acc69e082f img_format: prevent an offset >= MP_MAX_PLANES into bpp
Addresses the warning: "writing 1 byte into a region of size 0"
2024-08-13 12:35:27 +02:00
Kacper Michajłow e3f426aa4a common/playlist: add missing playlist_dir clear
Fixes: https://github.com/mpv-player/mpv/pull/14555#issuecomment-2282759582
2024-08-11 21:06:13 +02:00
Kacper Michajłow 9978cb821d player/loadfile: don't clear watch later for auto playlist parent file
Fixes: https://github.com/mpv-player/mpv/pull/14555#issuecomment-2282338707
2024-08-11 21:06:13 +02:00
Jonas Karlman ea01b042c2 context_drm_egl: always use drmModeAddFB2WithModifiers
Change to always use drmModeAddFB2WithModifiers for all formats and fall
back on using drmModeAddFB2 if drmModeAddFB2WithModifiers fail.

With the DRM_MODE_FB_MODIFIERS-flag now only being used for formats with
modifiers all formats without modifiers should also work.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-08-11 08:22:59 -07:00
Jonas Karlman 84c18f6b96 drm_prime: fix use of formats with modifiers
Similar to handles the modifiers must be supplied for each plane of the
format or a framebuffer cannot be created.

Use the format_modifier tied to the object used for the plane to fix use
of formats with modifiers.

Also fix the improper use of the DRM_MODE_FB_MODIFIERS-flag for formats
without modifiers.

This fixes playback of videos decoded by e.g. rpivid into a NV12 format
using SAND128 modifer on RPi using the drmprime-overlay interop.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-08-11 08:22:59 -07:00
nanahi d06f3d39cb input.conf: add KP_DIVIDE/KP_MULTIPLY key bindings
Map them to volume up/down, which is arguably the original intent
of these key bindings, as the non-numpad positions of them make
little sense.
2024-08-11 15:08:42 +02:00
nanahi f3a00ea131 various: handle numpad add/subtract/multiply/divide keycodes 2024-08-11 15:08:42 +02:00
nanahi ab0aaaad39 input/keycodes: add KP_ADD/SUBTRACT/MULTIPLY/DIVIDE keycodes
In general, mpv treats numpad keys as separate inputs. The +-*/ keys
however are exceptions so it's not possible to distinguish them from
non-numpad keys.

This adds keycodes corresponding to these keys so that they can be
handled differently.
2024-08-11 15:08:42 +02:00
Kacper Michajłow 4e50da3ddc demux_playlist: use --directory-filter-types for --autocreate-playlist 2024-08-10 23:27:40 +02:00
Kacper Michajłow ff1f8baecd common/playlist: add playlist_set_current() 2024-08-10 23:27:40 +02:00
Kacper Michajłow 73b58722e7 player/misc: add str_in_list() and use it 2024-08-10 23:27:40 +02:00
Kacper Michajłow b73445dcf3 demux_playlist: add only media files when opening directory 2024-08-10 23:27:40 +02:00
Kacper Michajłow 44a3a3293f options: add --{video,audio,image}-exts 2024-08-10 23:27:40 +02:00
Kacper Michajłow 4f1e9e34c3 demux_playlist: add --directory-filter-types 2024-08-10 23:27:40 +02:00
Kacper Michajłow c54ad6933b demux_playlist: add --autocreate-playlist-{video,audio,image}-exts 2024-08-10 23:27:40 +02:00
Kacper Michajłow bb9b862f0c demux: add --autocreate-playlist 2024-08-10 23:27:40 +02:00
Philip Langdale 4b97c23dac video: hwdec: extend look up of hwdecs to consider device type as well
Now that we have identified the device types associated with each hwdec, we
can take advantage of this to ensure that get the right hwdec is chosen when
decoding frames and there are multiple choices available with different device
types.

This is also plumbed into the filter initialisation logic, although in practice
the decision on the hwdec has already been made at this point - still it's
easier than retaining the ambiguous look up logic and worrying that it might
lead to an inconsistent result.
2024-08-10 14:24:36 -07:00
Philip Langdale 7bbf132e20 vo: hwdec: add AVHWDeviceType property to hwdecs
As the first step towards handling scenarios where the are multiple hwdecs for
a given image format but backed by different AVHWDeviceTypes, let us annotate
the hwdecs with their corresponding device types.

From this, we can also see how all the existing hwdecs which match the same
image format also match the same device type.
2024-08-10 14:24:36 -07:00
Dudemanguy 70fad1daa6 DOCS/man: improve explanation on how to shift notes with --pitch
Previously, this was in the rubberband filter but it gives out random
numbers without explaning where they come from. Move it to the --pitch
section instead and reword it a bit. Closes #14652.
2024-08-09 14:22:23 +00:00
Mike Will 88885c0401 audio: add pitch-shifting feature
Uses resampling in tandem with a time-stretching audio filter to
change the audio's pitch while leaving its tempo intact.
2024-08-07 22:56:17 +02:00
Kacper Michajłow 763bcd3e52 ci/freebsd: update to 14.1 2024-08-07 13:09:21 +02:00
Kacper Michajłow 57ed94ced0 ci/win32: update to FFmpeg 7.0 2024-08-07 13:09:21 +02:00
Kacper Michajłow c4b963d775 workflows/fuzz: report OOMs and timeouts 2024-08-07 13:09:21 +02:00
nanahi 0818f6001c console.lua: guard user-data/osc/margins value
Defaults margins to 0 if an external script sets this to an invalid value.
2024-08-06 20:28:44 +02:00
nanahi 9133ce7623 DOCS/man/input: document user-data/osc/margins
This property is used by the built-in OSC and some third-party OSC scripts
to indicate the margin they occupy so that other scripts such as
console.lua can use this value to position UI elements.
2024-08-06 20:28:44 +02:00
nanahi d302fe0de5 DOCS/man/input: reserve user-data/osc and user-data/mpv sub-paths
Currently user-data/osc is used for interpolation between the osc and
other internal scripts. Reserve this sub-path and also user-data/mpv
to make sure external scripts can only use these values as directed.
New internal uses of user-data should use user-data/mpv instead.
2024-08-06 20:28:44 +02:00
Guido Cella ee05804bfa {osc,select}.lua: show playlist entries with trailing /
If a playlist entry ends with a slash these scripts only show the
basename which is empty. Fix this by stripping trailing slashes so that
the last directory component becomes the basename.
2024-08-06 20:27:33 +02:00
llyyr 67bd00f163 input: fix inverted condition
I don't know if this broke anything but the the condition was inverted
as a result of the recent commit.

Fixes: 1a27f3caf7 ("input: use bstr for section name")
2024-08-06 20:26:49 +02:00
llyyr d766fc0914 input: don't mutate 'section' variable inside a loop
This fixes broken input-section parsing

Fixes: 1a27f3caf7 ("input: use bstr for section name")
2024-08-06 20:26:49 +02:00
Kacper Michajłow 6f619d5ef4 vo_libmpv: don't steal pointer provided by the API user
It won't be TA allocated and would fail on header check. Also
documentation doesn't mention that ownership is transfered to mpv, so it
is unexpected.

This will cause existing clients of this API leak this memory, but I
doubt anyone really used it in this broken state.

Fixes: #14633
2024-08-06 20:17:35 +02:00
Kacper Michajłow 25f441b740 fuzzer_set_property: ensure idle is enabled
It is used in play loop to check if playback ended cleanly. Don't allow
set_property to disable idle.
2024-08-04 21:33:36 +02:00
Kacper Michajłow ec40dcca9b loadfile: fix relative file open exclusion for fuzzing 2024-08-04 21:33:36 +02:00
Kacper Michajłow 1a27f3caf7 input: use bstr for section name
Resolves mixed use of bstr in internal processing and char* for storage.
Also makes faster comparision when searching for section and resolves
comparision when name contains null chars.
2024-08-04 21:33:36 +02:00
Kacper Michajłow aa35f2e4bd demux_mf: disable glob for fuzzing 2024-08-04 21:33:36 +02:00
Guido Cella 5f768a688b loadfile,select.lua: print only one bitrate
Print demux-bitrate if available, else hls-bitrate, not both (as
demux-bitrate is generally more reliable). This avoids printing "HLS
kbps" which looks weird.

Fixes
https://github.com/mpv-player/mpv/pull/14453#discussion_r1700550385
2024-08-02 08:41:43 +02:00
llyyr 11ed012c34 player/audio: invert audio_started boolean
Waiting for audio_started to be set to true takes too long which causes
us to miss it for the first frame, instead invert the condition so it's
set on the first frame.

Fixes #14615
2024-08-01 11:45:13 +00:00
Kacper Michajłow 24f42acd1d ad_spdif: update list of DTS_HD profiles 2024-08-01 13:27:08 +02:00
llyyr dcb4b491b2 TOOLS/stats-conv: minor cleanup 2024-08-01 01:58:30 +02:00
llyyr 0c72a2f26d TOOLS/stats-conv: silence linter messages 2024-08-01 01:58:30 +02:00
llyyr f1cd59ba92 TOOLS/stats-conv: convert to pyqt6 2024-08-01 01:58:30 +02:00
Dudemanguy 06470899df github/workflows/{build,fuzz}: exclude pr/issue template paths 2024-07-30 14:08:24 +00:00
Kacper Michajłow 7ab6458cf9 github/issue_template: fix paragraph spacing
Fixes: 051e2a8b7a
2024-07-29 21:55:25 +02:00
Kacper Michajłow 6a43514097 win32/smtc: add thumbnail support 2024-07-29 21:38:19 +02:00
Kacper Michajłow 3bef4a8599 ci/{msys2,win32}: explicitly enable win32-smtc 2024-07-29 21:38:19 +02:00
Kacper Michajłow 5fed12e025 win32: add Media Control support
Add support for SystemMediaTransportControls interface. This allows to
control mpv from Windows media control ui.
2024-07-29 21:38:19 +02:00
Kacper Michajłow 06da680630 ci/msys2: install cppwinrt
Will be useful for future commits.
2024-07-29 21:38:19 +02:00
Kacper Michajłow c430420840 osdep/threads-win32: cast function type directly to avoid warnings 2024-07-29 21:38:19 +02:00
Kacper Michajłow ab3d0b73f7 build: bump minimal Windows version to 10 2024-07-29 21:38:19 +02:00
Kacper Michajłow e17b5c635e VERSION: rename to MPV_VERSION to avoid standard library header conflict
Root directory is added to include directories and `VERSION` conflicts
with `#include <version>` which is standard library header.
2024-07-29 21:38:19 +02:00
Kacper Michajłow 2ad6566e51 meson: define WINRT_NO_SOURCE_LOCATION
Not really needed currently for our limited use of winrt.
2024-07-29 21:38:19 +02:00