mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 21:42:18 +00:00
hwdec/dmabuf_interop: Properly prefix priv
struct
Obviously, this should be dmabuf_interop_priv as it's declared in a header file that could get included anywhere.
This commit is contained in:
parent
dbc2d37401
commit
093db2f565
@ -35,7 +35,7 @@ struct dmabuf_interop {
|
||||
void (*interop_unmap)(struct ra_hwdec_mapper *mapper);
|
||||
};
|
||||
|
||||
struct priv {
|
||||
struct dmabuf_interop_priv {
|
||||
int num_planes;
|
||||
struct mp_image layout;
|
||||
struct ra_tex *tex[4];
|
||||
|
@ -66,7 +66,7 @@ struct vaapi_gl_mapper_priv {
|
||||
static bool vaapi_gl_mapper_init(struct ra_hwdec_mapper *mapper,
|
||||
const struct ra_imgfmt_desc *desc)
|
||||
{
|
||||
struct priv *p_mapper = mapper->priv;
|
||||
struct dmabuf_interop_priv *p_mapper = mapper->priv;
|
||||
struct vaapi_gl_mapper_priv *p = talloc_ptrtype(NULL, p);
|
||||
p_mapper->interop_mapper_priv = p;
|
||||
|
||||
@ -117,7 +117,7 @@ static bool vaapi_gl_mapper_init(struct ra_hwdec_mapper *mapper,
|
||||
|
||||
static void vaapi_gl_mapper_uninit(const struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv *p_mapper = mapper->priv;
|
||||
struct dmabuf_interop_priv *p_mapper = mapper->priv;
|
||||
struct vaapi_gl_mapper_priv *p = p_mapper->interop_mapper_priv;
|
||||
|
||||
if (p) {
|
||||
@ -158,7 +158,7 @@ static bool vaapi_gl_map(struct ra_hwdec_mapper *mapper,
|
||||
struct dmabuf_interop *dmabuf_interop,
|
||||
bool probing)
|
||||
{
|
||||
struct priv *p_mapper = mapper->priv;
|
||||
struct dmabuf_interop_priv *p_mapper = mapper->priv;
|
||||
struct vaapi_gl_mapper_priv *p = p_mapper->interop_mapper_priv;
|
||||
|
||||
GL *gl = ra_gl_get(mapper->ra);
|
||||
@ -222,7 +222,7 @@ static bool vaapi_gl_map(struct ra_hwdec_mapper *mapper,
|
||||
|
||||
static void vaapi_gl_unmap(struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv *p_mapper = mapper->priv;
|
||||
struct dmabuf_interop_priv *p_mapper = mapper->priv;
|
||||
struct vaapi_gl_mapper_priv *p = p_mapper->interop_mapper_priv;
|
||||
|
||||
if (p) {
|
||||
|
@ -27,7 +27,7 @@ static bool vaapi_pl_map(struct ra_hwdec_mapper *mapper,
|
||||
struct dmabuf_interop *dmabuf_interop,
|
||||
bool probing)
|
||||
{
|
||||
struct priv *p = mapper->priv;
|
||||
struct dmabuf_interop_priv *p = mapper->priv;
|
||||
pl_gpu gpu = ra_pl_get(mapper->ra);
|
||||
|
||||
struct ra_imgfmt_desc desc = {0};
|
||||
|
@ -125,7 +125,7 @@ static int init(struct ra_hwdec *hw)
|
||||
static void mapper_unmap(struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv_owner *p_owner = mapper->owner->priv;
|
||||
struct priv *p = mapper->priv;
|
||||
struct dmabuf_interop_priv *p = mapper->priv;
|
||||
|
||||
p_owner->dmabuf_interop.interop_unmap(mapper);
|
||||
|
||||
@ -159,7 +159,7 @@ static bool check_fmt(struct ra_hwdec_mapper *mapper, int fmt)
|
||||
static int mapper_init(struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv_owner *p_owner = mapper->owner->priv;
|
||||
struct priv *p = mapper->priv;
|
||||
struct dmabuf_interop_priv *p = mapper->priv;
|
||||
|
||||
mapper->dst_params = mapper->src_params;
|
||||
mapper->dst_params.imgfmt = mapper->src_params.hw_subfmt;
|
||||
@ -190,7 +190,7 @@ static int mapper_init(struct ra_hwdec_mapper *mapper)
|
||||
static int mapper_map(struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv_owner *p_owner = mapper->owner->priv;
|
||||
struct priv *p = mapper->priv;
|
||||
struct dmabuf_interop_priv *p = mapper->priv;
|
||||
|
||||
/*
|
||||
* Although we use the same AVDRMFrameDescriptor to hold the dmabuf
|
||||
@ -267,7 +267,7 @@ const struct ra_hwdec_driver ra_hwdec_drmprime = {
|
||||
.init = init,
|
||||
.uninit = uninit,
|
||||
.mapper = &(const struct ra_hwdec_mapper_driver){
|
||||
.priv_size = sizeof(struct priv),
|
||||
.priv_size = sizeof(struct dmabuf_interop_priv),
|
||||
.init = mapper_init,
|
||||
.uninit = mapper_uninit,
|
||||
.map = mapper_map,
|
||||
|
@ -177,7 +177,7 @@ static int init(struct ra_hwdec *hw)
|
||||
static void mapper_unmap(struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv_owner *p_owner = mapper->owner->priv;
|
||||
struct priv *p = mapper->priv;
|
||||
struct dmabuf_interop_priv *p = mapper->priv;
|
||||
|
||||
p_owner->dmabuf_interop.interop_unmap(mapper);
|
||||
|
||||
@ -209,7 +209,7 @@ static bool check_fmt(struct ra_hwdec_mapper *mapper, int fmt)
|
||||
static int mapper_init(struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv_owner *p_owner = mapper->owner->priv;
|
||||
struct priv *p = mapper->priv;
|
||||
struct dmabuf_interop_priv *p = mapper->priv;
|
||||
|
||||
mapper->dst_params = mapper->src_params;
|
||||
mapper->dst_params.imgfmt = mapper->src_params.hw_subfmt;
|
||||
@ -240,7 +240,7 @@ static int mapper_init(struct ra_hwdec_mapper *mapper)
|
||||
static int mapper_map(struct ra_hwdec_mapper *mapper)
|
||||
{
|
||||
struct priv_owner *p_owner = mapper->owner->priv;
|
||||
struct priv *p = mapper->priv;
|
||||
struct dmabuf_interop_priv *p = mapper->priv;
|
||||
VAStatus status;
|
||||
VADisplay *display = p_owner->display;
|
||||
VADRMPRIMESurfaceDescriptor desc;
|
||||
@ -471,7 +471,7 @@ const struct ra_hwdec_driver ra_hwdec_vaegl = {
|
||||
.init = init,
|
||||
.uninit = uninit,
|
||||
.mapper = &(const struct ra_hwdec_mapper_driver){
|
||||
.priv_size = sizeof(struct priv),
|
||||
.priv_size = sizeof(struct dmabuf_interop_priv),
|
||||
.init = mapper_init,
|
||||
.uninit = mapper_uninit,
|
||||
.map = mapper_map,
|
||||
|
Loading…
Reference in New Issue
Block a user