switch (prop_id) {
case PROP_DISPLAY:
- priv->display = g_object_ref(g_value_get_pointer(value));
+ priv->display = g_object_ref(g_value_get_object(value));
break;
case PROP_WIDTH:
priv->width = g_value_get_uint(value);
GParamSpec *pspec
)
{
- GstVaapiImage * const image = GST_VAAPI_IMAGE(object);
- GstVaapiImagePrivate * const priv = image->priv;
+ GstVaapiImage * const image = GST_VAAPI_IMAGE(object);
switch (prop_id) {
case PROP_DISPLAY:
- g_value_set_pointer(value, g_object_ref(priv->display));
+ g_value_set_pointer(value, gst_vaapi_image_get_display(image));
break;
case PROP_IMAGE_ID:
g_value_set_uint(value, gst_vaapi_image_get_id(image));
{
g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), NULL);
- return g_object_ref(image->priv->display);
+ return image->priv->display;
}
guint
gst_vaapi_display_get_display(display),
priv->subpicture_id
);
- g_object_unref(display);
if (!vaapi_check_status(status, "vaDestroySubpicture()"))
g_warning("failed to destroy subpicture 0x%08x\n",
priv->subpicture_id);
gst_vaapi_image_get_id(priv->image),
&subpicture_id
);
- g_object_unref(display);
if (!vaapi_check_status(status, "vaCreateSubpicture()"))
return FALSE;
{
g_return_val_if_fail(GST_VAAPI_IS_SUBPICTURE(subpicture), NULL);
- return g_object_ref(subpicture->priv->image);
+ return subpicture->priv->image;
}
void
switch (prop_id) {
case PROP_DISPLAY:
- /* gst_vaapi_surface_get_display() already refs the object */
- g_value_take_object(value, gst_vaapi_surface_get_display(surface));
+ g_value_set_object(value, gst_vaapi_surface_get_display(surface));
break;
case PROP_SURFACE_ID:
g_value_set_uint(value, gst_vaapi_surface_get_id(surface));
{
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), NULL);
- return g_object_ref(surface->priv->display);
+ return surface->priv->display;
}
guint