mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
va: vpp: enable compositor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2332>
This commit is contained in:
parent
afe8723196
commit
d2651a1e0b
1 changed files with 11 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "gstvaav1dec.h"
|
||||
#include "gstvacaps.h"
|
||||
#include "gstvacompositor.h"
|
||||
#include "gstvadeinterlace.h"
|
||||
#include "gstvadevice.h"
|
||||
#include "gstvafilter.h"
|
||||
|
@ -206,16 +207,18 @@ static void
|
|||
plugin_register_vpp (GstPlugin * plugin, GstVaDevice * device)
|
||||
{
|
||||
GstVaFilter *filter;
|
||||
gboolean has_colorbalance, has_deinterlace;
|
||||
gboolean has_colorbalance, has_deinterlace, has_compose;
|
||||
|
||||
has_colorbalance = FALSE;
|
||||
has_deinterlace = FALSE;
|
||||
has_compose = FALSE;
|
||||
filter = gst_va_filter_new (device->display);
|
||||
if (gst_va_filter_open (filter)) {
|
||||
has_colorbalance =
|
||||
gst_va_filter_has_filter (filter, VAProcFilterColorBalance);
|
||||
has_deinterlace =
|
||||
gst_va_filter_has_filter (filter, VAProcFilterDeinterlacing);
|
||||
has_compose = gst_va_filter_has_compose (filter);
|
||||
} else {
|
||||
GST_WARNING ("Failed open VA filter");
|
||||
gst_object_unref (filter);
|
||||
|
@ -232,6 +235,13 @@ plugin_register_vpp (GstPlugin * plugin, GstVaDevice * device)
|
|||
device->render_device_path);
|
||||
}
|
||||
}
|
||||
|
||||
if (has_compose) {
|
||||
if (!gst_va_compositor_register (plugin, device, GST_RANK_NONE)) {
|
||||
GST_WARNING ("Failed to register compositor: %s",
|
||||
device->render_device_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
Loading…
Reference in a new issue