Commit 916cf935 authored by Seungha Yang's avatar Seungha Yang 🐑
Browse files

nvcodec: Add support CUDA caps feature

parent 7ab59e35
......@@ -24,6 +24,7 @@
#include <gst/video/gstvideoencoder.h>
#include "gstcudacontext.h"
#include "gstcudabufferpool.h"
#define GST_TYPE_NV_BASE_ENC \
(gst_nv_base_enc_get_type())
......
......@@ -31,6 +31,7 @@
#include "gstnvdec.h"
#include "gstcudautils.h"
#include "gstcudabufferpool.h"
GST_DEBUG_CATEGORY_STATIC (gst_nvdec_debug_category);
#define GST_CAT_DEFAULT gst_nvdec_debug_category
......@@ -175,8 +176,10 @@ static GstStaticPadTemplate gst_nvdec_src_template =
GST_STATIC_PAD_TEMPLATE (GST_VIDEO_DECODER_SRC_NAME,
GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("NV12") ";"
GST_VIDEO_CAPS_MAKE_WITH_FEATURES
(GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "NV12") ", texture-target=2D")
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY,
"NV12") ";"
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY,
"NV12") ", texture-target=2D")
);
G_DEFINE_TYPE_WITH_CODE (GstNvDec, gst_nvdec, GST_TYPE_VIDEO_DECODER,
......
......@@ -58,7 +58,12 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS ("video/x-raw, " "format = (string) { NV12, YV12, I420 }, "
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX],"
"interlace-mode = { progressive, mixed, interleaved } "
"interlace-mode = { progressive, mixed, interleaved } ;"
"video/x-raw(" GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY "), "
"format = (string) { NV12, YV12, I420 }, "
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX],"
"interlace-mode = { progressive, mixed, interleaved }"
GL_CAPS_STR
));
......
......@@ -57,7 +57,11 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
/* TODO: add support Y444 */
GST_STATIC_CAPS ("video/x-raw, " "format = (string) { NV12, YV12, I420 }, "
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX] "
"framerate = (fraction) [0, MAX] ;"
"video/x-raw(" GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY "), "
"format = (string) { NV12, YV12, I420 }, "
"width = (int) [ 16, 4096 ], height = (int) [ 16, 2160 ], "
"framerate = (fraction) [0, MAX]"
GL_CAPS_STR
));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment