mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 06:52:41 +00:00
nvcodec: Add cudacompositor element
Adding CUDA based compositor element Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8170>
This commit is contained in:
parent
875e137f4f
commit
289f63b6e7
4 changed files with 1684 additions and 0 deletions
1642
subprojects/gst-plugins-bad/sys/nvcodec/gstcudacompositor.cpp
Normal file
1642
subprojects/gst-plugins-bad/sys/nvcodec/gstcudacompositor.cpp
Normal file
File diff suppressed because it is too large
Load diff
38
subprojects/gst-plugins-bad/sys/nvcodec/gstcudacompositor.h
Normal file
38
subprojects/gst-plugins-bad/sys/nvcodec/gstcudacompositor.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* GStreamer
|
||||
* Copyright (C) 2024 Seungha Yang <seungha@centricular.com>
|
||||
*
|
||||
* 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
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/video/video.h>
|
||||
#include <gst/video/gstvideoaggregator.h>
|
||||
#include <gst/cuda/gstcuda.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_CUDA_COMPOSITOR_PAD (gst_cuda_compositor_pad_get_type())
|
||||
G_DECLARE_FINAL_TYPE (GstCudaCompositorPad, gst_cuda_compositor_pad,
|
||||
GST, CUDA_COMPOSITOR_PAD, GstVideoAggregatorPad)
|
||||
|
||||
#define GST_TYPE_CUDA_COMPOSITOR (gst_cuda_compositor_get_type())
|
||||
G_DECLARE_FINAL_TYPE (GstCudaCompositor, gst_cuda_compositor,
|
||||
GST, CUDA_COMPOSITOR, GstVideoAggregator)
|
||||
|
||||
G_END_DECLS
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
nvcodec_sources = [
|
||||
'gstcudabasetransform.c',
|
||||
'gstcudacompositor.cpp',
|
||||
'gstcudaconverter.cpp',
|
||||
'gstcudaconvertscale.c',
|
||||
'gstcudaipc.cpp',
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
#include "gstcudaipcsink.h"
|
||||
#include "gstcudaipcsrc.h"
|
||||
#include "gstnvcodecutils.h"
|
||||
#include "gstcudacompositor.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
|
@ -350,6 +351,8 @@ plugin_init (GstPlugin * plugin)
|
|||
GST_TYPE_CUDA_SCALE);
|
||||
gst_element_register (plugin, "cudaconvertscale", GST_RANK_NONE,
|
||||
GST_TYPE_CUDA_CONVERT_SCALE);
|
||||
gst_element_register (plugin, "cudacompositor", GST_RANK_NONE,
|
||||
GST_TYPE_CUDA_COMPOSITOR);
|
||||
}
|
||||
gst_element_register (plugin,
|
||||
"cudaipcsink", GST_RANK_NONE, GST_TYPE_CUDA_IPC_SINK);
|
||||
|
|
Loading…
Reference in a new issue