Permalink
Browse files

Fix VAAPI compilation

Compilation would fail if VAAPI was active, but OpenGL video was disabled
  • Loading branch information...
jyavenard committed Apr 14, 2012
1 parent ce56ef0 commit 79527b1a97c5b4b2b55ded0e25479686c51247d1
@@ -53,10 +53,12 @@ extern "C" {
#include "videoout_d3d.h"
#endif
-#ifdef USING_VAAPI
+#ifdef USING_GLVAAPI
#include "videoout_openglvaapi.h"
+#endif // USING_GLVAAPI
+#ifdef USING_VAAPI
#include "vaapicontext.h"
-#endif // USING_VAAPI
+#endif
extern "C" {
#include "libavutil/avutil.h"
@@ -1845,7 +1847,7 @@ int AvFormatDecoder::ScanStreams(bool novideo)
video_codec_id = vdpau_mcid;
}
#endif // USING_VDPAU
-#ifdef USING_VAAPI
+#ifdef USING_GLVAAPI
MythCodecID vaapi_mcid;
PixelFormat pix_fmt = PIX_FMT_YUV420P;
vaapi_mcid = VideoOutputOpenGLVAAPI::GetBestSupportedCodec(
@@ -1862,7 +1864,7 @@ int AvFormatDecoder::ScanStreams(bool novideo)
enc->pix_fmt = pix_fmt;
}
}
-#endif // USING_VAAPI
+#endif // USING_GLVAAPI
#ifdef USING_DXVA2
MythCodecID dxva2_mcid;
PixelFormat pix_fmt = PIX_FMT_YUV420P;
@@ -407,6 +407,7 @@ using_frontend {
LIBS += -lva -lva-x11 -lva-glx
using_opengl_video:HEADERS += videoout_openglvaapi.h
using_opengl_video:SOURCES += videoout_openglvaapi.cpp
+ using_opengl_video:DEFINES += USING_GLVAAPI
}
# Misc. frontend
@@ -38,10 +38,11 @@
#endif
#ifdef USING_VAAPI
-#include "videoout_openglvaapi.h"
#include "videoout_nullvaapi.h"
#endif
-
+#ifdef USING_GLVAAPI
+#include "videoout_openglvaapi.h"
+#endif
#include "videoout_null.h"
#include "dithertable.h"
@@ -96,9 +97,11 @@ void VideoOutput::GetRenderOptions(render_opts &opts)
#endif // USING_VDPAU
#ifdef USING_VAAPI
- VideoOutputOpenGLVAAPI::GetRenderOptions(opts);
VideoOutputNullVAAPI::GetRenderOptions(opts);
#endif // USING_VAAPI
+#ifdef USING_GLVAAPI
+ VideoOutputOpenGLVAAPI::GetRenderOptions(opts);
+#endif // USING_GLVAAPI
}
/**
@@ -161,9 +164,9 @@ VideoOutput *VideoOutput::Create(
renderers += VideoOutputVDPAU::GetAllowedRenderers(codec_id, video_dim);
#endif // USING_VDPAU
-#ifdef USING_VAAPI
+#ifdef USING_GLVAAPI
renderers += VideoOutputOpenGLVAAPI::GetAllowedRenderers(codec_id, video_dim);
-#endif // USING_VAAPI
+#endif // USING_GLVAAPI
}
LOG(VB_PLAYBACK, LOG_INFO, LOC + "Allowed renderers: " +
@@ -226,12 +229,13 @@ VideoOutput *VideoOutput::Create(
#endif // USING_VDPAU
#ifdef USING_VAAPI
- if (renderer == "openglvaapi")
- vo = new VideoOutputOpenGLVAAPI();
if (renderer == "nullvaapi")
vo = new VideoOutputNullVAAPI();
#endif // USING_VAAPI
-
+#ifdef USING_GLVAAPI
+ if (renderer == "openglvaapi")
+ vo = new VideoOutputOpenGLVAAPI();
+#endif // USING_GLVAAPI
#ifdef USING_XV
if (xvlist.contains(renderer))
vo = new VideoOutputXv();

0 comments on commit 79527b1

Please sign in to comment.