vulkanh264dec: add Vulkan H.264 decoder

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4850>
This commit is contained in:
Víctor Manuel Jáquez Leal 2023-07-03 13:22:47 +02:00 committed by GStreamer Marge Bot
parent f3d63183dc
commit b83927f301
4 changed files with 1409 additions and 1 deletions

View file

@ -40,6 +40,9 @@
#include "gstvulkanelements.h" #include "gstvulkanelements.h"
#include "vkoverlaycompositor.h" #include "vkoverlaycompositor.h"
#if GST_VULKAN_HAVE_VIDEO_EXTENSIONS
#include "vkh264dec.h"
#endif
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
@ -64,6 +67,10 @@ plugin_init (GstPlugin * plugin)
ret |= GST_ELEMENT_REGISTER (vulkanoverlaycompositor, plugin); ret |= GST_ELEMENT_REGISTER (vulkanoverlaycompositor, plugin);
#if GST_VULKAN_HAVE_VIDEO_EXTENSIONS
GST_ELEMENT_REGISTER (vulkanh264dec, plugin);
#endif
return ret; return ret;
} }

View file

@ -33,6 +33,12 @@ vulkan_plugin_enum_headers = files(
'vkviewconvert.h', 'vkviewconvert.h',
) )
extra_deps = []
if vulkan_conf.get('GST_VULKAN_HAVE_VIDEO_EXTENSIONS') == 1
vulkan_sources += files('vkh264dec.c')
extra_deps += gstcodecs_dep
endif
vulkan_plugin_enums = gnome.mkenums_simple('gstvulkan-plugins-enumtypes', vulkan_plugin_enums = gnome.mkenums_simple('gstvulkan-plugins-enumtypes',
sources : vulkan_plugin_enum_headers, sources : vulkan_plugin_enum_headers,
body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif', body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif',
@ -44,7 +50,7 @@ gstvulkan_plugin = library('gstvulkan',
objc_args : gst_plugins_bad_args, objc_args : gst_plugins_bad_args,
link_args : noseh_link_args, link_args : noseh_link_args,
include_directories : [configinc], include_directories : [configinc],
dependencies : [gstvideo_dep, gstbase_dep, gstvulkan_dep, vulkan_dep, gio_dep], dependencies : [gstvideo_dep, gstbase_dep, gstvulkan_dep, vulkan_dep, gio_dep] + extra_deps,
install : true, install : true,
install_dir : plugins_install_dir, install_dir : plugins_install_dir,
) )

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,33 @@
/* GStreamer
* Copyright (C) 2023 Igalia, S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#pragma once
#define GST_USE_UNSTABLE_API
#include <gst/codecs/gsth264decoder.h>
#undef GST_USE_UNSTABLE_API
G_BEGIN_DECLS
#define GST_TYPE_VULKAN_H264_DECODER (gst_vulkan_h264_decoder_get_type())
G_DECLARE_FINAL_TYPE (GstVulkanH264Decoder, gst_vulkan_h264_decoder, GST, VULKAN_H264_DECODER, GstH264Decoder)
GST_ELEMENT_REGISTER_DECLARE (vulkanh264dec);
G_END_DECLS