Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

driver_init: load libva-x11.so for any ABI version #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/media_drv_output_dri.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,23 @@ media_output_dri_init (VADriverContextP ctx)
struct dri_vtable *dri_vtable;

static const struct dso_symbol symbols[] = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other option is to have both versions, here (e.g. symbols[2][] = { { /* .so.1 stuff */ }, { /* .so.2 stuff */ } }) and try both libraries in turn below (handle = dso_open(*.so.2); if (!handle) dso_open(*.so.1); ).

#if VA_CHECK_VERSION(1,0,0)
{"va_dri_get_drawable",
offsetof (struct dri_vtable, get_drawable)},
{"va_dri_get_rendering_buffer",
offsetof (struct dri_vtable, get_rendering_buffer)},
{"va_dri_swap_buffer",
offsetof (struct dri_vtable, swap_buffer)},
{NULL,}
#else
{"dri_get_drawable",
offsetof (struct dri_vtable, get_drawable)},
{"dri_get_rendering_buffer",
offsetof (struct dri_vtable, get_rendering_buffer)},
{"dri_swap_buffer",
offsetof (struct dri_vtable, swap_buffer)},
{NULL,}
#endif
};

drv_ctx->dri_output =
Expand Down
2 changes: 1 addition & 1 deletion src/media_drv_output_dri.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define _MEDIA__DRIVER_OUT_DRI_H
#include <stdbool.h>
#include "media_drv_defines.h"
#define LIBVA_X11_NAME "libva-x11.so.1"
#define LIBVA_X11_NAME "libva-x11.so"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch seems wrong. The SONAME in libva-2.0.0+ is libva-x11.so.2 and end-users system should not have the unversionned symlink

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this IMHO does not belong here, but just in the implementation file.

There, it can be made dependent on if VA_CHECK_VERSION(1,0,0), so the file name matches the symbols table.

VOID media_output_dri_terminate (VADriverContextP ctx);
BOOL media_output_dri_init (VADriverContextP ctx);

Expand Down