mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
tests: simple-decoder: add support for video cropping.
Handle video cropping information attached to a VA surface proxy.
This commit is contained in:
parent
155af03491
commit
2e85860c9c
1 changed files with 3 additions and 1 deletions
|
@ -435,6 +435,7 @@ renderer_process(App *app, RenderFrame *rfp)
|
||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GstVaapiSurface *surface;
|
GstVaapiSurface *surface;
|
||||||
|
const GstVaapiRectangle *crop_rect;
|
||||||
|
|
||||||
#define SEND_ERROR(...) \
|
#define SEND_ERROR(...) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -454,7 +455,8 @@ renderer_process(App *app, RenderFrame *rfp)
|
||||||
if (G_LIKELY(!g_benchmark))
|
if (G_LIKELY(!g_benchmark))
|
||||||
renderer_wait_until(app, rfp->pts);
|
renderer_wait_until(app, rfp->pts);
|
||||||
|
|
||||||
if (!gst_vaapi_window_put_surface(app->window, surface, NULL, NULL,
|
crop_rect = gst_vaapi_surface_proxy_get_crop_rect(rfp->proxy);
|
||||||
|
if (!gst_vaapi_window_put_surface(app->window, surface, crop_rect, NULL,
|
||||||
GST_VAAPI_PICTURE_STRUCTURE_FRAME))
|
GST_VAAPI_PICTURE_STRUCTURE_FRAME))
|
||||||
SEND_ERROR("failed to render surface %" GST_VAAPI_ID_FORMAT,
|
SEND_ERROR("failed to render surface %" GST_VAAPI_ID_FORMAT,
|
||||||
GST_VAAPI_ID_ARGS(gst_vaapi_surface_get_id(surface)));
|
GST_VAAPI_ID_ARGS(gst_vaapi_surface_get_id(surface)));
|
||||||
|
|
Loading…
Reference in a new issue