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>
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>
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.
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.
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.
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.
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.
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.
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.
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")
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
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.
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