mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 09:12:19 +00:00
va: h264dec: check va allocator at decide allocation
And some code cleanups Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1516>
This commit is contained in:
parent
f755730b20
commit
c905f6131d
2 changed files with 7 additions and 7 deletions
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
#include "gstvah264dec.h"
|
#include "gstvah264dec.h"
|
||||||
|
|
||||||
|
#include <gst/codecs/gsth264decoder.h>
|
||||||
|
|
||||||
#include <va/va_drmcommon.h>
|
#include <va/va_drmcommon.h>
|
||||||
|
|
||||||
#include "gstvaallocator.h"
|
#include "gstvaallocator.h"
|
||||||
|
@ -1214,10 +1216,10 @@ gst_va_h264_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
||||||
|
|
||||||
if (gst_query_get_n_allocation_params (query) > 0) {
|
if (gst_query_get_n_allocation_params (query) > 0) {
|
||||||
gst_query_parse_nth_allocation_param (query, 0, &allocator, &other_params);
|
gst_query_parse_nth_allocation_param (query, 0, &allocator, &other_params);
|
||||||
if (allocator && !self->has_videometa
|
if (allocator && !(GST_IS_VA_DMABUF_ALLOCATOR (allocator)
|
||||||
&& !GST_IS_VA_DMABUF_ALLOCATOR (allocator)) {
|
|| GST_IS_VA_ALLOCATOR (allocator))) {
|
||||||
/* save the allocator for the other pool */
|
/* save the allocator for the other pool */
|
||||||
if ((other_allocator = allocator))
|
other_allocator = allocator;
|
||||||
allocator = NULL;
|
allocator = NULL;
|
||||||
}
|
}
|
||||||
update_allocator = TRUE;
|
update_allocator = TRUE;
|
||||||
|
@ -1405,7 +1407,7 @@ gst_va_h264_dec_class_init (gpointer g_class, gpointer class_data)
|
||||||
|
|
||||||
gobject_class->dispose = gst_va_h264_dec_dispose;
|
gobject_class->dispose = gst_va_h264_dec_dispose;
|
||||||
|
|
||||||
element_class->set_context = gst_va_h264_dec_set_context;
|
element_class->set_context = GST_DEBUG_FUNCPTR (gst_va_h264_dec_set_context);
|
||||||
|
|
||||||
decoder_class->open = GST_DEBUG_FUNCPTR (gst_va_h264_dec_open);
|
decoder_class->open = GST_DEBUG_FUNCPTR (gst_va_h264_dec_open);
|
||||||
decoder_class->close = GST_DEBUG_FUNCPTR (gst_va_h264_dec_close);
|
decoder_class->close = GST_DEBUG_FUNCPTR (gst_va_h264_dec_close);
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gst/codecs/gsth264decoder.h>
|
|
||||||
|
|
||||||
#include "gstvadevice.h"
|
#include "gstvadevice.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
Loading…
Reference in a new issue