GstVaapiImageClass
gst_vaapi_image_new
gst_vaapi_image_new_with_image
+gst_vaapi_image_get_id
gst_vaapi_image_get_image
gst_vaapi_image_get_format
gst_vaapi_image_get_width
GstVaapiSurface
GstVaapiSurfaceClass
gst_vaapi_surface_new
+gst_vaapi_surface_get_id
gst_vaapi_surface_get_chroma_type
gst_vaapi_surface_get_width
gst_vaapi_surface_get_height
GstVaapiSubpicture
GstVaapiSubpictureClass
gst_vaapi_subpicture_new
+gst_vaapi_subpicture_get_id
gst_vaapi_subpicture_get_image
gst_vaapi_subpicture_set_image
<SUBSECTION Standard>
}
/**
+ * gst_vaapi_image_get_id:
+ * @image: a #GstVaapiImage
+ *
+ * Returns the underlying VAImageID of the @image.
+ *
+ * Return value: the underlying VA image id
+ */
+VAImageID
+gst_vaapi_image_get_id(GstVaapiImage *image)
+{
+ g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), VA_INVALID_ID);
+ g_return_val_if_fail(image->priv->is_constructed, VA_INVALID_ID);
+
+ return GST_VAAPI_OBJECT_ID(image);
+}
+
+/**
* gst_vaapi_image_get_image:
* @image: a #GstVaapiImage
* @va_image: a VA image
GstVaapiImage *
gst_vaapi_image_new_with_image(GstVaapiDisplay *display, VAImage *va_image);
+VAImageID
+gst_vaapi_image_get_id(GstVaapiImage *image);
+
gboolean
gst_vaapi_image_get_image(GstVaapiImage *image, VAImage *va_image);
}
/**
+ * gst_vaapi_subpicture_get_id:
+ * @subpicture: a #GstVaapiSubpicture
+ *
+ * Returns the underlying VASubpictureID of the @subpicture.
+ *
+ * Return value: the underlying VA subpicture id
+ */
+VASubpictureID
+gst_vaapi_subpicture_get_id(GstVaapiSubpicture *subpicture)
+{
+ g_return_val_if_fail(GST_VAAPI_IS_SUBPICTURE(subpicture), VA_INVALID_ID);
+
+ return GST_VAAPI_OBJECT_ID(subpicture);
+}
+
+/**
* gst_vaapi_subpicture_get_image:
* @subpicture: a #GstVaapiSubpicture
*
GstVaapiSubpicture *
gst_vaapi_subpicture_new(GstVaapiImage *image);
+VASubpictureID
+gst_vaapi_subpicture_get_id(GstVaapiSubpicture *subpicture);
+
GstVaapiImage *
gst_vaapi_subpicture_get_image(GstVaapiSubpicture *subpicture);
}
/**
+ * gst_vaapi_surface_get_id:
+ * @surface: a #GstVaapiSurface
+ *
+ * Returns the underlying VASurfaceID of the @surface.
+ *
+ * Return value: the underlying VA surface id
+ */
+VASurfaceID
+gst_vaapi_surface_get_id(GstVaapiSurface *surface)
+{
+ g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), VA_INVALID_SURFACE);
+
+ return GST_VAAPI_OBJECT_ID(surface);
+}
+
+/**
* gst_vaapi_surface_get_chroma_type:
* @surface: a #GstVaapiSurface
*
guint height
);
+VASurfaceID
+gst_vaapi_surface_get_id(GstVaapiSurface *surface);
+
GstVaapiChromaType
gst_vaapi_surface_get_chroma_type(GstVaapiSurface *surface);
/* This also tests for the GstVaapiParamSpecID */
g_object_get(G_OBJECT(surface), "id", &surface_id, NULL);
- if (surface_id != gst_vaapi_object_get_id(GST_VAAPI_OBJECT(surface)))
+ if (surface_id != gst_vaapi_surface_get_id(surface))
g_error("could not retrieve the native surface ID");
g_print("created surface %" GST_VAAPI_ID_FORMAT "\n",
GST_VAAPI_ID_ARGS(surface_id));
if (!surface)
g_error("could not allocate Gst/VA surface from pool");
g_print("created surface %" GST_VAAPI_ID_FORMAT " from pool\n",
- GST_VAAPI_ID_ARGS(gst_vaapi_object_get_id(GST_VAAPI_OBJECT(surface))));
+ GST_VAAPI_ID_ARGS(gst_vaapi_surface_get_id(surface)));
surfaces[i] = surface;
}
if (!surfaces[i])
g_error("could not re-allocate Gst/VA surface%d from pool", i);
g_print("created surface %" GST_VAAPI_ID_FORMAT " from pool (realloc)\n",
- GST_VAAPI_ID_ARGS(gst_vaapi_object_get_id(GST_VAAPI_OBJECT(surfaces[i]))));
+ GST_VAAPI_ID_ARGS(gst_vaapi_surface_get_id(surfaces[i])));
}
if (surface == surfaces[0])