mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-16 17:10:35 +00:00
6e1c1178c2
Add new element for video resizing using CUDA Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1633>
56 lines
1.5 KiB
C
56 lines
1.5 KiB
C
/* GStreamer
|
|
* Copyright (C) 2019 Seungha Yang <seungha.yang@navercorp.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.
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include "gstcudafilter.h"
|
|
#include "gstcudaloader.h"
|
|
#include "gstnvrtcloader.h"
|
|
#include "gstcudanvrtc.h"
|
|
#include "gstcudaconvert.h"
|
|
#include "gstcudascale.h"
|
|
|
|
/* *INDENT-OFF* */
|
|
const gchar *nvrtc_test_source =
|
|
"__global__ void\n"
|
|
"my_kernel (void) {}";
|
|
/* *INDENT-ON* */
|
|
|
|
void
|
|
gst_cuda_filter_plugin_init (GstPlugin * plugin)
|
|
{
|
|
gchar *test_ptx = NULL;
|
|
|
|
if (!gst_nvrtc_load_library ())
|
|
return;
|
|
|
|
test_ptx = gst_cuda_nvrtc_compile (nvrtc_test_source);
|
|
|
|
if (!test_ptx) {
|
|
return;
|
|
}
|
|
g_free (test_ptx);
|
|
|
|
gst_element_register (plugin, "cudaconvert", GST_RANK_NONE,
|
|
GST_TYPE_CUDA_CONVERT);
|
|
gst_element_register (plugin, "cudascale", GST_RANK_NONE,
|
|
GST_TYPE_CUDA_SCALE);
|
|
}
|