Commit e2c9ad75 authored by Jean-Paul Saman's avatar Jean-Paul Saman

VAAPI-GLX: Remove dependency on video_output/opengl.{c,h}

Remove the dependency on video_output/opengl.{c,h} and cleanup an unused variable.
parent 6558a8c4
......@@ -33,8 +33,6 @@ if HAVE_GLX
libavcodec_plugin_la_SOURCES += \
../../video_output/vaapi/glx.h \
../../video_output/vaapi/glx.c \
../../video_output/opengl.h \
../../video_output/opengl.c
$(NULL)
endif
......
......@@ -53,7 +53,6 @@
#include <GL/glx.h>
#include <GL/glxext.h>
#include <vlc_opengl.h>
#include "../../video_output/opengl.h"
#include <libavcodec/vaapi.h>
#include <va/va.h>
......@@ -151,6 +150,19 @@ static void *GetProcAddress(vlc_gl_t *gl, const char *name)
#endif
}
static inline bool HasExtension(const char *apis, const char *api)
{
size_t apilen = strlen(api);
while (apis) {
while (*apis == ' ')
apis++;
if (!strncmp(apis, api, apilen) && memchr(" ", apis[apilen], 2))
return true;
apis = strchr(apis, ' ');
}
return false;
}
static int InitializeGLXv13(vout_display_t *vd)
{
vout_display_sys_t *sys = vd->sys;
......@@ -813,7 +825,7 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
if (subpicture)
{
ret = vlc_va_spu_cache_Link(VLC_OBJECT(vd), sys->va, sys->spu, picture, sys->sflags);
ret = vlc_va_spu_cache_Link(VLC_OBJECT(vd), va, sys->spu, picture, sys->sflags);
if (ret == VLC_EGENERIC)
msg_Err(vd, "Failed linking subpicture to surface");
}
......@@ -832,11 +844,11 @@ static void DisplayPicture(vout_display_t *vd, picture_t *picture, subpicture_t
{
if (ret == VLC_SUCCESS)
{
if (vlc_va_spu_cache_Unlink(VLC_OBJECT(vd), sys->va, sys->spu, picture) == VLC_EGENERIC)
if (vlc_va_spu_cache_Unlink(VLC_OBJECT(vd), va, sys->spu, picture) == VLC_EGENERIC)
msg_Err(vd, "Could not find subpicture in cache");
}
if (picture->p_sys->i_cache > 0)
vlc_va_spu_cache_Release(sys->va, sys->spu, picture->p_sys->i_cache);
vlc_va_spu_cache_Release(va, sys->spu, picture->p_sys->i_cache);
picture->p_sys->i_cache = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment