Optimize GST_VAAPI_OBJECT_GET_DISPLAY to avoid a run-time check.
authorgb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Wed, 24 Mar 2010 08:34:11 +0000 (08:34 +0000)
committergb <gb@5584edef-b1fe-4b99-b61b-dd2bab72e969>
Wed, 24 Mar 2010 08:34:11 +0000 (08:34 +0000)
gst-libs/gst/vaapi/gstvaapiobject_priv.h

index 1e38ba8..41664d7 100644 (file)
@@ -35,9 +35,10 @@ G_BEGIN_DECLS
  * @object: a #GstVaapiObject
  *
  * Macro that evaluates to the #GstVaapiDisplay @object is bound to.
+ * This is an internal macro that does not do any run-time type checks.
  */
 #define GST_VAAPI_OBJECT_GET_DISPLAY(object) \
-    gst_vaapi_object_get_display(GST_VAAPI_OBJECT(object))
+    (((GstVaapiObject *)(object))->priv->display)
 
 /**
  * GstVaapiObjectPrivate: