mpv: 0.33.1 -> 0.34.0

This commit is contained in:
Danny Rawlins 2021-11-02 15:02:13 +11:00
parent 996f0783b0
commit 6ff6517445
3 changed files with 5 additions and 93 deletions

View File

@ -1,8 +1,7 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3z8HuvO5UZy3oJOGj1wbCDMVAKGRKEXsc4C4VypMky24cpW+rcnB21qn+KICYRdR4jQ3xX8qRtgejLgWbL9fzQY=
SHA256 (Pkgfile) = fa52edc36697c91300b2e73d7f928ab99f6e892b717ff50a8671d17cf006af07
RWSagIOpLGJF39tpg9HD5UXM6ALfzBwnVRR5bBH9yYqr+qjdughISJKPh0rP2K5OQyJD3dMLzcg2T7aiXRM9PII2iw52+Wqghgg=
SHA256 (Pkgfile) = 7c25018bb3af52903df849a7026019d66c671c851595e166b22861f5740021fa
SHA256 (.footprint) = f14555b474f5c94353678e03ba77450f3c745c12b1786ae3740039d17fa35bcd
SHA256 (mpv-v0.33.1.tar.gz) = 100a116b9f23bdcda3a596e9f26be3a69f166a4f1d00910d1789b6571c46f3a9
SHA256 (mpv-v0.34.0.tar.gz) = f654fb6275e5178f57e055d20918d7d34e19949bc98ebbf4a7371902e88ce309
SHA256 (waf-2.0.9) = 2a8e0816f023995e557f79ea8940d322bec18f286917c8f9a6fa2dc3875dfa48
SHA256 (mpv-libplacebo-3.104.0-api-change.patch) = a9f656a163e17a33050ea3ffe51203b948168437c87038239fc3a2424927b35a
SHA256 (mpv.1) = e672df1405028f8a01eed50a2216cc901355ac8704c87453a0a3074721314c18
SHA256 (mpv.1) = eedccbc958ac9f8d95b2973a6a7452680ee99503c8c87d8221fe0581d95ae592

View File

@ -5,18 +5,15 @@
# Optional: docutils youtube-dl libquvi libdvdnav libbluray libcdio-paranoia libvdpau rubberband
name=mpv
version=0.33.1
version=0.34.0
release=1
source=(https://github.com/$name-player/$name/archive/v$version/$name-v$version.tar.gz
https://waf.io/waf-2.0.9
mpv-libplacebo-3.104.0-api-change.patch
mpv.1)
build() {
cd $name-$version
patch -p1 -i $SRC/mpv-libplacebo-3.104.0-api-change.patch
install -m0755 $SRC/waf-2.0.9 waf
[[ -e '/usr/lib/pkgconfig/libcdio_cdda.pc' ]] && PKGMK_MPV+=' --enable-cdda'

View File

@ -1,84 +0,0 @@
From 7c4465cefb27d4e0d07535d368febdf77b579566 Mon Sep 17 00:00:00 2001
From: Niklas Haas <git@haasn.xyz>
Date: Thu, 3 Dec 2020 08:25:23 +0100
Subject: [PATCH] vo_gpu: placebo: update for upstream API changes
The concept of sample/address modes was moved from `pl_tex` to
`pl_desc_binding`.
The `pl_tex_blit()` function also underwent an API change.
---
video/out/placebo/ra_pl.c | 31 +++++++++++++++++++++++++++++--
1 file changed, 29 insertions(+), 2 deletions(-)
diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c
index f8df590511..8244acff26 100644
--- a/video/out/placebo/ra_pl.c
+++ b/video/out/placebo/ra_pl.c
@@ -144,8 +144,14 @@ bool mppl_wrap_tex(struct ra *ra, const struct pl_tex *pltex,
.blit_dst = pltex->params.blit_dst,
.host_mutable = pltex->params.host_writable,
.downloadable = pltex->params.host_readable,
+#if PL_API_VER >= 103
+ // These don't exist upstream, so just pick something reasonable
+ .src_linear = pltex->params.format->caps & PL_FMT_CAP_LINEAR,
+ .src_repeat = false,
+#else
.src_linear = pltex->params.sample_mode == PL_TEX_SAMPLE_LINEAR,
.src_repeat = pltex->params.address_mode == PL_TEX_ADDRESS_REPEAT,
+#endif
},
.priv = (void *) pltex,
};
@@ -195,10 +201,12 @@ static struct ra_tex *tex_create_pl(struct ra *ra,
.blit_dst = params->blit_dst || params->render_dst,
.host_writable = params->host_mutable,
.host_readable = params->downloadable,
+#if PL_API_VER < 103
.sample_mode = params->src_linear ? PL_TEX_SAMPLE_LINEAR
: PL_TEX_SAMPLE_NEAREST,
.address_mode = params->src_repeat ? PL_TEX_ADDRESS_REPEAT
: PL_TEX_ADDRESS_CLAMP,
+#endif
.initial_data = params->initial_data,
});
@@ -399,7 +407,18 @@ static void blit_pl(struct ra *ra, struct ra_tex *dst, struct ra_tex *src,
pldst.y1 = MPMIN(MPMAX(dst_rc->y1, 0), dst->params.h);
}
+#if PL_API_VER >= 103
+ pl_tex_blit(get_gpu(ra), &(struct pl_tex_blit_params) {
+ .src = src->priv,
+ .dst = dst->priv,
+ .src_rc = plsrc,
+ .dst_rc = pldst,
+ .sample_mode = src->params.src_linear ? PL_TEX_SAMPLE_LINEAR
+ : PL_TEX_SAMPLE_NEAREST,
+ });
+#else
pl_tex_blit(get_gpu(ra), dst->priv, src->priv, pldst, plsrc);
+#endif
}
static const enum pl_var_type var_type[RA_VARTYPE_COUNT] = {
@@ -627,9 +646,17 @@ static void renderpass_run_pl(struct ra *ra,
struct pl_desc_binding bind;
switch (inp->type) {
case RA_VARTYPE_TEX:
- case RA_VARTYPE_IMG_W:
- bind.object = (* (struct ra_tex **) val->data)->priv;
+ case RA_VARTYPE_IMG_W: {
+ struct ra_tex *tex = *((struct ra_tex **) val->data);
+ bind.object = tex->priv;
+#if PL_API_VER >= 103
+ bind.sample_mode = tex->params.src_linear ? PL_TEX_SAMPLE_LINEAR
+ : PL_TEX_SAMPLE_NEAREST;
+ bind.address_mode = tex->params.src_repeat ? PL_TEX_ADDRESS_REPEAT
+ : PL_TEX_ADDRESS_CLAMP;
+#endif
break;
+ }
case RA_VARTYPE_BUF_RO:
case RA_VARTYPE_BUF_RW:
bind.object = (* (struct ra_buf **) val->data)->priv;