summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_av1.c6
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_objects.c17
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_objects.h5
3 files changed, 23 insertions, 5 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_av1.c b/gst-libs/gst/vaapi/gstvaapidecoder_av1.c
index 5d5610c7..062b310b 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_av1.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_av1.c
@@ -945,11 +945,13 @@ static GstVaapiDecoderStatus
av1_decode_current_picture (GstVaapiDecoderAV1 * decoder)
{
GstVaapiDecoderAV1Private *priv = &decoder->priv;
- GstVaapiPicture *const picture = (GstVaapiPicture *) priv->current_picture;
+ GstVaapiPictureAV1 *const picture =
+ (GstVaapiPictureAV1 *) priv->current_picture;
g_assert (picture);
- if (!gst_vaapi_picture_decode (picture))
+ if (!gst_vaapi_picture_decode_with_surface_id (GST_VAAPI_PICTURE (picture),
+ GST_VAAPI_SURFACE_PROXY_SURFACE_ID (picture->recon_proxy)))
return GST_VAAPI_DECODER_STATUS_ERROR_UNKNOWN;
return GST_VAAPI_DECODER_STATUS_SUCCESS;
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c
index 8139e140..159625f8 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.c
@@ -242,7 +242,8 @@ do_decode (VADisplay dpy, VAContextID ctx, VABufferID * buf_id, void **buf_ptr)
}
gboolean
-gst_vaapi_picture_decode (GstVaapiPicture * picture)
+gst_vaapi_picture_decode_with_surface_id (GstVaapiPicture * picture,
+ VASurfaceID surface_id)
{
GstVaapiIqMatrix *iq_matrix;
GstVaapiBitPlane *bitplane;
@@ -254,13 +255,14 @@ gst_vaapi_picture_decode (GstVaapiPicture * picture)
guint i;
g_return_val_if_fail (GST_VAAPI_IS_PICTURE (picture), FALSE);
+ g_return_val_if_fail (surface_id != VA_INVALID_SURFACE, FALSE);
va_display = GET_VA_DISPLAY (picture);
va_context = GET_VA_CONTEXT (picture);
- GST_DEBUG ("decode picture 0x%08x", picture->surface_id);
+ GST_DEBUG ("decode picture 0x%08x", surface_id);
- status = vaBeginPicture (va_display, va_context, picture->surface_id);
+ status = vaBeginPicture (va_display, va_context, surface_id);
if (!vaapi_check_status (status, "vaBeginPicture()"))
return FALSE;
@@ -319,6 +321,15 @@ gst_vaapi_picture_decode (GstVaapiPicture * picture)
return TRUE;
}
+gboolean
+gst_vaapi_picture_decode (GstVaapiPicture * picture)
+{
+ g_return_val_if_fail (GST_VAAPI_IS_PICTURE (picture), FALSE);
+
+ return gst_vaapi_picture_decode_with_surface_id (picture,
+ picture->surface_id);
+}
+
/* Mark picture as output for internal purposes only. Don't push frame out */
static void
do_output_internal (GstVaapiPicture * picture)
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h
index 16ef2550..cc301d17 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_objects.h
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_objects.h
@@ -198,6 +198,11 @@ gst_vaapi_picture_decode (GstVaapiPicture * picture);
G_GNUC_INTERNAL
gboolean
+gst_vaapi_picture_decode_with_surface_id (GstVaapiPicture * picture,
+ VASurfaceID surface_id);
+
+G_GNUC_INTERNAL
+gboolean
gst_vaapi_picture_output (GstVaapiPicture * picture);
G_GNUC_INTERNAL