Do not dynamically load libvdpau.so.1, but link at compile time.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29903 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
cehoyos 2009-11-11 22:26:38 +00:00
parent 629eee5817
commit 153cac185c
2 changed files with 6 additions and 22 deletions

7
configure vendored
View File

@ -4348,13 +4348,16 @@ if test "$_vdpau" = auto ; then
if test "$_dl" = yes ; then
cat > $TMPC <<EOF
#include <vdpau/vdpau_x11.h>
int main(void) {return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1;}
int main(void) {
(void) vdp_device_create_x11(0, 0, 0, 0);
return VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1; }
EOF
cc_check && _vdpau=yes
cc_check -lvdpau && _vdpau=yes
fi
fi
if test "$_vdpau" = yes ; then
def_vdpau='#define CONFIG_VDPAU 1'
libs_mplayer="$libs_mplayer -lvdpau"
_vomodules="vdpau $_vomodules"
else
def_vdpau='#define CONFIG_VDPAU 0'

View File

@ -33,7 +33,6 @@
*/
#include <stdio.h>
#include <dlfcn.h>
#include "config.h"
#include "mp_msg.h"
@ -93,7 +92,6 @@ LIBVO_EXTERN(vdpau)
* win_x11_init_vdpau_flip_queue() functions
*/
static VdpDevice vdp_device;
static VdpDeviceCreateX11 *vdp_device_create;
static VdpGetProcAddress *vdp_get_proc_address;
static VdpPresentationQueueTarget vdp_flip_target;
@ -144,7 +142,6 @@ static VdpDecoderRender *vdp_decoder_render;
static VdpGenerateCSCMatrix *vdp_generate_csc_matrix;
static VdpPreemptionCallbackRegister *vdp_preemption_callback_register;
static void *vdpau_lib_handle;
/* output_surfaces[NUM_OUTPUT_SURFACES] is misused for OSD. */
#define osd_surface output_surfaces[NUM_OUTPUT_SURFACES]
static VdpOutputSurface output_surfaces[NUM_OUTPUT_SURFACES + 1];
@ -395,7 +392,7 @@ static int win_x11_init_vdpau_procs(void)
{0, NULL}
};
vdp_st = vdp_device_create(mDisplay, mScreen,
vdp_st = vdp_device_create_x11(mDisplay, mScreen,
&vdp_device, &vdp_get_proc_address);
if (vdp_st != VDP_STATUS_OK) {
mp_msg(MSGT_VO, MSGL_ERR, "[vdpau] Error when calling vdp_device_create_x11: %i\n", vdp_st);
@ -1182,8 +1179,6 @@ static void uninit(void)
vo_vm_close();
#endif
vo_x11_uninit();
dlclose(vdpau_lib_handle);
}
static const opt_t subopts[] = {
@ -1233,8 +1228,6 @@ static const char help_msg[] =
static int preinit(const char *arg)
{
int i;
static const char *vdpaulibrary = "libvdpau.so.1";
static const char *vdpau_device_create = "vdp_device_create_x11";
deint = 0;
deint_type = 3;
@ -1262,18 +1255,6 @@ static int preinit(const char *arg)
colorspace = 1;
}
vdpau_lib_handle = dlopen(vdpaulibrary, RTLD_LAZY);
if (!vdpau_lib_handle) {
mp_msg(MSGT_VO, MSGL_ERR, "[vdpau] Could not open dynamic library %s\n",
vdpaulibrary);
return -1;
}
vdp_device_create = dlsym(vdpau_lib_handle, vdpau_device_create);
if (!vdp_device_create) {
mp_msg(MSGT_VO, MSGL_ERR, "[vdpau] Could not find function %s in %s\n",
vdpau_device_create, vdpaulibrary);
return -1;
}
if (!vo_init() || win_x11_init_vdpau_procs())
return -1;