Add gst_vaapi_object_{,un}lock_display() helpers.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Fri, 26 Mar 2010 15:22:00 +0000 (15:22 +0000)
committergb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Fri, 26 Mar 2010 15:22:00 +0000 (15:22 +0000)
docs/reference/libs/libs-sections.txt
gst-libs/gst/vaapi/gstvaapiobject.c
gst-libs/gst/vaapi/gstvaapiobject.h

index 6de2929..95f822e 100644 (file)
@@ -255,6 +255,8 @@ GST_VAAPI_WINDOW_GET_CLASS
 GstVaapiObject
 GstVaapiObjectClass
 gst_vaapi_object_get_display
+gst_vaapi_object_lock_display
+gst_vaapi_object_unlock_display
 gst_vaapi_object_get_id
 <SUBSECTION Standard>
 GST_VAAPI_OBJECT
index 91bb17b..9c627b8 100644 (file)
@@ -211,6 +211,38 @@ gst_vaapi_object_get_display(GstVaapiObject *object)
 }
 
 /**
+ * gst_vaapi_object_lock_display:
+ * @object: a #GstVaapiObject
+ *
+ * Locks @object parent display. If display is already locked by
+ * another thread, the current thread will block until display is
+ * unlocked by the other thread.
+ */
+void
+gst_vaapi_object_lock_display(GstVaapiObject *object)
+{
+    g_return_if_fail(GST_VAAPI_IS_OBJECT(object));
+
+    GST_VAAPI_OBJECT_LOCK_DISPLAY(object);
+}
+
+/**
+ * gst_vaapi_object_unlock_display:
+ * @object: a #GstVaapiObject
+ *
+ * Unlocks @object parent display. If another thread is blocked in a
+ * gst_vaapi_object_lock_display() call, it will be woken and can lock
+ * display itself.
+ */
+void
+gst_vaapi_object_unlock_display(GstVaapiObject *object)
+{
+    g_return_if_fail(GST_VAAPI_IS_OBJECT(object));
+
+    GST_VAAPI_OBJECT_UNLOCK_DISPLAY(object);
+}
+
+/**
  * gst_vaapi_object_get_id:
  * @object: a #GstVaapiObject
  *
index 877857f..c0a024e 100644 (file)
@@ -86,6 +86,12 @@ gst_vaapi_object_get_type(void);
 GstVaapiDisplay *
 gst_vaapi_object_get_display(GstVaapiObject *object);
 
+void
+gst_vaapi_object_lock_display(GstVaapiObject *object);
+
+void
+gst_vaapi_object_unlock_display(GstVaapiObject *object);
+
 GstVaapiID
 gst_vaapi_object_get_id(GstVaapiObject *object);