![]() |
![]() |
![]() |
GStreamer VA-API Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum GstVaapiChromaType; enum GstVaapiSurfaceStatus; enum GstVaapiSurfaceRenderFlags; GstVaapiSurface; GstVaapiSurface * gst_vaapi_surface_new (GstVaapiDisplay *display
,GstVaapiChromaType chroma_type
,guint width
,guint height
); GstVaapiSurface * gst_vaapi_surface_new_with_format (GstVaapiDisplay *display
,GstVideoFormat format
,guint width
,guint height
); GstVaapiID gst_vaapi_surface_get_id (GstVaapiSurface *surface
); GstVaapiChromaType gst_vaapi_surface_get_chroma_type (GstVaapiSurface *surface
); GstVideoFormat gst_vaapi_surface_get_format (GstVaapiSurface *surface
); guint gst_vaapi_surface_get_width (GstVaapiSurface *surface
); guint gst_vaapi_surface_get_height (GstVaapiSurface *surface
); void gst_vaapi_surface_get_size (GstVaapiSurface *surface
,guint *pwidth
,guint *pheight
); GstVaapiImage * gst_vaapi_surface_derive_image (GstVaapiSurface *surface
); gboolean gst_vaapi_surface_get_image (GstVaapiSurface *surface
,GstVaapiImage *image
); gboolean gst_vaapi_surface_put_image (GstVaapiSurface *surface
,GstVaapiImage *image
); gboolean gst_vaapi_surface_associate_subpicture (GstVaapiSurface *surface
,GstVaapiSubpicture *subpicture
,const GstVaapiRectangle *src_rect
,const GstVaapiRectangle *dst_rect
); gboolean gst_vaapi_surface_deassociate_subpicture (GstVaapiSurface *surface
,GstVaapiSubpicture *subpicture
); gboolean gst_vaapi_surface_sync (GstVaapiSurface *surface
); gboolean gst_vaapi_surface_query_status (GstVaapiSurface *surface
,GstVaapiSurfaceStatus *pstatus
);
typedef enum { GST_VAAPI_CHROMA_TYPE_YUV420 = 1, GST_VAAPI_CHROMA_TYPE_YUV422, GST_VAAPI_CHROMA_TYPE_YUV444, GST_VAAPI_CHROMA_TYPE_YUV411, GST_VAAPI_CHROMA_TYPE_YUV410, GST_VAAPI_CHROMA_TYPE_YUV400, GST_VAAPI_CHROMA_TYPE_RGB32, GST_VAAPI_CHROMA_TYPE_RGB16 } GstVaapiChromaType;
The set of all chroma types for GstVaapiSurface.
YUV 4:2:0 chroma format | |
YUV 4:2:2 chroma format | |
YUV 4:4:4 chroma format | |
YUV 4:1:1 chroma format | |
YUV 4:1:0 chroma format | |
YUV 4:0:0 chroma format (grayscale) | |
32-bit RGB chroma format | |
16-bit RGB chroma format |
typedef enum { GST_VAAPI_SURFACE_STATUS_IDLE = 1 << 0, GST_VAAPI_SURFACE_STATUS_RENDERING = 1 << 1, GST_VAAPI_SURFACE_STATUS_DISPLAYING = 1 << 2, GST_VAAPI_SURFACE_STATUS_SKIPPED = 1 << 3 } GstVaapiSurfaceStatus;
The set of all surface status for GstVaapiSurface.
the surface is not being rendered or displayed | |
the surface is used for rendering (decoding to the surface in progress) | |
the surface is being displayed to screen | |
indicates a skipped frame during encode |
typedef enum { GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD = 1 << 0, GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD = 1 << 1, GST_VAAPI_PICTURE_STRUCTURE_FRAME = ( GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD | GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD ), GST_VAAPI_COLOR_STANDARD_ITUR_BT_601 = 1 << 2, GST_VAAPI_COLOR_STANDARD_ITUR_BT_709 = 1 << 3, } GstVaapiSurfaceRenderFlags;
The set of all render flags for gst_vaapi_window_put_surface()
.
selects the top field of the surface | |
selects the bottom field of the surface | |
selects the entire surface | |
uses ITU-R BT.601 standard for color space conversion | |
uses ITU-R BT.709 standard for color space conversion |
GstVaapiSurface * gst_vaapi_surface_new (GstVaapiDisplay *display
,GstVaapiChromaType chroma_type
,guint width
,guint height
);
Creates a new GstVaapiSurface with the specified chroma format and dimensions.
|
a GstVaapiDisplay |
|
the surface chroma format |
|
the requested surface width |
|
the requested surface height |
Returns : |
the newly allocated GstVaapiSurface object |
GstVaapiSurface * gst_vaapi_surface_new_with_format (GstVaapiDisplay *display
,GstVideoFormat format
,guint width
,guint height
);
Creates a new GstVaapiSurface with the specified pixel format and dimensions.
|
a GstVaapiDisplay |
|
the surface format |
|
the requested surface width |
|
the requested surface height |
Returns : |
the newly allocated GstVaapiSurface object, or NULL
if creation of VA surface with explicit pixel format is not
supported or failed. |
GstVaapiID gst_vaapi_surface_get_id (GstVaapiSurface *surface
);
Returns the underlying VASurfaceID of the surface
.
|
a GstVaapiSurface |
Returns : |
the underlying VA surface id |
GstVaapiChromaType gst_vaapi_surface_get_chroma_type (GstVaapiSurface *surface
);
Returns the GstVaapiChromaType the surface
was created with.
|
a GstVaapiSurface |
Returns : |
the GstVaapiChromaType |
GstVideoFormat gst_vaapi_surface_get_format (GstVaapiSurface *surface
);
Returns the GstVideoFormat the surface
was created with.
|
a GstVaapiSurface |
Returns : |
the GstVideoFormat, or GST_VIDEO_FORMAT_ENCODED if
the surface was not created with an explicit video format, or if
the underlying video format could not be determined |
guint gst_vaapi_surface_get_width (GstVaapiSurface *surface
);
Returns the surface
width.
|
a GstVaapiSurface |
Returns : |
the surface width, in pixels |
guint gst_vaapi_surface_get_height (GstVaapiSurface *surface
);
Returns the surface
height.
|
a GstVaapiSurface |
Returns : |
the surface height, in pixels. |
void gst_vaapi_surface_get_size (GstVaapiSurface *surface
,guint *pwidth
,guint *pheight
);
Retrieves the dimensions of a GstVaapiSurface.
|
a GstVaapiSurface |
|
return location for the width, or NULL
|
|
return location for the height, or NULL
|
GstVaapiImage * gst_vaapi_surface_derive_image (GstVaapiSurface *surface
);
Derives a GstVaapiImage from the surface
. This image buffer can
then be mapped/unmapped for direct CPU access. This operation is
only possible if the underlying implementation supports direct
rendering capabilities and internal surface formats that can be
represented with a GstVaapiImage.
When the operation is not possible, the function returns NULL
and
the user should then fallback to using gst_vaapi_surface_get_image()
or gst_vaapi_surface_put_image()
to accomplish the same task in an
indirect manner (additional copy).
An image created with gst_vaapi_surface_derive_image()
should be
unreferenced when it's no longer needed. The image and image buffer
data structures will be destroyed. However, the surface contents
will remain unchanged until destroyed through the last call to
gst_vaapi_object_unref()
.
|
a GstVaapiSurface |
Returns : |
the newly allocated GstVaapiImage object, or NULL
on failure |
gboolean gst_vaapi_surface_get_image (GstVaapiSurface *surface
,GstVaapiImage *image
);
Retrieves surface data into a GstVaapiImage. The image
must have
a format supported by the surface
.
|
a GstVaapiSurface |
|
a GstVaapiImage |
Returns : |
TRUE on success |
gboolean gst_vaapi_surface_put_image (GstVaapiSurface *surface
,GstVaapiImage *image
);
Copies data from a GstVaapiImage into a surface
. The image
must
have a format supported by the surface
.
|
a GstVaapiSurface |
|
a GstVaapiImage |
Returns : |
TRUE on success |
gboolean gst_vaapi_surface_associate_subpicture (GstVaapiSurface *surface
,GstVaapiSubpicture *subpicture
,const GstVaapiRectangle *src_rect
,const GstVaapiRectangle *dst_rect
);
Associates the subpicture
with the surface
. The src_rect
coordinates and size are relative to the source image bound to
subpicture
. The dst_rect
coordinates and size are relative to the
target surface
. Note that the surface
holds an additional
reference to the subpicture
.
|
a GstVaapiSurface |
|
a GstVaapiSubpicture |
|
the sub-rectangle of the source subpicture
image to extract and process. If NULL , the entire image will be used. |
|
the sub-rectangle of the destination
surface into which the image is rendered. If NULL , the entire
surface will be used. |
Returns : |
TRUE on success |
gboolean gst_vaapi_surface_deassociate_subpicture (GstVaapiSurface *surface
,GstVaapiSubpicture *subpicture
);
Deassociates subpicture
from surface
. Other associations are kept.
|
a GstVaapiSurface |
|
a GstVaapiSubpicture |
Returns : |
TRUE on success |
gboolean gst_vaapi_surface_sync (GstVaapiSurface *surface
);
Blocks until all pending operations on the surface
have been
completed.
|
a GstVaapiSurface |
Returns : |
TRUE on success |
gboolean gst_vaapi_surface_query_status (GstVaapiSurface *surface
,GstVaapiSurfaceStatus *pstatus
);
Finds out any pending operations on the surface
. The
GstVaapiSurfaceStatus flags are returned into pstatus
.
|
a GstVaapiSurface |
|
return location for the GstVaapiSurfaceStatus |
Returns : |
TRUE on success |