mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
va: filter: add scale method field and setter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2654>
This commit is contained in:
parent
63a8fc505e
commit
280678fe42
2 changed files with 17 additions and 0 deletions
|
@ -58,6 +58,8 @@ struct _GstVaFilter
|
|||
guint rotation;
|
||||
GstVideoOrientationMethod orientation;
|
||||
|
||||
guint32 scale_method;
|
||||
|
||||
gboolean crop_enabled;
|
||||
|
||||
VARectangle input_region;
|
||||
|
@ -934,6 +936,18 @@ gst_va_filter_get_surface_formats (GstVaFilter * self)
|
|||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gst_va_filter_set_scale_method (GstVaFilter * self, guint32 method)
|
||||
{
|
||||
g_return_val_if_fail (GST_IS_VA_FILTER (self), FALSE);
|
||||
|
||||
GST_OBJECT_LOCK (self);
|
||||
self->scale_method = method;
|
||||
GST_OBJECT_UNLOCK (self);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
_from_video_orientation_method (GstVideoOrientationMethod orientation,
|
||||
guint * mirror, guint * rotation)
|
||||
|
@ -1617,6 +1631,7 @@ _create_pipeline_buffer (GstVaFilter * self, GstVaSample * src,
|
|||
.output_surface_flag = dst->flags,
|
||||
.input_color_properties = self->input_color_properties,
|
||||
.output_color_properties = self->output_color_properties,
|
||||
.filter_flags = self->scale_method,
|
||||
/* output to SDR */
|
||||
.output_hdr_metadata = NULL,
|
||||
};
|
||||
|
|
|
@ -120,6 +120,8 @@ gboolean gst_va_filter_install_properties (GstVaFilter * self,
|
|||
gboolean gst_va_filter_install_deinterlace_properties
|
||||
(GstVaFilter * self,
|
||||
GObjectClass * klass);
|
||||
gboolean gst_va_filter_set_scale_method (GstVaFilter * self,
|
||||
guint32 method);
|
||||
gboolean gst_va_filter_set_orientation (GstVaFilter * self,
|
||||
GstVideoOrientationMethod orientation);
|
||||
GstVideoOrientationMethod gst_va_filter_get_orientation (GstVaFilter * self);
|
||||
|
|
Loading…
Reference in a new issue