mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
surface: re-indent all GstVaapiSurface related source code.
This commit is contained in:
parent
568a62ae1e
commit
334dd704b6
3 changed files with 479 additions and 561 deletions
|
@ -41,18 +41,13 @@
|
|||
#include "gstvaapidebug.h"
|
||||
|
||||
static gboolean
|
||||
_gst_vaapi_surface_associate_subpicture(
|
||||
GstVaapiSurface *surface,
|
||||
GstVaapiSubpicture *subpicture,
|
||||
const GstVaapiRectangle *src_rect,
|
||||
const GstVaapiRectangle *dst_rect
|
||||
);
|
||||
_gst_vaapi_surface_associate_subpicture (GstVaapiSurface * surface,
|
||||
GstVaapiSubpicture * subpicture, const GstVaapiRectangle * src_rect,
|
||||
const GstVaapiRectangle * dst_rect);
|
||||
|
||||
static gboolean
|
||||
_gst_vaapi_surface_deassociate_subpicture(
|
||||
GstVaapiSurface *surface,
|
||||
GstVaapiSubpicture *subpicture
|
||||
);
|
||||
_gst_vaapi_surface_deassociate_subpicture (GstVaapiSurface * surface,
|
||||
GstVaapiSubpicture * subpicture);
|
||||
|
||||
static void
|
||||
destroy_subpicture_cb (gpointer subpicture, gpointer surface)
|
||||
|
@ -65,8 +60,7 @@ static void
|
|||
gst_vaapi_surface_destroy_subpictures (GstVaapiSurface * surface)
|
||||
{
|
||||
if (surface->subpictures) {
|
||||
g_ptr_array_foreach(surface->subpictures, destroy_subpicture_cb,
|
||||
surface);
|
||||
g_ptr_array_foreach (surface->subpictures, destroy_subpicture_cb, surface);
|
||||
g_ptr_array_free (surface->subpictures, TRUE);
|
||||
surface->subpictures = NULL;
|
||||
}
|
||||
|
@ -87,10 +81,8 @@ gst_vaapi_surface_destroy(GstVaapiSurface *surface)
|
|||
|
||||
if (surface_id != VA_INVALID_SURFACE) {
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaDestroySurfaces(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
&surface_id, 1
|
||||
);
|
||||
status = vaDestroySurfaces (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
&surface_id, 1);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaDestroySurfaces()"))
|
||||
g_warning ("failed to destroy surface %" GST_VAAPI_ID_FORMAT,
|
||||
|
@ -113,11 +105,8 @@ gst_vaapi_surface_create(GstVaapiSurface *surface,
|
|||
goto error_unsupported_chroma_type;
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaCreateSurfaces(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
width, height, va_chroma_format,
|
||||
1, &surface_id
|
||||
);
|
||||
status = vaCreateSurfaces (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
width, height, va_chroma_format, 1, &surface_id);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaCreateSurfaces()"))
|
||||
return FALSE;
|
||||
|
@ -167,12 +156,8 @@ gst_vaapi_surface_create_with_format(GstVaapiSurface *surface,
|
|||
attrib.value.value.i = va_format->fourcc;
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaCreateSurfaces(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
va_chroma_format, width, height,
|
||||
&surface_id, 1,
|
||||
&attrib, 1
|
||||
);
|
||||
status = vaCreateSurfaces (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
va_chroma_format, width, height, &surface_id, 1, &attrib, 1);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaCreateSurfaces()"))
|
||||
return FALSE;
|
||||
|
@ -188,7 +173,8 @@ gst_vaapi_surface_create_with_format(GstVaapiSurface *surface,
|
|||
|
||||
/* ERRORS */
|
||||
error_unsupported_format:
|
||||
GST_ERROR("unsupported format %s", gst_vaapi_video_format_to_string(format));
|
||||
GST_ERROR ("unsupported format %s",
|
||||
gst_vaapi_video_format_to_string (format));
|
||||
return FALSE;
|
||||
#else
|
||||
return FALSE;
|
||||
|
@ -196,7 +182,7 @@ error_unsupported_format:
|
|||
}
|
||||
|
||||
#define gst_vaapi_surface_finalize gst_vaapi_surface_destroy
|
||||
GST_VAAPI_OBJECT_DEFINE_CLASS(GstVaapiSurface, gst_vaapi_surface)
|
||||
GST_VAAPI_OBJECT_DEFINE_CLASS (GstVaapiSurface, gst_vaapi_surface);
|
||||
|
||||
/**
|
||||
* gst_vaapi_surface_new:
|
||||
|
@ -211,12 +197,8 @@ GST_VAAPI_OBJECT_DEFINE_CLASS(GstVaapiSurface, gst_vaapi_surface)
|
|||
* Return value: the newly allocated #GstVaapiSurface object
|
||||
*/
|
||||
GstVaapiSurface *
|
||||
gst_vaapi_surface_new(
|
||||
GstVaapiDisplay *display,
|
||||
GstVaapiChromaType chroma_type,
|
||||
guint width,
|
||||
guint height
|
||||
)
|
||||
gst_vaapi_surface_new (GstVaapiDisplay * display,
|
||||
GstVaapiChromaType chroma_type, guint width, guint height)
|
||||
{
|
||||
GstVaapiSurface *surface;
|
||||
|
||||
|
@ -250,12 +232,8 @@ error:
|
|||
* supported or failed.
|
||||
*/
|
||||
GstVaapiSurface *
|
||||
gst_vaapi_surface_new_with_format(
|
||||
GstVaapiDisplay *display,
|
||||
GstVideoFormat format,
|
||||
guint width,
|
||||
guint height
|
||||
)
|
||||
gst_vaapi_surface_new_with_format (GstVaapiDisplay * display,
|
||||
GstVideoFormat format, guint width, guint height)
|
||||
{
|
||||
GstVaapiSurface *surface;
|
||||
|
||||
|
@ -370,25 +348,22 @@ gst_vaapi_surface_get_height(GstVaapiSurface *surface)
|
|||
/**
|
||||
* gst_vaapi_surface_get_size:
|
||||
* @surface: a #GstVaapiSurface
|
||||
* @pwidth: return location for the width, or %NULL
|
||||
* @pheight: return location for the height, or %NULL
|
||||
* @width_ptr: return location for the width, or %NULL
|
||||
* @height_ptr: return location for the height, or %NULL
|
||||
*
|
||||
* Retrieves the dimensions of a #GstVaapiSurface.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_surface_get_size(
|
||||
GstVaapiSurface *surface,
|
||||
guint *pwidth,
|
||||
guint *pheight
|
||||
)
|
||||
gst_vaapi_surface_get_size (GstVaapiSurface * surface,
|
||||
guint * width_ptr, guint * height_ptr)
|
||||
{
|
||||
g_return_if_fail (surface != NULL);
|
||||
|
||||
if (pwidth)
|
||||
*pwidth = GST_VAAPI_SURFACE_WIDTH(surface);
|
||||
if (width_ptr)
|
||||
*width_ptr = GST_VAAPI_SURFACE_WIDTH (surface);
|
||||
|
||||
if (pheight)
|
||||
*pheight = GST_VAAPI_SURFACE_HEIGHT(surface);
|
||||
if (height_ptr)
|
||||
*height_ptr = GST_VAAPI_SURFACE_HEIGHT (surface);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -401,10 +376,8 @@ gst_vaapi_surface_get_size(
|
|||
* which will be released when the surface is destroyed.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_surface_set_parent_context(
|
||||
GstVaapiSurface *surface,
|
||||
GstVaapiContext *context
|
||||
)
|
||||
gst_vaapi_surface_set_parent_context (GstVaapiSurface * surface,
|
||||
GstVaapiContext * context)
|
||||
{
|
||||
g_return_if_fail (surface != NULL);
|
||||
|
||||
|
@ -467,11 +440,8 @@ gst_vaapi_surface_derive_image(GstVaapiSurface *surface)
|
|||
va_image.buf = VA_INVALID_ID;
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaDeriveImage(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
GST_VAAPI_OBJECT_ID(surface),
|
||||
&va_image
|
||||
);
|
||||
status = vaDeriveImage (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
GST_VAAPI_OBJECT_ID (surface), &va_image);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaDeriveImage()"))
|
||||
return NULL;
|
||||
|
@ -516,12 +486,8 @@ gst_vaapi_surface_get_image(GstVaapiSurface *surface, GstVaapiImage *image)
|
|||
return FALSE;
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaGetImage(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
GST_VAAPI_OBJECT_ID(surface),
|
||||
0, 0, width, height,
|
||||
image_id
|
||||
);
|
||||
status = vaGetImage (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
GST_VAAPI_OBJECT_ID (surface), 0, 0, width, height, image_id);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaGetImage()"))
|
||||
return FALSE;
|
||||
|
@ -564,13 +530,9 @@ gst_vaapi_surface_put_image(GstVaapiSurface *surface, GstVaapiImage *image)
|
|||
return FALSE;
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaPutImage(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
GST_VAAPI_OBJECT_ID(surface),
|
||||
image_id,
|
||||
0, 0, width, height,
|
||||
0, 0, width, height
|
||||
);
|
||||
status = vaPutImage (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
GST_VAAPI_OBJECT_ID (surface), image_id, 0, 0, width, height,
|
||||
0, 0, width, height);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaPutImage()"))
|
||||
return FALSE;
|
||||
|
@ -597,12 +559,9 @@ gst_vaapi_surface_put_image(GstVaapiSurface *surface, GstVaapiImage *image)
|
|||
* Return value: %TRUE on success
|
||||
*/
|
||||
gboolean
|
||||
gst_vaapi_surface_associate_subpicture(
|
||||
GstVaapiSurface *surface,
|
||||
gst_vaapi_surface_associate_subpicture (GstVaapiSurface * surface,
|
||||
GstVaapiSubpicture * subpicture,
|
||||
const GstVaapiRectangle *src_rect,
|
||||
const GstVaapiRectangle *dst_rect
|
||||
)
|
||||
const GstVaapiRectangle * src_rect, const GstVaapiRectangle * dst_rect)
|
||||
{
|
||||
gboolean success;
|
||||
|
||||
|
@ -616,19 +575,14 @@ gst_vaapi_surface_associate_subpicture(
|
|||
}
|
||||
|
||||
if (g_ptr_array_remove_fast (surface->subpictures, subpicture)) {
|
||||
success = _gst_vaapi_surface_deassociate_subpicture(surface,
|
||||
subpicture);
|
||||
success = _gst_vaapi_surface_deassociate_subpicture (surface, subpicture);
|
||||
gst_vaapi_object_unref (subpicture);
|
||||
if (!success)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
success = _gst_vaapi_surface_associate_subpicture(
|
||||
surface,
|
||||
subpicture,
|
||||
src_rect,
|
||||
dst_rect
|
||||
);
|
||||
success = _gst_vaapi_surface_associate_subpicture (surface,
|
||||
subpicture, src_rect, dst_rect);
|
||||
if (!success)
|
||||
return FALSE;
|
||||
|
||||
|
@ -637,12 +591,9 @@ gst_vaapi_surface_associate_subpicture(
|
|||
}
|
||||
|
||||
gboolean
|
||||
_gst_vaapi_surface_associate_subpicture(
|
||||
GstVaapiSurface *surface,
|
||||
_gst_vaapi_surface_associate_subpicture (GstVaapiSurface * surface,
|
||||
GstVaapiSubpicture * subpicture,
|
||||
const GstVaapiRectangle *src_rect,
|
||||
const GstVaapiRectangle *dst_rect
|
||||
)
|
||||
const GstVaapiRectangle * src_rect, const GstVaapiRectangle * dst_rect)
|
||||
{
|
||||
GstVaapiDisplay *display;
|
||||
GstVaapiRectangle src_rect_default, dst_rect_default;
|
||||
|
@ -678,14 +629,12 @@ _gst_vaapi_surface_associate_subpicture(
|
|||
}
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaAssociateSubpicture(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
GST_VAAPI_OBJECT_ID(subpicture),
|
||||
&surface_id, 1,
|
||||
status = vaAssociateSubpicture (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
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,
|
||||
from_GstVaapiSubpictureFlags(gst_vaapi_subpicture_get_flags(subpicture))
|
||||
);
|
||||
from_GstVaapiSubpictureFlags (gst_vaapi_subpicture_get_flags
|
||||
(subpicture)));
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaAssociateSubpicture()"))
|
||||
return FALSE;
|
||||
|
@ -703,10 +652,8 @@ _gst_vaapi_surface_associate_subpicture(
|
|||
* Return value: %TRUE on success
|
||||
*/
|
||||
gboolean
|
||||
gst_vaapi_surface_deassociate_subpicture(
|
||||
GstVaapiSurface *surface,
|
||||
GstVaapiSubpicture *subpicture
|
||||
)
|
||||
gst_vaapi_surface_deassociate_subpicture (GstVaapiSurface * surface,
|
||||
GstVaapiSubpicture * subpicture)
|
||||
{
|
||||
gboolean success;
|
||||
|
||||
|
@ -731,10 +678,8 @@ gst_vaapi_surface_deassociate_subpicture(
|
|||
}
|
||||
|
||||
gboolean
|
||||
_gst_vaapi_surface_deassociate_subpicture(
|
||||
GstVaapiSurface *surface,
|
||||
GstVaapiSubpicture *subpicture
|
||||
)
|
||||
_gst_vaapi_surface_deassociate_subpicture (GstVaapiSurface * surface,
|
||||
GstVaapiSubpicture * subpicture)
|
||||
{
|
||||
GstVaapiDisplay *display;
|
||||
VASurfaceID surface_id;
|
||||
|
@ -749,11 +694,8 @@ _gst_vaapi_surface_deassociate_subpicture(
|
|||
return FALSE;
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaDeassociateSubpicture(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
GST_VAAPI_OBJECT_ID(subpicture),
|
||||
&surface_id, 1
|
||||
);
|
||||
status = vaDeassociateSubpicture (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
GST_VAAPI_OBJECT_ID (subpicture), &surface_id, 1);
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaDeassociateSubpicture()"))
|
||||
return FALSE;
|
||||
|
@ -783,10 +725,8 @@ gst_vaapi_surface_sync(GstVaapiSurface *surface)
|
|||
return FALSE;
|
||||
|
||||
GST_VAAPI_DISPLAY_LOCK (display);
|
||||
status = vaSyncSurface(
|
||||
GST_VAAPI_DISPLAY_VADISPLAY(display),
|
||||
GST_VAAPI_OBJECT_ID(surface)
|
||||
);
|
||||
status = vaSyncSurface (GST_VAAPI_DISPLAY_VADISPLAY (display),
|
||||
GST_VAAPI_OBJECT_ID (surface));
|
||||
GST_VAAPI_DISPLAY_UNLOCK (display);
|
||||
if (!vaapi_check_status (status, "vaSyncSurface()"))
|
||||
return FALSE;
|
||||
|
@ -805,10 +745,8 @@ gst_vaapi_surface_sync(GstVaapiSurface *surface)
|
|||
* Return value: %TRUE on success
|
||||
*/
|
||||
gboolean
|
||||
gst_vaapi_surface_query_status(
|
||||
GstVaapiSurface *surface,
|
||||
GstVaapiSurfaceStatus *pstatus
|
||||
)
|
||||
gst_vaapi_surface_query_status (GstVaapiSurface * surface,
|
||||
GstVaapiSurfaceStatus * pstatus)
|
||||
{
|
||||
VASurfaceStatus surface_status;
|
||||
VAStatus status;
|
||||
|
@ -816,11 +754,8 @@ gst_vaapi_surface_query_status(
|
|||
g_return_val_if_fail (surface != NULL, FALSE);
|
||||
|
||||
GST_VAAPI_OBJECT_LOCK_DISPLAY (surface);
|
||||
status = vaQuerySurfaceStatus(
|
||||
GST_VAAPI_OBJECT_VADISPLAY(surface),
|
||||
GST_VAAPI_OBJECT_ID(surface),
|
||||
&surface_status
|
||||
);
|
||||
status = vaQuerySurfaceStatus (GST_VAAPI_OBJECT_VADISPLAY (surface),
|
||||
GST_VAAPI_OBJECT_ID (surface), &surface_status);
|
||||
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (surface);
|
||||
if (!vaapi_check_status (status, "vaQuerySurfaceStatus()"))
|
||||
return FALSE;
|
||||
|
@ -844,11 +779,8 @@ gst_vaapi_surface_query_status(
|
|||
* Return value: %TRUE on success
|
||||
*/
|
||||
gboolean
|
||||
gst_vaapi_surface_set_subpictures_from_composition(
|
||||
GstVaapiSurface *surface,
|
||||
GstVideoOverlayComposition *composition,
|
||||
gboolean propagate_context
|
||||
)
|
||||
gst_vaapi_surface_set_subpictures_from_composition (GstVaapiSurface * surface,
|
||||
GstVideoOverlayComposition * composition, gboolean propagate_context)
|
||||
{
|
||||
GstVaapiDisplay *display;
|
||||
guint n, nb_rectangles;
|
||||
|
|
|
@ -67,7 +67,8 @@ G_BEGIN_DECLS
|
|||
*
|
||||
* The set of all chroma types for #GstVaapiSurface.
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
GST_VAAPI_CHROMA_TYPE_YUV420 = 1,
|
||||
GST_VAAPI_CHROMA_TYPE_YUV422,
|
||||
GST_VAAPI_CHROMA_TYPE_YUV444,
|
||||
|
@ -91,7 +92,8 @@ typedef enum {
|
|||
*
|
||||
* The set of all surface status for #GstVaapiSurface.
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
GST_VAAPI_SURFACE_STATUS_IDLE = 1 << 0,
|
||||
GST_VAAPI_SURFACE_STATUS_RENDERING = 1 << 1,
|
||||
GST_VAAPI_SURFACE_STATUS_DISPLAYING = 1 << 2,
|
||||
|
@ -121,7 +123,8 @@ typedef enum {
|
|||
*
|
||||
* The set of all render flags for gst_vaapi_window_put_surface().
|
||||
*/
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
/* Picture structure */
|
||||
GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD = 0x01 << 0,
|
||||
GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD = 0x02 << 0,
|
||||
|
@ -145,20 +148,12 @@ typedef struct _GstVaapiSurface GstVaapiSurface;
|
|||
typedef struct _GstVaapiSurfaceProxy GstVaapiSurfaceProxy;
|
||||
|
||||
GstVaapiSurface *
|
||||
gst_vaapi_surface_new(
|
||||
GstVaapiDisplay *display,
|
||||
GstVaapiChromaType chroma_type,
|
||||
guint width,
|
||||
guint height
|
||||
);
|
||||
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
|
||||
);
|
||||
gst_vaapi_surface_new_with_format (GstVaapiDisplay * display,
|
||||
GstVideoFormat format, guint width, guint height);
|
||||
|
||||
GstVaapiID
|
||||
gst_vaapi_surface_get_id (GstVaapiSurface * surface);
|
||||
|
@ -176,11 +171,8 @@ guint
|
|||
gst_vaapi_surface_get_height (GstVaapiSurface * surface);
|
||||
|
||||
void
|
||||
gst_vaapi_surface_get_size(
|
||||
GstVaapiSurface *surface,
|
||||
guint *pwidth,
|
||||
guint *pheight
|
||||
);
|
||||
gst_vaapi_surface_get_size (GstVaapiSurface * surface, guint * width_ptr,
|
||||
guint * height_ptr);
|
||||
|
||||
GstVaapiImage *
|
||||
gst_vaapi_surface_derive_image (GstVaapiSurface * surface);
|
||||
|
@ -192,34 +184,24 @@ 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
|
||||
);
|
||||
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
|
||||
);
|
||||
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
|
||||
);
|
||||
gst_vaapi_surface_query_status (GstVaapiSurface * surface,
|
||||
GstVaapiSurfaceStatus * pstatus);
|
||||
|
||||
gboolean
|
||||
gst_vaapi_surface_set_subpictures_from_composition(
|
||||
GstVaapiSurface *surface,
|
||||
GstVideoOverlayComposition *composition,
|
||||
gboolean propagate_context
|
||||
);
|
||||
gst_vaapi_surface_set_subpictures_from_composition (GstVaapiSurface * surface,
|
||||
GstVideoOverlayComposition * composition, gboolean propagate_context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include <gst/vaapi/gstvaapisurface.h>
|
||||
#include "gstvaapiobject_priv.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GstVaapiSurfaceClass GstVaapiSurfaceClass;
|
||||
|
||||
/**
|
||||
|
@ -34,7 +36,8 @@ typedef struct _GstVaapiSurfaceClass GstVaapiSurfaceClass;
|
|||
*
|
||||
* A VA surface wrapper.
|
||||
*/
|
||||
struct _GstVaapiSurface {
|
||||
struct _GstVaapiSurface
|
||||
{
|
||||
/*< private >*/
|
||||
GstVaapiObject parent_instance;
|
||||
|
||||
|
@ -51,7 +54,8 @@ struct _GstVaapiSurface {
|
|||
*
|
||||
* A VA surface wrapper class.
|
||||
*/
|
||||
struct _GstVaapiSurfaceClass {
|
||||
struct _GstVaapiSurfaceClass
|
||||
{
|
||||
/*< private >*/
|
||||
GstVaapiObjectClass parent_class;
|
||||
};
|
||||
|
@ -66,7 +70,7 @@ struct _GstVaapiSurfaceClass {
|
|||
*/
|
||||
#undef GST_VAAPI_SURFACE_CHROMA_TYPE
|
||||
#define GST_VAAPI_SURFACE_CHROMA_TYPE(surface) \
|
||||
GST_VAAPI_SURFACE(surface)->chroma_type
|
||||
(GST_VAAPI_SURFACE (surface)->chroma_type)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_SURFACE_FORMAT:
|
||||
|
@ -78,7 +82,7 @@ struct _GstVaapiSurfaceClass {
|
|||
*/
|
||||
#undef GST_VAAPI_SURFACE_FORMAT
|
||||
#define GST_VAAPI_SURFACE_FORMAT(surface) \
|
||||
GST_VAAPI_SURFACE(surface)->format
|
||||
(GST_VAAPI_SURFACE (surface)->format)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_SURFACE_WIDTH:
|
||||
|
@ -90,7 +94,7 @@ struct _GstVaapiSurfaceClass {
|
|||
*/
|
||||
#undef GST_VAAPI_SURFACE_WIDTH
|
||||
#define GST_VAAPI_SURFACE_WIDTH(surface) \
|
||||
GST_VAAPI_SURFACE(surface)->width
|
||||
(GST_VAAPI_SURFACE (surface)->width)
|
||||
|
||||
/**
|
||||
* GST_VAAPI_SURFACE_SURFACE_HEIGHT:
|
||||
|
@ -102,17 +106,17 @@ struct _GstVaapiSurfaceClass {
|
|||
*/
|
||||
#undef GST_VAAPI_SURFACE_HEIGHT
|
||||
#define GST_VAAPI_SURFACE_HEIGHT(surface) \
|
||||
GST_VAAPI_SURFACE(surface)->height
|
||||
(GST_VAAPI_SURFACE (surface)->height)
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
void
|
||||
gst_vaapi_surface_set_parent_context(
|
||||
GstVaapiSurface *surface,
|
||||
GstVaapiContext *context
|
||||
);
|
||||
gst_vaapi_surface_set_parent_context (GstVaapiSurface * surface,
|
||||
GstVaapiContext * context);
|
||||
|
||||
G_GNUC_INTERNAL
|
||||
GstVaapiContext *
|
||||
gst_vaapi_surface_get_parent_context (GstVaapiSurface * surface);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_SURFACE_PRIV_H */
|
||||
|
|
Loading…
Reference in a new issue