mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
nvcodec: Add JPEG encoder
Adding nvJPEG library based JPEG encoder element Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6021>
This commit is contained in:
parent
fc4b136ac8
commit
6dc902a962
4 changed files with 1082 additions and 0 deletions
1047
subprojects/gst-plugins-bad/sys/nvcodec/gstnvjpegenc.cpp
Normal file
1047
subprojects/gst-plugins-bad/sys/nvcodec/gstnvjpegenc.cpp
Normal file
File diff suppressed because it is too large
Load diff
31
subprojects/gst-plugins-bad/sys/nvcodec/gstnvjpegenc.h
Normal file
31
subprojects/gst-plugins-bad/sys/nvcodec/gstnvjpegenc.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* 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/cuda/gstcuda.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void gst_nv_jpeg_enc_register (GstPlugin * plugin,
|
||||
GstCudaContext * context,
|
||||
guint rank,
|
||||
gboolean have_nvrtc);
|
||||
|
||||
G_END_DECLS
|
|
@ -23,6 +23,7 @@ nvcodec_sources = [
|
|||
'gstnvh265dec.cpp',
|
||||
'gstnvh265enc.c',
|
||||
'gstnvh265encoder.cpp',
|
||||
'gstnvjpegenc.cpp',
|
||||
'gstnvvp8dec.cpp',
|
||||
'gstnvvp9dec.cpp',
|
||||
'plugin.c',
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include "gstcudaipcsink.h"
|
||||
#include "gstcudaipcsrc.h"
|
||||
#include "gstnvcodecutils.h"
|
||||
#include "gstnvjpegenc.h"
|
||||
|
||||
GST_DEBUG_CATEGORY (gst_nvcodec_debug);
|
||||
GST_DEBUG_CATEGORY (gst_nvdec_debug);
|
||||
|
@ -272,6 +273,8 @@ plugin_init (GstPlugin * plugin)
|
|||
gst_nvenc_plugin_init (plugin, i, cuda_ctx);
|
||||
}
|
||||
|
||||
gst_nv_jpeg_enc_register (plugin, context, GST_RANK_NONE, have_nvrtc);
|
||||
|
||||
gst_object_unref (context);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue