![]() |
![]() |
![]() |
GStreamer VA-API Plugins 1.0 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
GstVaapiFilter; GstVaapiFilter * gst_vaapi_filter_new (GstVaapiDisplay *display
); GstVaapiFilter * gst_vaapi_filter_ref (GstVaapiFilter *filter
); void gst_vaapi_filter_unref (GstVaapiFilter *filter
); void gst_vaapi_filter_replace (GstVaapiFilter **old_filter_ptr
,GstVaapiFilter *new_filter
); GPtrArray * gst_vaapi_filter_get_operations (GstVaapiFilter *filter
); GArray * gst_vaapi_filter_get_formats (GstVaapiFilter *filter
); gboolean gst_vaapi_filter_set_operation (GstVaapiFilter *filter
,GstVaapiFilterOp op
,const GValue *value
); gboolean gst_vaapi_filter_set_format (GstVaapiFilter *filter
,GstVideoFormat format
); gboolean gst_vaapi_filter_set_cropping_rectangle (GstVaapiFilter *filter
,const GstVaapiRectangle *rect
); gboolean gst_vaapi_filter_set_target_rectangle (GstVaapiFilter *filter
,const GstVaapiRectangle *rect
); gboolean gst_vaapi_filter_set_denoising_level (GstVaapiFilter *filter
,gfloat level
); gboolean gst_vaapi_filter_set_sharpening_level (GstVaapiFilter *filter
,gfloat level
); gboolean gst_vaapi_filter_set_hue (GstVaapiFilter *filter
,gfloat value
); gboolean gst_vaapi_filter_set_saturation (GstVaapiFilter *filter
,gfloat value
); gboolean gst_vaapi_filter_set_brightness (GstVaapiFilter *filter
,gfloat value
); gboolean gst_vaapi_filter_set_deinterlacing (GstVaapiFilter *filter
,GstVaapiDeinterlaceMethod method
,guint flags
);
GstVaapiFilter * gst_vaapi_filter_new (GstVaapiDisplay *display
);
Creates a new GstVaapiFilter set up to operate in "identity" mode. This means that no other operation than scaling is performed.
|
a GstVaapiDisplay |
Returns : |
the newly created GstVaapiFilter object |
GstVaapiFilter * gst_vaapi_filter_ref (GstVaapiFilter *filter
);
Atomically increases the reference count of the given filter
by one.
|
a GstVaapiFilter |
Returns : |
The same filter argument |
void gst_vaapi_filter_unref (GstVaapiFilter *filter
);
Atomically decreases the reference count of the filter
by one. If
the reference count reaches zero, the filter will be free'd.
|
a GstVaapiFilter |
void gst_vaapi_filter_replace (GstVaapiFilter **old_filter_ptr
,GstVaapiFilter *new_filter
);
Atomically replaces the filter held in old_filter_ptr
with
new_filter
. This means that old_filter_ptr
shall reference a
valid filter. However, new_filter
can be NULL.
|
a pointer to a GstVaapiFilter |
|
a GstVaapiFilter |
GPtrArray * gst_vaapi_filter_get_operations (GstVaapiFilter *filter
);
Determines the set of supported operations for video processing.
The caller owns an extra reference to the resulting array of
GstVaapiFilterOpInfo elements, so it shall be released with
g_ptr_array_unref()
after usage.
If filter
is NULL
, then this function returns the video
processing operations supported by this library.
|
a GstVaapiFilter, or NULL
|
Returns : |
the set of supported operations, or NULL if an error
occurred. |
GArray * gst_vaapi_filter_get_formats (GstVaapiFilter *filter
);
Determines the set of supported source or target formats for video
processing. The caller owns an extra reference to the resulting
array of GstVideoFormat elements, so it shall be released with
g_array_unref()
after usage.
|
a GstVaapiFilter |
Returns : |
the set of supported target formats for video processing. |
gboolean gst_vaapi_filter_set_operation (GstVaapiFilter *filter
,GstVaapiFilterOp op
,const GValue *value
);
Enable the specified operation op
to be performed during video
processing, i.e. in gst_vaapi_filter_process()
. The value
argument
specifies the operation settings. e.g. deinterlacing method for
deinterlacing, denoising level for noise reduction, etc.
If value
is NULL
, then this function resets the operation
settings to their default values.
|
a GstVaapiFilter |
|
a GstVaapiFilterOp |
|
the op settings |
Returns : |
TRUE if the specified operation may be supported,
FALSE otherwise |
gboolean gst_vaapi_filter_set_format (GstVaapiFilter *filter
,GstVideoFormat format
);
Sets the desired pixel format of the resulting video processing operations.
If format
is GST_VIDEO_FORMAT_UNKNOWN, the filter will assume iso
format conversion, i.e. no color conversion at all and the target
surface format shall match the source surface format.
If format
is GST_VIDEO_FORMAT_ENCODED, the filter will use the pixel
format of the target surface passed to gst_vaapi_filter_process()
.
|
a GstVaapiFilter |
|
the target surface format |
Returns : |
TRUE if the color conversion to the specified format
may be supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_cropping_rectangle (GstVaapiFilter *filter
,const GstVaapiRectangle *rect
);
Sets the source surface cropping rectangle to use during the video
processing. If rect
is NULL
, the whole source surface will be used.
|
a GstVaapiFilter |
|
the cropping region |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_target_rectangle (GstVaapiFilter *filter
,const GstVaapiRectangle *rect
);
Sets the region within the target surface where the source surface
would be rendered. i.e. where the hardware accelerator would emit
the outcome of video processing. If rect
is NULL
, the whole
source surface will be used.
|
a GstVaapiFilter |
|
the target render region |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_denoising_level (GstVaapiFilter *filter
,gfloat level
);
Sets the noise reduction level to apply. If level
is 0.0f, this
corresponds to disabling the noise reduction algorithm.
|
a GstVaapiFilter |
|
the level of noise reduction to apply |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_sharpening_level (GstVaapiFilter *filter
,gfloat level
);
Enables noise reduction with the specified factor.
|
a GstVaapiFilter |
|
the sharpening factor |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_hue (GstVaapiFilter *filter
,gfloat value
);
Enables color hue adjustment to the specified value.
|
a GstVaapiFilter |
|
the color hue value |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_saturation (GstVaapiFilter *filter
,gfloat value
);
Enables color saturation adjustment to the specified value.
|
a GstVaapiFilter |
|
the color saturation value |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_brightness (GstVaapiFilter *filter
,gfloat value
);
Enables color brightness adjustment to the specified value.
|
a GstVaapiFilter |
|
the color brightness value |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |
gboolean gst_vaapi_filter_set_deinterlacing (GstVaapiFilter *filter
,GstVaapiDeinterlaceMethod method
,guint flags
);
Applies deinterlacing to the video processing pipeline. If method
is not GST_VAAPI_DEINTERLACE_METHOD_NONE
, then flags
could
represent the initial picture structure of the source frame.
|
a GstVaapiFilter |
|
the deinterlacing algorithm (see GstVaapiDeinterlaceMethod) |
|
the additional flags |
Returns : |
TRUE if the operation is supported, FALSE otherwise. |