GstSurfaceBuffer

GstSurfaceBuffer — Accelerated surface base class

Functions

Types and Values

Description

This base class is used to abstract hardware accelerated buffers and enable generic convertion to standard type such as GL textures. The media type for those buffers is defined by GST_VIDEO_CAPS_SURFACE. An implementation specific type must be set using the "type" key (e.g. type="vaapi"). Available convertion type are speficied using seperate boolean arguement (e.g. opengl=true). Having this information in the capabilities allow easy negotiating of such feature with other elements (e.g. a ClutterGstVideoSink can claim accpeting caps "video/x-surface,opengl=true").

The GstVideoContext interface is unstable API and may change in future. One can define GST_USE_UNSTABLE_API to acknowledge and avoid this warning.

Functions

gst_surface_buffer_get_type ()

GType
gst_surface_buffer_get_type (void);

gst_surface_buffer_create_converter ()

GstSurfaceConverter *
gst_surface_buffer_create_converter (GstSurfaceBuffer *buffer,
                                     const gchar *type,
                                     GValue *dest);

This method is used to create a type specific converter. The converter will serve as context to accelerate the data convertion. This converter object shall be discarded when the pipeline state changes to NULL and renewed when caps are changed.

Parameters

buffer

a GstSurfaceBuffer

 

type

the type to convert to

 

dest

a GValue containing the destination to upload

 

Returns

newly allocated GstSurfaceConverter

Types and Values

GST_VIDEO_CAPS_SURFACE

#define GST_VIDEO_CAPS_SURFACE "video/x-surface"

Base caps for GstSurfaceBuffer. Implementation specific type must be marked using the type attribute (e.g. type=vaapi). Available convertion shall be specified using boolean attributes (e.g. opengl=true).


GstSurfaceBuffer

typedef struct {
  GstBuffer parent;
} GstSurfaceBuffer;

Members

GstBuffer parent;

parent object

 

struct GstSurfaceBufferClass

struct GstSurfaceBufferClass {
  GstBufferClass parent_class;

  GstSurfaceConverter * (*create_converter) (GstSurfaceBuffer *buffer,
                                             const gchar *type,
                                             GValue *dest);
};

GstVideoContextInterface interface.

Members

GstBufferClass parent_class;

parent class type.

 

create_converter ()

vmethod to create a converter.