vaapisink: allow a specific view component to be displayed.
[platform/upstream/gstreamer-vaapi.git] / gst / vaapi / gstvaapisink.h
index b22a8d3..a41e740 100644 (file)
@@ -2,7 +2,9 @@
  *  gstvaapisink.h - VA-API video sink
  *
  *  Copyright (C) 2010-2011 Splitted-Desktop Systems
- *  Copyright (C) 2011 Intel Corporation
+ *    Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
+ *  Copyright (C) 2011-2014 Intel Corporation
+ *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public License
 #ifndef GST_VAAPISINK_H
 #define GST_VAAPISINK_H
 
-#include <gst/video/gstvideosink.h>
-#include <gst/vaapi/gstvaapidisplay.h>
+#include "gstvaapipluginbase.h"
 #include <gst/vaapi/gstvaapiwindow.h>
-#if USE_VAAPISINK_GLX
+#if USE_GLX
 #include <gst/vaapi/gstvaapitexture.h>
 #endif
-#include <X11/Xlib.h>
+#include "gstvaapipluginutil.h"
 
 G_BEGIN_DECLS
 
@@ -59,36 +60,47 @@ G_BEGIN_DECLS
 
 typedef struct _GstVaapiSink                    GstVaapiSink;
 typedef struct _GstVaapiSinkClass               GstVaapiSinkClass;
-
-#if !USE_VAAPISINK_GLX
+#if !USE_GLX
 typedef struct _GstVaapiTexture                 GstVaapiTexture;
 #endif
 
 struct _GstVaapiSink {
     /*< private >*/
-    GstVideoSink parent_instance;
+    GstVaapiPluginBase  parent_instance;
 
     GstCaps            *caps;
-    GstVaapiDisplay    *display;
     GstVaapiWindow     *window;
     guint               window_width;
     guint               window_height;
     GstVaapiTexture    *texture;
+#if GST_CHECK_VERSION(1,0,0)
+    GstBufferPool      *video_buffer_pool;
+#endif
+    guint               video_buffer_size;
+    GstBuffer          *video_buffer;
     guint               video_width;
     guint               video_height;
     gint                video_par_n;
     gint                video_par_d;
+    GstVideoInfo        video_info;
     GstVaapiRectangle   display_rect;
+    GstVaapiRotation    rotation;
+    GstVaapiRotation    rotation_req;
+    guint               color_standard;
+    gint32              view_id;
     guint               foreign_window  : 1;
     guint               fullscreen      : 1;
     guint               synchronous     : 1;
     guint               use_glx         : 1;
     guint               use_reflection  : 1;
+    guint               use_overlay     : 1;
+    guint               use_rotation    : 1;
+    guint               keep_aspect     : 1;
 };
 
 struct _GstVaapiSinkClass {
     /*< private >*/
-    GstVideoSinkClass parent_class;
+    GstVaapiPluginBaseClass parent_class;
 };
 
 GType