Top |
Functions
Functions
gst_video_meta_map ()
gboolean gst_video_meta_map (GstVideoMeta *meta
,guint plane
,GstMapInfo *info
,gpointer *data
,gint *stride
,GstMapFlags flags
);
Map the video plane with index plane
in meta
and return a pointer to the
first byte of the plane and the stride of the plane.
gst_video_meta_unmap ()
gboolean gst_video_meta_unmap (GstVideoMeta *meta
,guint plane
,GstMapInfo *info
);
Unmap a previously mapped plane with gst_video_meta_map()
.
gst_buffer_add_video_meta ()
GstVideoMeta * gst_buffer_add_video_meta (GstBuffer *buffer
,GstVideoFrameFlags flags
,GstVideoFormat format
,guint width
,guint height
);
Attaches GstVideoMeta metadata to buffer
with the given parameters and the
default offsets and strides for format
and width
x height
.
This function calculates the default offsets and strides and then calls
gst_buffer_add_video_meta_full()
with them.
gst_buffer_add_video_meta_full ()
GstVideoMeta * gst_buffer_add_video_meta_full (GstBuffer *buffer
,GstVideoFrameFlags flags
,GstVideoFormat format
,guint width
,guint height
,guint n_planes
,gsize offset[GST_VIDEO_MAX_PLANES]
,gint stride[GST_VIDEO_MAX_PLANES]
);
Attaches GstVideoMeta metadata to buffer
with the given parameters.
gst_buffer_get_video_meta ()
GstVideoMeta *
gst_buffer_get_video_meta (GstBuffer *buffer
);
Find the GstVideoMeta on buffer
with the lowest id
.
Buffers can contain multiple GstVideoMeta metadata items when dealing with multiview buffers.
Returns
the GstVideoMeta with lowest id (usually 0) or NULL
when there
is no such metadata on buffer
.
[transfer none]
gst_buffer_get_video_meta_id ()
GstVideoMeta * gst_buffer_get_video_meta_id (GstBuffer *buffer
,gint id
);
Find the GstVideoMeta on buffer
with the given id
.
Buffers can contain multiple GstVideoMeta metadata items when dealing with multiview buffers.
gst_buffer_add_video_crop_meta()
#define gst_buffer_add_video_crop_meta(b) ((GstVideoCropMeta*)gst_buffer_add_meta((b),GST_VIDEO_CROP_META_INFO, NULL))
gst_buffer_get_video_crop_meta()
#define gst_buffer_get_video_crop_meta(b) ((GstVideoCropMeta*)gst_buffer_get_meta((b),GST_VIDEO_CROP_META_API_TYPE))
gst_buffer_add_video_region_of_interest_meta ()
GstVideoRegionOfInterestMeta * gst_buffer_add_video_region_of_interest_meta (GstBuffer *buffer
,const gchar *roi_type
,guint x
,guint y
,guint w
,guint h
);
Attaches GstVideoRegionOfInterestMeta metadata to buffer
with the given
parameters.
gst_buffer_add_video_region_of_interest_meta_id ()
GstVideoRegionOfInterestMeta * gst_buffer_add_video_region_of_interest_meta_id (GstBuffer *buffer
,GQuark roi_type
,guint x
,guint y
,guint w
,guint h
);
Attaches GstVideoRegionOfInterestMeta metadata to buffer
with the given
parameters.
gst_buffer_get_video_region_of_interest_meta()
#define gst_buffer_get_video_region_of_interest_meta(b)
gst_buffer_get_video_region_of_interest_meta_id ()
GstVideoRegionOfInterestMeta * gst_buffer_get_video_region_of_interest_meta_id (GstBuffer *buffer
,gint id
);
Find the GstVideoRegionOfInterestMeta on buffer
with the given id
.
Buffers can contain multiple GstVideoRegionOfInterestMeta metadata items if multiple regions of interests are marked on a frame.
Returns
the GstVideoRegionOfInterestMeta with id
or NULL
when there is
no such metadata on buffer
.
[transfer none]
gst_video_region_of_interest_meta_add_param ()
void gst_video_region_of_interest_meta_add_param (GstVideoRegionOfInterestMeta *meta
,GstStructure *s
);
Attach element-specific parameters to meta
meant to be used by downstream
elements which may handle this ROI.
The name of s
is used to identify the element these parameters are meant for.
This is typically used to tell encoders how they should encode this specific region.
For example, a structure named "roi/x264enc" could be used to give the
QP offsets this encoder should use when encoding the region described in meta
.
Multiple parameters can be defined for the same meta so different encoders
can be supported by cross platform applications).
Since: 1.14
gst_video_region_of_interest_meta_get_param ()
GstStructure * gst_video_region_of_interest_meta_get_param (GstVideoRegionOfInterestMeta *meta
,const gchar *name
);
Retrieve the parameter for meta
having name
as structure name,
or NULL
if there is none.
Since: 1.14
GstVideoGLTextureUpload ()
gboolean (*GstVideoGLTextureUpload) (GstVideoGLTextureUploadMeta *meta
,guint texture_id[4]
);
gst_buffer_add_video_gl_texture_upload_meta ()
GstVideoGLTextureUploadMeta * gst_buffer_add_video_gl_texture_upload_meta (GstBuffer *buffer
,GstVideoGLTextureOrientation texture_orientation
,guint n_textures
,GstVideoGLTextureType texture_type[4]
,GstVideoGLTextureUpload upload
,gpointer user_data
,GBoxedCopyFunc user_data_copy
,GBoxedFreeFunc user_data_free
);
Attaches GstVideoGLTextureUploadMeta metadata to buffer
with the given
parameters.
Parameters
buffer |
||
texture_orientation |
||
n_textures |
the number of textures |
|
texture_type |
array of GstVideoGLTextureType |
|
upload |
the function to upload the buffer to a specific texture ID. |
[scope call] |
user_data |
user data for the implementor of |
|
user_data_copy |
function to copy |
[scope call] |
user_data_free |
function to free |
[scope call] |
gst_buffer_get_video_gl_texture_upload_meta()
#define gst_buffer_get_video_gl_texture_upload_meta(b) ((GstVideoGLTextureUploadMeta*)gst_buffer_get_meta((b),GST_VIDEO_GL_TEXTURE_UPLOAD_META_API_TYPE))
gst_video_gl_texture_upload_meta_upload ()
gboolean gst_video_gl_texture_upload_meta_upload (GstVideoGLTextureUploadMeta *meta
,guint texture_id[4]
);
Uploads the buffer which owns the meta to a specific texture ID.
gst_buffer_add_video_time_code_meta ()
GstVideoTimeCodeMeta * gst_buffer_add_video_time_code_meta (GstBuffer *buffer
,GstVideoTimeCode *tc
);
Attaches GstVideoTimeCodeMeta metadata to buffer
with the given
parameters.
Since: 1.10
gst_buffer_add_video_time_code_meta_full ()
GstVideoTimeCodeMeta * gst_buffer_add_video_time_code_meta_full (GstBuffer *buffer
,guint fps_n
,guint fps_d
,GDateTime *latest_daily_jam
,GstVideoTimeCodeFlags flags
,guint hours
,guint minutes
,guint seconds
,guint frames
,guint field_count
);
Attaches GstVideoTimeCodeMeta metadata to buffer
with the given
parameters.
Parameters
buffer |
||
fps_n |
framerate numerator |
|
fps_d |
framerate denominator |
|
latest_daily_jam |
a GDateTime for the latest daily jam |
|
flags |
||
hours |
hours since the daily jam |
|
minutes |
minutes since the daily jam |
|
seconds |
seconds since the daily jam |
|
frames |
frames since the daily jam |
|
field_count |
fields since the daily jam |
Since: 1.10
Types and Values
struct GstVideoMeta
struct GstVideoMeta { GstMeta meta; GstBuffer *buffer; GstVideoFrameFlags flags; GstVideoFormat format; gint id; guint width; guint height; guint n_planes; gsize offset[GST_VIDEO_MAX_PLANES]; gint stride[GST_VIDEO_MAX_PLANES]; gboolean (*map) (GstVideoMeta *meta, guint plane, GstMapInfo *info, gpointer *data, gint * stride, GstMapFlags flags); gboolean (*unmap) (GstVideoMeta *meta, guint plane, GstMapInfo *info); };
Extra buffer metadata describing image properties
Members
GstMeta |
parent GstMeta |
|
GstBuffer * |
the buffer this metadata belongs to |
|
GstVideoFrameFlags |
additional video flags |
|
GstVideoFormat |
the video format |
|
gint |
identifier of the frame |
|
guint |
the video width |
|
guint |
the video height |
|
guint |
the number of planes in the image |
|
gsize |
array of offsets for the planes. This field might not always be
valid, it is used by the default implementation of |
|
gint |
array of strides for the planes. This field might not always be
valid, it is used by the default implementation of |
|
map the memory of a plane |
||
unmap the memory of a plane |
GstVideoMetaTransform
typedef struct { GstVideoInfo *in_info; GstVideoInfo *out_info; } GstVideoMetaTransform;
Extra data passed to a video transform GstMetaTransformFunction such as: "gst-video-scale".
Members
GstVideoInfo * |
the input GstVideoInfo |
|
GstVideoInfo * |
the output GstVideoInfo |
struct GstVideoCropMeta
struct GstVideoCropMeta { GstMeta meta; guint x; guint y; guint width; guint height; };
Extra buffer metadata describing image cropping.
GstVideoRegionOfInterestMeta
typedef struct { GstMeta meta; GQuark roi_type; gint id; gint parent_id; guint x; guint y; guint w; guint h; GList *params; } GstVideoRegionOfInterestMeta;
Extra buffer metadata describing an image region of interest
Members
GstMeta |
parent GstMeta |
|
GQuark |
GQuark describing the semantic of the Roi (f.i. a face, a pedestrian) |
|
gint |
identifier of this particular ROI |
|
gint |
identifier of its parent ROI, used f.i. for ROI hierarchisation. |
|
guint |
x component of upper-left corner |
|
guint |
y component of upper-left corner |
|
guint |
bounding box width |
|
guint |
bounding box height |
|
GList * |
list of GstStructure containing element-specific params for downstream, see |
GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META
#define GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META "GstBufferPoolOptionVideoGLTextureUploadMeta"
An option that can be activated on a bufferpool to request gl texture upload meta on buffers from the pool.
When this option is enabled on the bufferpool,
GST_BUFFER_POOL_OPTION_VIDEO_META
should also be enabled.
Since: 1.2.2
enum GstVideoGLTextureOrientation
The orientation of the GL texture.
enum GstVideoGLTextureType
The GL texture type.
struct GstVideoGLTextureUploadMeta
struct GstVideoGLTextureUploadMeta { GstMeta meta; GstVideoGLTextureOrientation texture_orientation; guint n_textures; GstVideoGLTextureType texture_type[4]; };
Extra buffer metadata for uploading a buffer to an OpenGL texture
ID. The caller of gst_video_gl_texture_upload_meta_upload()
must
have OpenGL set up and call this from a thread where it is valid
to upload something to an OpenGL texture.
Members
GstMeta |
parent GstMeta |
|
GstVideoGLTextureOrientation |
Orientation of the textures |
|
guint |
Number of textures that are generated |
|
GstVideoGLTextureType |
Type of each texture |
GstVideoTimeCodeMeta
typedef struct { GstMeta meta; GstVideoTimeCode tc; } GstVideoTimeCodeMeta;
Extra buffer metadata describing the GstVideoTimeCode of the frame.
Each frame is assumed to have its own timecode, i.e. they are not automatically incremented/interpolated.
Since: 1.10