projects
/
profile
/
ivi
/
gstreamer-vaapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable encoders
[profile/ivi/gstreamer-vaapi.git]
/
gst-libs
/
gst
/
vaapi
/
gstvaapiencoder.c
diff --git
a/gst-libs/gst/vaapi/gstvaapiencoder.c
b/gst-libs/gst/vaapi/gstvaapiencoder.c
index
af2dd76
..
daddb25
100644
(file)
--- 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
*/
* 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 <string.h>
#include "gstvaapiencoder.h"
#include <string.h>
-
+#if USE_X11
#include "gstvaapidisplay_x11.h"
#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"
#include "gstvaapiobject_priv.h"
#include "gstvaapidisplay_priv.h"
@@
-100,7
+111,18
@@
gst_vaapi_encoder_initialize(GstVaapiEncoder* encoder)
/* create va_dpy*/
if (!priv->display) {
/* create va_dpy*/
if (!priv->display) {
+#if USE_X11
priv->display = gst_vaapi_display_x11_new(NULL);
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.");
ENCODER_CHECK_STATUS(priv->display,
ENCODER_DISPLAY_ERR,
"gst_vaapi_display_x11_new failed.");