mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
nvcodec: Add missing CUDAMemory src caps in h264 decoder
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1633>
This commit is contained in:
parent
45cc831efd
commit
36030158c4
1 changed files with 30 additions and 13 deletions
|
@ -50,6 +50,7 @@
|
||||||
#include <gst/gl/gstglfuncs.h>
|
#include <gst/gl/gstglfuncs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gstcudamemory.h"
|
||||||
#include "gstnvdecoder.h"
|
#include "gstnvdecoder.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -915,6 +916,11 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec,
|
||||||
|
|
||||||
src_templ = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("NV12"));
|
src_templ = gst_caps_from_string (GST_VIDEO_CAPS_MAKE ("NV12"));
|
||||||
|
|
||||||
|
{
|
||||||
|
GstCaps *cuda_caps = gst_caps_copy (src_templ);
|
||||||
|
gst_caps_set_features_simple (cuda_caps,
|
||||||
|
gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY));
|
||||||
|
|
||||||
#if HAVE_NVCODEC_GST_GL
|
#if HAVE_NVCODEC_GST_GL
|
||||||
{
|
{
|
||||||
GstCaps *gl_caps = gst_caps_copy (src_templ);
|
GstCaps *gl_caps = gst_caps_copy (src_templ);
|
||||||
|
@ -924,6 +930,9 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gst_caps_append (src_templ, cuda_caps);
|
||||||
|
}
|
||||||
|
|
||||||
sink_templ = gst_caps_from_string (codec_map->sink_caps_string);
|
sink_templ = gst_caps_from_string (codec_map->sink_caps_string);
|
||||||
|
|
||||||
*src_template = src_templ;
|
*src_template = src_templ;
|
||||||
|
@ -1042,6 +1051,11 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec,
|
||||||
|
|
||||||
gst_caps_set_value (src_templ, "format", &format_list);
|
gst_caps_set_value (src_templ, "format", &format_list);
|
||||||
|
|
||||||
|
{
|
||||||
|
GstCaps *cuda_caps = gst_caps_copy (src_templ);
|
||||||
|
gst_caps_set_features_simple (cuda_caps,
|
||||||
|
gst_caps_features_from_string (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY));
|
||||||
|
|
||||||
/* OpenGL specific */
|
/* OpenGL specific */
|
||||||
#if HAVE_NVCODEC_GST_GL
|
#if HAVE_NVCODEC_GST_GL
|
||||||
{
|
{
|
||||||
|
@ -1052,6 +1066,9 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gst_caps_append (src_templ, cuda_caps);
|
||||||
|
}
|
||||||
|
|
||||||
sink_templ = gst_caps_from_string (codec_map->sink_caps_string);
|
sink_templ = gst_caps_from_string (codec_map->sink_caps_string);
|
||||||
gst_caps_set_simple (sink_templ,
|
gst_caps_set_simple (sink_templ,
|
||||||
"width", GST_TYPE_INT_RANGE, min_width, max_width,
|
"width", GST_TYPE_INT_RANGE, min_width, max_width,
|
||||||
|
|
Loading…
Reference in a new issue