X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst-libs%2Fgst%2Fvaapi%2Fgstvaapiencoder.c;h=daddb251512b814ba87cdd6f4933c5ce84ddb3bf;hb=83058dffc2e211fc0a34099f226e26d218f0f24a;hp=af2dd76f21c0187d3c38e619c5bd536f30ce40b3;hpb=cd1b2ca141ef0896c16b25a25ceae4db904b2543;p=profile%2Fivi%2Fgstreamer-vaapi.git diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c index af2dd76..daddb25 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder.c @@ -18,12 +18,23 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA */ - +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "gstvaapiencoder.h" #include - +#if USE_X11 #include "gstvaapidisplay_x11.h" +#elif USE_WAYLAND +#include "gstvaapidisplay_wayland.h" +#elif USE_GLX +#include "gstvaapidisplay_glx.h" +#elif USE_DRM +#include "gstvaapidisplay_drm.h" +#else +#error("undefined display type") +#endif #include "gstvaapiobject_priv.h" #include "gstvaapidisplay_priv.h" @@ -100,7 +111,18 @@ gst_vaapi_encoder_initialize(GstVaapiEncoder* encoder) /* create va_dpy*/ if (!priv->display) { +#if USE_X11 priv->display = gst_vaapi_display_x11_new(NULL); +#elif USE_WAYLAND + priv->display = gst_vaapi_display_wayland_new(NULL); +#elif USE_GLX + priv->display = gst_vaapi_display_glx_new(NULL); +#elif USE_DRM + priv->display = gst_vaapi_display_drm_new(NULL); +#else + // error here: + priv->display = NULL; +#endif ENCODER_CHECK_STATUS(priv->display, ENCODER_DISPLAY_ERR, "gst_vaapi_display_x11_new failed.");