Cosmetics.

This commit is contained in:
gb 2010-03-15 15:55:20 +00:00
parent 7fe02f31a5
commit eca4c7da42
3 changed files with 22 additions and 17 deletions

View file

@ -273,7 +273,8 @@ gst_vaapi_image_new(
g_return_val_if_fail(width > 0, NULL);
g_return_val_if_fail(height > 0, NULL);
GST_DEBUG("size %ux%u, format 0x%x", width, height, format);
GST_DEBUG("size %ux%u, format %" GST_FOURCC_FORMAT,
width, height, GST_FOURCC_ARGS(format));
return g_object_new(GST_VAAPI_TYPE_IMAGE,
"display", display,
@ -301,6 +302,15 @@ gst_vaapi_image_get_display(GstVaapiImage *image)
return image->priv->display;
}
GstVaapiImageFormat
gst_vaapi_image_get_format(GstVaapiImage *image)
{
g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), 0);
g_return_val_if_fail(image->priv->is_constructed, FALSE);
return image->priv->format;
}
guint
gst_vaapi_image_get_width(GstVaapiImage *image)
{
@ -332,15 +342,6 @@ gst_vaapi_image_get_size(GstVaapiImage *image, guint *pwidth, guint *pheight)
*pheight = image->priv->height;
}
guint
gst_vaapi_image_get_format(GstVaapiImage *image)
{
g_return_val_if_fail(GST_VAAPI_IS_IMAGE(image), 0);
g_return_val_if_fail(image->priv->is_constructed, FALSE);
return image->priv->format;
}
static inline gboolean
_gst_vaapi_image_is_mapped(GstVaapiImage *image)
{

View file

@ -51,6 +51,10 @@ G_BEGIN_DECLS
GST_VAAPI_TYPE_IMAGE, \
GstVaapiImageClass))
#define GST_VAAPI_IMAGE_FORMAT(img) gst_vaapi_image_get_format(img)
#define GST_VAAPI_IMAGE_WIDTH(img) gst_vaapi_image_get_width(img)
#define GST_VAAPI_IMAGE_HEIGHT(img) gst_vaapi_image_get_height(img)
typedef struct _GstVaapiImage GstVaapiImage;
typedef struct _GstVaapiImagePrivate GstVaapiImagePrivate;
typedef struct _GstVaapiImageClass GstVaapiImageClass;
@ -84,6 +88,9 @@ gst_vaapi_image_get_id(GstVaapiImage *image);
GstVaapiDisplay *
gst_vaapi_image_get_display(GstVaapiImage *image);
GstVaapiImageFormat
gst_vaapi_image_get_format(GstVaapiImage *image);
guint
gst_vaapi_image_get_width(GstVaapiImage *image);
@ -93,9 +100,6 @@ gst_vaapi_image_get_height(GstVaapiImage *image);
void
gst_vaapi_image_get_size(GstVaapiImage *image, guint *pwidth, guint *pheight);
guint
gst_vaapi_image_get_format(GstVaapiImage *image);
gboolean
gst_vaapi_image_is_mapped(GstVaapiImage *image);

View file

@ -55,7 +55,7 @@ static void
gst_vaapi_surface_destroy(GstVaapiSurface *surface)
{
GstVaapiSurfacePrivate * const priv = surface->priv;
VADisplay dpy = gst_vaapi_display_get_display(priv->display);
VADisplay dpy = GST_VAAPI_DISPLAY_VADISPLAY(priv->display);
VAStatus status;
if (priv->surface_id != VA_INVALID_SURFACE) {
@ -95,7 +95,7 @@ gst_vaapi_surface_create(GstVaapiSurface *surface)
}
status = vaCreateSurfaces(
gst_vaapi_display_get_display(priv->display),
GST_VAAPI_DISPLAY_VADISPLAY(priv->display),
priv->width,
priv->height,
format,
@ -355,7 +355,7 @@ gst_vaapi_surface_get_image(GstVaapiSurface *surface, GstVaapiImage *image)
return FALSE;
status = vaGetImage(
gst_vaapi_display_get_display(surface->priv->display),
GST_VAAPI_DISPLAY_VADISPLAY(surface->priv->display),
surface->priv->surface_id,
0, 0, width, height,
image_id
@ -385,7 +385,7 @@ gst_vaapi_surface_put_image(GstVaapiSurface *surface, GstVaapiImage *image)
return FALSE;
status = vaPutImage(
gst_vaapi_display_get_display(surface->priv->display),
GST_VAAPI_DISPLAY_VADISPLAY(surface->priv->display),
surface->priv->surface_id,
image_id,
0, 0, width, height,