[MPlayer-cvslog] r29903 - in trunk: configure libvo/vo_vdpau.c
cehoyos
subversion at mplayerhq.hu
Wed Nov 11 23:26:38 CET 2009
Author: cehoyos
Date: Wed Nov 11 23:26:38 2009
New Revision: 29903
Log:
Do not dynamically load libvdpau.so.1, but link at compile time.
Modified:
trunk/configure
trunk/libvo/vo_vdpau.c
Modified: trunk/configure
==============================================================================
--- trunk/configure Wed Nov 11 16:15:46 2009 (r29902)
+++ trunk/configure Wed Nov 11 23:26:38 2009 (r29903)
@@ -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'
Modified: trunk/libvo/vo_vdpau.c
==============================================================================
--- trunk/libvo/vo_vdpau.c Wed Nov 11 16:15:46 2009 (r29902)
+++ trunk/libvo/vo_vdpau.c Wed Nov 11 23:26:38 2009 (r29903)
@@ -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
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;
More information about the MPlayer-cvslog
mailing list