libs: use glib >= 2.32 semantics for mutexes.
[profile/ivi/gstreamer-vaapi.git] / gst-libs / gst / vaapi / gstvaapidisplay_priv.h
index 7cc40fd..cb5302b 100644 (file)
@@ -1,27 +1,30 @@
 /*
  *  gstvaapidisplay_priv.h - Base VA display (private definitions)
  *
- *  gstreamer-vaapi (C) 2010 Splitted-Desktop Systems
+ *  Copyright (C) 2010-2011 Splitted-Desktop Systems
+ *  Copyright (C) 2011-2012 Intel Corporation
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1
+ *  of the License, or (at your option) any later version.
  *
- *  This program is distributed in the hope that it will be useful,
+ *  This library is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free
+ *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301 USA
  */
 
 #ifndef GST_VAAPI_DISPLAY_PRIV_H
 #define GST_VAAPI_DISPLAY_PRIV_H
 
 #include <gst/vaapi/gstvaapidisplay.h>
+#include <gst/vaapi/gstvaapidisplaycache.h>
 
 G_BEGIN_DECLS
 
@@ -39,6 +42,7 @@ G_BEGIN_DECLS
  * Macro that evaluates to the #VADisplay of @display.
  * This is an internal macro that does not do any run-time type check.
  */
+#undef  GST_VAAPI_DISPLAY_VADISPLAY
 #define GST_VAAPI_DISPLAY_VADISPLAY(display_) \
     GST_VAAPI_DISPLAY_CAST(display_)->priv->display
 
@@ -48,8 +52,9 @@ G_BEGIN_DECLS
  *
  * Locks @display
  */
+#undef  GST_VAAPI_DISPLAY_LOCK
 #define GST_VAAPI_DISPLAY_LOCK(display) \
-    gst_vaapi_display_lock(display)
+    gst_vaapi_display_lock(GST_VAAPI_DISPLAY_CAST(display))
 
 /**
  * GST_VAAPI_DISPLAY_UNLOCK:
@@ -57,8 +62,9 @@ G_BEGIN_DECLS
  *
  * Unlocks @display
  */
+#undef  GST_VAAPI_DISPLAY_UNLOCK
 #define GST_VAAPI_DISPLAY_UNLOCK(display) \
-    gst_vaapi_display_unlock(display)
+    gst_vaapi_display_unlock(GST_VAAPI_DISPLAY_CAST(display))
 
 /**
  * GstVaapiDisplayPrivate:
@@ -66,7 +72,9 @@ G_BEGIN_DECLS
  * Base class for VA displays.
  */
 struct _GstVaapiDisplayPrivate {
-    GStaticMutex        mutex;
+    GstVaapiDisplay    *parent;
+    GRecMutex           mutex;
+    GstVaapiDisplayType display_type;
     VADisplay           display;
     guint               width;
     guint               height;
@@ -74,12 +82,17 @@ struct _GstVaapiDisplayPrivate {
     guint               height_mm;
     guint               par_n;
     guint               par_d;
-    GArray             *profiles;
+    GArray             *decoders;
+    GArray             *encoders;
     GArray             *image_formats;
     GArray             *subpicture_formats;
+    GArray             *properties;
     guint               create_display  : 1;
 };
 
+GstVaapiDisplayCache *
+gst_vaapi_display_get_cache(void);
+
 G_END_DECLS
 
 #endif /* GST_VAAPI_DISPLAY_PRIV_H */