GstVaapiObject
GstVaapiObjectClass
gst_vaapi_object_get_display
+gst_vaapi_object_get_id
<SUBSECTION Standard>
GST_VAAPI_OBJECT
GST_VAAPI_IS_OBJECT
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>
PROP_0,
PROP_IMAGE,
- PROP_IMAGE_ID,
PROP_FORMAT,
PROP_WIDTH,
PROP_HEIGHT
gst_vaapi_image_destroy(GstVaapiImage *image)
{
GstVaapiDisplay * const display = GST_VAAPI_OBJECT_GET_DISPLAY(image);
- GstVaapiImagePrivate * const priv = image->priv;
+ VAImageID image_id;
VAStatus status;
_gst_vaapi_image_unmap(image);
- GST_DEBUG("image 0x%08x", priv->internal_image.image_id);
+ image_id = GST_VAAPI_OBJECT_ID(image);
+ GST_DEBUG("image %" GST_VAAPI_ID_FORMAT, GST_VAAPI_ID_ARGS(image_id));
- if (priv->internal_image.image_id != VA_INVALID_ID) {
+ if (image_id != VA_INVALID_ID) {
GST_VAAPI_DISPLAY_LOCK(display);
- status = vaDestroyImage(
- GST_VAAPI_DISPLAY_VADISPLAY(display),
- priv->internal_image.image_id
- );
+ status = vaDestroyImage(GST_VAAPI_DISPLAY_VADISPLAY(display), image_id);
GST_VAAPI_DISPLAY_UNLOCK(display);
if (!vaapi_check_status(status, "vaDestroyImage()"))
- g_warning("failed to destroy image 0x%08x\n",
- priv->internal_image.image_id);
- priv->internal_image.image_id = VA_INVALID_ID;
+ g_warning("failed to destroy image %" GST_VAAPI_ID_FORMAT "\n",
+ GST_VAAPI_ID_ARGS(image_id));
+ GST_VAAPI_OBJECT_ID(image) = VA_INVALID_ID;
}
}
GstVaapiImagePrivate * const priv = image->priv;
GstVaapiImageFormat format = priv->format;
const VAImageFormat *va_format;
+ VAImageID image_id;
if (!priv->create_image)
return (priv->image.image_id != VA_INVALID_ID &&
return FALSE;
}
priv->image = priv->internal_image;
+ image_id = priv->image.image_id;
if (priv->format != priv->internal_format) {
switch (priv->format) {
break;
}
}
-
- GST_DEBUG("image 0x%08x", priv->image.image_id);
priv->is_linear = vaapi_image_is_linear(&priv->image);
+
+ GST_DEBUG("image %" GST_VAAPI_ID_FORMAT, GST_VAAPI_ID_ARGS(image_id));
+ GST_VAAPI_OBJECT_ID(image) = image_id;
return TRUE;
}
case PROP_IMAGE:
g_value_set_boxed(value, &image->priv->image);
break;
- case PROP_IMAGE_ID:
- g_value_set_uint(value, gst_vaapi_image_get_id(image));
- break;
case PROP_FORMAT:
g_value_set_uint(value, gst_vaapi_image_get_format(image));
break;
VAAPI_TYPE_IMAGE,
G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
- /**
- * GstVaapiImage:id:
- *
- * The underlying #VAImageID of the image.
- */
- g_object_class_install_property
- (object_class,
- PROP_IMAGE_ID,
- g_param_spec_uint("id",
- "VA image id",
- "The underlying VA image id",
- 0, G_MAXUINT32, VA_INVALID_ID,
- G_PARAM_READABLE));
-
g_object_class_install_property
(object_class,
PROP_WIDTH,
}
/**
- * 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 image->priv->image.image_id;
-}
-
-/**
* 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);
#include "config.h"
#include "gstvaapiobject.h"
#include "gstvaapiobject_priv.h"
+#include "gstvaapiparamspecs.h"
#include "gstvaapimarshal.h"
#define DEBUG 1
PROP_0,
PROP_DISPLAY,
+ PROP_ID
};
enum {
{
GstVaapiObjectPrivate * const priv = GST_VAAPI_OBJECT(object)->priv;
+ priv->id = VA_INVALID_ID;
+
if (priv->display) {
g_object_unref(priv->display);
priv->display = NULL;
case PROP_DISPLAY:
object->priv->display = g_object_ref(g_value_get_object(value));
break;
+ case PROP_ID:
+ object->priv->id = gst_vaapi_value_get_id(value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
break;
case PROP_DISPLAY:
g_value_set_object(value, gst_vaapi_object_get_display(object));
break;
+ case PROP_ID:
+ gst_vaapi_value_set_id(value, gst_vaapi_object_get_id(object));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
break;
G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
/**
+ * GstVaapiObject:id:
+ *
+ * The #GstVaapiID contained in this object.
+ */
+ g_object_class_install_property
+ (object_class,
+ PROP_ID,
+ gst_vaapi_param_spec_id("id",
+ "ID",
+ "The GstVaapiID contained in this object",
+ VA_INVALID_ID,
+ G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY));
+
+ /**
* GstVaapiObject::destroy:
* @object: the object which received the signal
*
object->priv = priv;
priv->display = NULL;
+ priv->id = VA_INVALID_ID;
priv->is_destroying = FALSE;
}
return object->priv->display;
}
+
+/**
+ * gst_vaapi_object_get_id:
+ * @object: a #GstVaapiObject
+ *
+ * Returns the #GstVaapiID contained in the @object.
+ *
+ * Return value: the #GstVaapiID of the @object
+ */
+GstVaapiID
+gst_vaapi_object_get_id(GstVaapiObject *object)
+{
+ g_return_val_if_fail(GST_VAAPI_IS_OBJECT(object), NULL);
+
+ return object->priv->id;
+}
GstVaapiDisplay *
gst_vaapi_object_get_display(GstVaapiObject *object);
+GstVaapiID
+gst_vaapi_object_get_id(GstVaapiObject *object);
+
G_END_DECLS
#endif /* GST_VAAPI_OBJECT_H */
GST_VAAPI_TYPE_OBJECT, \
GstVaapiObjectPrivate))
+#define GST_VAAPI_OBJECT_CAST(object) ((GstVaapiObject *)(object))
+
/**
* GST_VAAPI_OBJECT_GET_DISPLAY:
* @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.
+ * Macro that evaluates to the #GstVaapiDisplay the @object is bound to.
+ * This is an internal macro that does not do any run-time type check.
*/
#define GST_VAAPI_OBJECT_GET_DISPLAY(object) \
- (((GstVaapiObject *)(object))->priv->display)
+ GST_VAAPI_OBJECT_CAST(object)->priv->display
+
+/**
+ * GST_VAAPI_OBJECT_ID:
+ * @object: a #GstVaapiObject
+ *
+ * Macro that evaluates to the #GstVaapiID contained in @object.
+ * This is an internal macro that does not do any run-time type checks.
+ */
+#define GST_VAAPI_OBJECT_ID(object) \
+ GST_VAAPI_OBJECT_CAST(object)->priv->id
/**
* GstVaapiObjectPrivate:
*/
struct _GstVaapiObjectPrivate {
GstVaapiDisplay *display;
+ GstVaapiID id;
guint is_destroying : 1;
};
GstVaapiSubpicturePrivate))
struct _GstVaapiSubpicturePrivate {
- VASubpictureID subpicture_id;
GstVaapiImage *image;
};
enum {
PROP_0,
- PROP_SUBPICTURE_ID,
PROP_IMAGE
};
{
GstVaapiDisplay * const display = GST_VAAPI_OBJECT_GET_DISPLAY(subpicture);
GstVaapiSubpicturePrivate * const priv = subpicture->priv;
+ VASubpictureID subpicture_id;
VAStatus status;
- GST_DEBUG("subpicture 0x%08x", priv->subpicture_id);
+ subpicture_id = GST_VAAPI_OBJECT_ID(subpicture);
+ GST_DEBUG("subpicture %" GST_VAAPI_ID_FORMAT,
+ GST_VAAPI_ID_ARGS(subpicture_id));
- if (priv->subpicture_id != VA_INVALID_ID) {
+ if (subpicture_id != VA_INVALID_ID) {
if (display) {
GST_VAAPI_DISPLAY_LOCK(display);
status = vaDestroySubpicture(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- priv->subpicture_id
+ subpicture_id
);
GST_VAAPI_DISPLAY_UNLOCK(display);
if (!vaapi_check_status(status, "vaDestroySubpicture()"))
- g_warning("failed to destroy subpicture 0x%08x\n",
- priv->subpicture_id);
+ g_warning("failed to destroy subpicture %" GST_VAAPI_ID_FORMAT "\n",
+ GST_VAAPI_ID_ARGS(subpicture_id));
}
- priv->subpicture_id = VA_INVALID_ID;
+ GST_VAAPI_OBJECT_ID(subpicture) = VA_INVALID_ID;
}
if (priv->image) {
GST_VAAPI_DISPLAY_LOCK(display);
status = vaCreateSubpicture(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- gst_vaapi_image_get_id(priv->image),
+ GST_VAAPI_OBJECT_ID(priv->image),
&subpicture_id
);
GST_VAAPI_DISPLAY_UNLOCK(display);
if (!vaapi_check_status(status, "vaCreateSubpicture()"))
return FALSE;
- GST_DEBUG("subpicture 0x%08x", subpicture_id);
- priv->subpicture_id = subpicture_id;
+ GST_DEBUG("subpicture %" GST_VAAPI_ID_FORMAT,
+ GST_VAAPI_ID_ARGS(subpicture_id));
+ GST_VAAPI_OBJECT_ID(subpicture) = subpicture_id;
return TRUE;
}
GstVaapiSubpicture * const subpicture = GST_VAAPI_SUBPICTURE(object);
switch (prop_id) {
- case PROP_SUBPICTURE_ID:
- g_value_set_uint(value, gst_vaapi_subpicture_get_id(subpicture));
- break;
case PROP_IMAGE:
g_value_set_object(value, gst_vaapi_subpicture_get_image(subpicture));
break;
object_class->get_property = gst_vaapi_subpicture_get_property;
/**
- * GstVaapiSubpicture:id:
- *
- * The underlying #VASubpictureID of the subpicture.
- */
- g_object_class_install_property
- (object_class,
- PROP_SUBPICTURE_ID,
- g_param_spec_uint("id",
- "VA subpicture id",
- "The underlying VA subpicture id",
- 0, G_MAXUINT32, VA_INVALID_ID,
- G_PARAM_READABLE));
-
- /**
* GstVaapiSubpicture:image:
*
* The #GstVaapiImage this subpicture is bound to.
GstVaapiSubpicturePrivate *priv = GST_VAAPI_SUBPICTURE_GET_PRIVATE(subpicture);
subpicture->priv = priv;
- priv->subpicture_id = VA_INVALID_ID;
priv->image = NULL;
}
{
g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), NULL);
- GST_DEBUG("create from image 0x%08x", gst_vaapi_image_get_id(image));
+ GST_DEBUG("create from image %" GST_VAAPI_ID_FORMAT,
+ GST_VAAPI_ID_ARGS(GST_VAAPI_OBJECT_ID(image)));
return g_object_new(GST_VAAPI_TYPE_SUBPICTURE,
"display", GST_VAAPI_OBJECT_GET_DISPLAY(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 subpicture->priv->subpicture_id;
-}
-
-/**
* 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);
GstVaapiSurfacePrivate))
struct _GstVaapiSurfacePrivate {
- VASurfaceID surface_id;
guint width;
guint height;
GstVaapiChromaType chroma_type;
enum {
PROP_0,
- PROP_SURFACE_ID,
PROP_WIDTH,
PROP_HEIGHT,
PROP_CHROMA_TYPE
{
GstVaapiDisplay * const display = GST_VAAPI_OBJECT_GET_DISPLAY(surface);
GstVaapiSurfacePrivate * const priv = surface->priv;
+ VASurfaceID surface_id;
VAStatus status;
- GST_DEBUG("surface 0x%08x", priv->surface_id);
+ surface_id = GST_VAAPI_OBJECT_ID(surface);
+ GST_DEBUG("surface %" GST_VAAPI_ID_FORMAT, GST_VAAPI_ID_ARGS(surface_id));
- if (priv->surface_id != VA_INVALID_SURFACE) {
+ if (surface_id != VA_INVALID_SURFACE) {
GST_VAAPI_DISPLAY_LOCK(display);
status = vaDestroySurfaces(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- &priv->surface_id, 1
+ &surface_id, 1
);
GST_VAAPI_DISPLAY_UNLOCK(display);
if (!vaapi_check_status(status, "vaDestroySurfaces()"))
- g_warning("failed to destroy surface 0x%08x\n", priv->surface_id);
- priv->surface_id = VA_INVALID_SURFACE;
+ g_warning("failed to destroy surface %" GST_VAAPI_ID_FORMAT "\n",
+ GST_VAAPI_ID_ARGS(surface_id));
+ GST_VAAPI_OBJECT_ID(surface) = VA_INVALID_SURFACE;
}
if (priv->subpictures) {
if (!vaapi_check_status(status, "vaCreateSurfaces()"))
return FALSE;
- GST_DEBUG("surface 0x%08x", surface_id);
- priv->surface_id = surface_id;
+ GST_DEBUG("surface %" GST_VAAPI_ID_FORMAT, GST_VAAPI_ID_ARGS(surface_id));
+ GST_VAAPI_OBJECT_ID(surface) = surface_id;
return TRUE;
}
GstVaapiSurface * const surface = GST_VAAPI_SURFACE(object);
switch (prop_id) {
- case PROP_SURFACE_ID:
- g_value_set_uint(value, gst_vaapi_surface_get_id(surface));
- break;
case PROP_WIDTH:
g_value_set_uint(value, gst_vaapi_surface_get_width(surface));
break;
object_class->get_property = gst_vaapi_surface_get_property;
object_class->constructed = gst_vaapi_surface_constructed;
- /**
- * GstVaapiSurface:id:
- *
- * The underlying #VASurfaceID of the surface.
- */
- g_object_class_install_property
- (object_class,
- PROP_SURFACE_ID,
- g_param_spec_uint("id",
- "VA surface id",
- "The underlying VA surface id",
- 0, G_MAXUINT32, VA_INVALID_SURFACE,
- G_PARAM_READABLE));
-
g_object_class_install_property
(object_class,
PROP_WIDTH,
GstVaapiSurfacePrivate *priv = GST_VAAPI_SURFACE_GET_PRIVATE(surface);
surface->priv = priv;
- priv->surface_id = VA_INVALID_SURFACE;
priv->width = 0;
priv->height = 0;
priv->chroma_type = 0;
}
/**
- * 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 surface->priv->surface_id;
-}
-
-/**
* gst_vaapi_surface_get_chroma_type:
* @surface: a #GstVaapiSurface
*
GST_VAAPI_DISPLAY_LOCK(display);
status = vaDeriveImage(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- surface->priv->surface_id,
+ GST_VAAPI_OBJECT_ID(surface),
&va_image
);
GST_VAAPI_DISPLAY_UNLOCK(display);
if (width != surface->priv->width || height != surface->priv->height)
return FALSE;
- image_id = gst_vaapi_image_get_id(image);
+ image_id = GST_VAAPI_OBJECT_ID(image);
if (image_id == VA_INVALID_ID)
return FALSE;
GST_VAAPI_DISPLAY_LOCK(display);
status = vaGetImage(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- surface->priv->surface_id,
+ GST_VAAPI_OBJECT_ID(surface),
0, 0, width, height,
image_id
);
if (width != surface->priv->width || height != surface->priv->height)
return FALSE;
- image_id = gst_vaapi_image_get_id(image);
+ image_id = GST_VAAPI_OBJECT_ID(image);
if (image_id == VA_INVALID_ID)
return FALSE;
GST_VAAPI_DISPLAY_LOCK(display);
status = vaPutImage(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- surface->priv->surface_id,
+ GST_VAAPI_OBJECT_ID(surface),
image_id,
0, 0, width, height,
0, 0, width, height
GstVaapiDisplay *display;
GstVaapiRectangle src_rect_default, dst_rect_default;
GstVaapiImage *image;
+ VASurfaceID surface_id;
VAStatus status;
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), FALSE);
return FALSE;
}
+ surface_id = GST_VAAPI_OBJECT_ID(surface);
+ if (surface_id == VA_INVALID_SURFACE)
+ return FALSE;
+
if (!src_rect) {
image = gst_vaapi_subpicture_get_image(subpicture);
if (!image)
GST_VAAPI_DISPLAY_LOCK(display);
status = vaAssociateSubpicture(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- gst_vaapi_subpicture_get_id(subpicture),
- &surface->priv->surface_id, 1,
+ GST_VAAPI_OBJECT_ID(subpicture),
+ &surface_id, 1,
src_rect->x, src_rect->y, src_rect->width, src_rect->height,
dst_rect->x, dst_rect->y, dst_rect->width, dst_rect->height,
0
)
{
GstVaapiDisplay *display;
+ VASurfaceID surface_id;
VAStatus status;
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), FALSE);
/* First, check subpicture was really associated with this surface */
if (!g_ptr_array_remove_fast(surface->priv->subpictures, subpicture)) {
- GST_DEBUG("subpicture 0x%08x was not bound to surface 0x%08x",
- gst_vaapi_subpicture_get_id(subpicture),
- surface->priv->surface_id);
+ GST_DEBUG("subpicture %" GST_VAAPI_ID_FORMAT "was not bound to "
+ "surface %" GST_VAAPI_ID_FORMAT,
+ GST_VAAPI_ID_ARGS(GST_VAAPI_OBJECT_ID(subpicture)),
+ GST_VAAPI_ID_ARGS(GST_VAAPI_OBJECT_ID(surface)));
return TRUE;
}
+ surface_id = GST_VAAPI_OBJECT_ID(surface);
+ if (surface_id == VA_INVALID_SURFACE)
+ return FALSE;
+
GST_VAAPI_DISPLAY_LOCK(display);
status = vaDeassociateSubpicture(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- gst_vaapi_subpicture_get_id(subpicture),
- &surface->priv->surface_id, 1
+ GST_VAAPI_OBJECT_ID(subpicture),
+ &surface_id, 1
);
GST_VAAPI_DISPLAY_UNLOCK(display);
g_object_unref(subpicture);
GST_VAAPI_DISPLAY_LOCK(display);
status = vaSyncSurface(
GST_VAAPI_DISPLAY_VADISPLAY(display),
- surface->priv->surface_id
+ GST_VAAPI_OBJECT_ID(surface)
);
GST_VAAPI_DISPLAY_UNLOCK(display);
if (!vaapi_check_status(status, "vaSyncSurface()"))
guint height
);
-VASurfaceID
-gst_vaapi_surface_get_id(GstVaapiSurface *surface);
-
GstVaapiChromaType
gst_vaapi_surface_get_chroma_type(GstVaapiSurface *surface);
if (!display)
return FALSE;
- surface_id = gst_vaapi_surface_get_id(surface);
+ surface_id = GST_VAAPI_OBJECT_ID(surface);
if (surface_id == VA_INVALID_ID)
return FALSE;
int
main(int argc, char *argv[])
{
- GstVaapiDisplay *display;
- GstVaapiSurface *surface;
- GstVaapiSurface *surfaces[MAX_SURFACES];
- GstVaapiVideoPool *pool;
- GstCaps *caps;
- gint i;
+ GstVaapiDisplay *display;
+ GstVaapiSurface *surface;
+ GstVaapiID surface_id;
+ GstVaapiSurface *surfaces[MAX_SURFACES];
+ GstVaapiVideoPool *pool;
+ GstCaps *caps;
+ gint i;
static const GstVaapiChromaType chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
static const guint width = 320;
surface = gst_vaapi_surface_new(display, chroma_type, width, height);
if (!surface)
g_error("could not create Gst/VA 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)))
+ g_error("could not retrieve the native surface ID");
+ g_print("created surface %" GST_VAAPI_ID_FORMAT "\n",
+ GST_VAAPI_ID_ARGS(surface_id));
+
g_object_unref(surface);
caps = gst_caps_new_simple(
surface = gst_vaapi_video_pool_get_object(pool);
if (!surface)
g_error("could not allocate Gst/VA surface from pool");
- g_print("created surface 0x%08x from pool\n",
- gst_vaapi_surface_get_id(surface));
+ g_print("created surface %" GST_VAAPI_ID_FORMAT " from pool\n",
+ GST_VAAPI_ID_ARGS(gst_vaapi_object_get_id(GST_VAAPI_OBJECT(surface))));
surfaces[i] = surface;
}
surfaces[i] = gst_vaapi_video_pool_get_object(pool);
if (!surfaces[i])
g_error("could not re-allocate Gst/VA surface%d from pool", i);
- g_print("created surface 0x%08x from pool (realloc)\n",
- gst_vaapi_surface_get_id(surfaces[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]))));
}
if (surface == surfaces[0])