Commit 6175e876 authored by Gwenole Beauchesne's avatar Gwenole Beauchesne

image: allow partial updates.

parent 6c1add85
This diff is collapsed.
......@@ -80,6 +80,7 @@ G_BEGIN_DECLS
typedef struct _GstVaapiImage GstVaapiImage;
typedef struct _GstVaapiImagePrivate GstVaapiImagePrivate;
typedef struct _GstVaapiImageClass GstVaapiImageClass;
typedef struct _GstVaapiImageRaw GstVaapiImageRaw;
/**
* GstVaapiImage:
......@@ -103,6 +104,21 @@ struct _GstVaapiImageClass {
GstVaapiObjectClass parent_class;
};
/**
* GstVaapiImageRaw:
*
* A raw image wrapper. The caller is responsible for initializing all
* the fields with sensible values.
*/
struct _GstVaapiImageRaw {
GstVaapiImageFormat format;
guint width;
guint height;
guint num_planes;
guchar *pixels[3];
guint stride[3];
};
GType
gst_vaapi_image_get_type(void);
......@@ -160,7 +176,11 @@ guint
gst_vaapi_image_get_data_size(GstVaapiImage *image);
gboolean
gst_vaapi_image_update_from_buffer(GstVaapiImage *image, GstBuffer *buffer);
gst_vaapi_image_update_from_buffer(
GstVaapiImage *image,
GstBuffer *buffer,
GstVaapiRectangle *rect
);
G_END_DECLS
......
......@@ -381,7 +381,7 @@ gst_vaapiconvert_transform(
if (!image)
return GST_FLOW_UNEXPECTED;
gst_vaapi_image_update_from_buffer(image, inbuf);
gst_vaapi_image_update_from_buffer(image, inbuf, NULL);
success = gst_vaapi_surface_put_image(surface, image);
gst_vaapi_video_pool_put_object(convert->images, image);
if (!success)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment