mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
Add gst_vaapi_object_{,un}lock_display() helpers.
This commit is contained in:
parent
9248f18735
commit
9981f37de7
3 changed files with 40 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -210,6 +210,38 @@ gst_vaapi_object_get_display(GstVaapiObject *object)
|
|||
return object->priv->display;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue