diff options
author | Seungha Yang <seungha@centricular.com> | 2021-03-29 02:11:22 +0900 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-07 19:32:29 +0000 |
commit | 6eb9856f5965a11b15f547ff8cd1da89196c950c (patch) | |
tree | 302719b5d9f28b9243e8acd95b43ab2a6be0ffd7 /sys | |
parent | 1f769839c09b38745f0b7c9aac127ea5432804f6 (diff) | |
download | gstreamer-plugins-bad-6eb9856f5965a11b15f547ff8cd1da89196c950c.tar.gz |
codecs: vp9decoder: Pass GstVideoCodecFrame to duplicate_picture()
... and fix picture duplication logic for vavp9dec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2112>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/d3d11/gstd3d11vp9dec.cpp | 4 | ||||
-rw-r--r-- | sys/nvcodec/gstnvvp9dec.c | 12 | ||||
-rw-r--r-- | sys/va/gstvavp9dec.c | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/sys/d3d11/gstd3d11vp9dec.cpp b/sys/d3d11/gstd3d11vp9dec.cpp index a1ae106e1..a293bb75f 100644 --- a/sys/d3d11/gstd3d11vp9dec.cpp +++ b/sys/d3d11/gstd3d11vp9dec.cpp @@ -141,7 +141,7 @@ static gboolean gst_d3d11_vp9_dec_new_sequence (GstVp9Decoder * decoder, static gboolean gst_d3d11_vp9_dec_new_picture (GstVp9Decoder * decoder, GstVideoCodecFrame * frame, GstVp9Picture * picture); static GstVp9Picture *gst_d3d11_vp9_dec_duplicate_picture (GstVp9Decoder * - decoder, GstVp9Picture * picture); + decoder, GstVideoCodecFrame * frame, GstVp9Picture * picture); static GstFlowReturn gst_d3d11_vp9_dec_output_picture (GstVp9Decoder * decoder, GstVideoCodecFrame * frame, GstVp9Picture * picture); static gboolean gst_d3d11_vp9_dec_start_picture (GstVp9Decoder * decoder, @@ -418,7 +418,7 @@ gst_d3d11_vp9_dec_new_picture (GstVp9Decoder * decoder, static GstVp9Picture * gst_d3d11_vp9_dec_duplicate_picture (GstVp9Decoder * decoder, - GstVp9Picture * picture) + GstVideoCodecFrame * frame, GstVp9Picture * picture) { GstD3D11Vp9Dec *self = GST_D3D11_VP9_DEC (decoder); GstBuffer *view_buffer; diff --git a/sys/nvcodec/gstnvvp9dec.c b/sys/nvcodec/gstnvvp9dec.c index fb269e9f4..9b85730eb 100644 --- a/sys/nvcodec/gstnvvp9dec.c +++ b/sys/nvcodec/gstnvvp9dec.c @@ -78,7 +78,7 @@ static gboolean gst_nv_vp9_dec_new_sequence (GstVp9Decoder * decoder, static gboolean gst_nv_vp9_dec_new_picture (GstVp9Decoder * decoder, GstVideoCodecFrame * frame, GstVp9Picture * picture); static GstVp9Picture *gst_nv_vp9_dec_duplicate_picture (GstVp9Decoder * - decoder, GstVp9Picture * picture); + decoder, GstVideoCodecFrame * frame, GstVp9Picture * picture); static gboolean gst_nv_vp9_dec_decode_picture (GstVp9Decoder * decoder, GstVp9Picture * picture, GstVp9Dpb * dpb); static GstFlowReturn gst_nv_vp9_dec_output_picture (GstVp9Decoder * @@ -315,15 +315,15 @@ gst_nv_vp9_dec_get_decoder_frame_from_picture (GstNvVp9Dec * self, static GstVp9Picture * gst_nv_vp9_dec_duplicate_picture (GstVp9Decoder * decoder, - GstVp9Picture * picture) + GstVideoCodecFrame * frame, GstVp9Picture * picture) { GstNvVp9Dec *self = GST_NV_VP9_DEC (decoder); - GstNvDecoderFrame *frame; + GstNvDecoderFrame *nv_frame; GstVp9Picture *new_picture; - frame = gst_nv_vp9_dec_get_decoder_frame_from_picture (self, picture); + nv_frame = gst_nv_vp9_dec_get_decoder_frame_from_picture (self, picture); - if (!frame) { + if (!nv_frame) { GST_ERROR_OBJECT (self, "Parent picture does not have decoder frame"); return NULL; } @@ -332,7 +332,7 @@ gst_nv_vp9_dec_duplicate_picture (GstVp9Decoder * decoder, new_picture->frame_hdr = picture->frame_hdr; gst_vp9_picture_set_user_data (new_picture, - gst_nv_decoder_frame_ref (frame), + gst_nv_decoder_frame_ref (nv_frame), (GDestroyNotify) gst_nv_decoder_frame_unref); return new_picture; diff --git a/sys/va/gstvavp9dec.c b/sys/va/gstvavp9dec.c index 7a88f877f..df9bda7db 100644 --- a/sys/va/gstvavp9dec.c +++ b/sys/va/gstvavp9dec.c @@ -458,7 +458,7 @@ gst_va_vp9_dec_output_picture (GstVp9Decoder * decoder, static GstVp9Picture * gst_va_vp9_dec_duplicate_picture (GstVp9Decoder * decoder, - GstVp9Picture * picture) + GstVideoCodecFrame * frame, GstVp9Picture * picture) { GstVaDecodePicture *va_pic, *va_dup; GstVp9Picture *new_picture; @@ -469,6 +469,8 @@ gst_va_vp9_dec_duplicate_picture (GstVp9Decoder * decoder, new_picture = gst_vp9_picture_new (); new_picture->frame_hdr = picture->frame_hdr; + frame->output_buffer = gst_buffer_ref (va_dup->gstbuffer); + gst_vp9_picture_set_user_data (picture, va_dup, (GDestroyNotify) gst_va_decode_picture_free); |