diff --git a/sys/nvcodec/gstnvdecoder.c b/sys/nvcodec/gstnvdecoder.c index 8e3b9b90d8..e8ad2b0291 100644 --- a/sys/nvcodec/gstnvdecoder.c +++ b/sys/nvcodec/gstnvdecoder.c @@ -767,7 +767,7 @@ gst_nv_decoder_finish_frame (GstNvDecoder * decoder, g_return_val_if_fail (GST_IS_BUFFER (buffer), FALSE); #ifdef HAVE_NVCODEC_GST_GL - if (output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL && !graphics_context) { + if (output_type == GST_NV_DECODER_OUTPUT_TYPE_GL && !graphics_context) { if (!GST_IS_GL_CONTEXT (graphics_context)) { GST_ERROR_OBJECT (decoder, "Invalid GL Context"); return FALSE; @@ -776,7 +776,7 @@ gst_nv_decoder_finish_frame (GstNvDecoder * decoder, #endif if (!gst_cuda_context_push (decoder->context)) { - GST_ERROR_OBJECT (decoder, "Failed to pust CUDA context"); + GST_ERROR_OBJECT (decoder, "Failed to push CUDA context"); return FALSE; } @@ -789,12 +789,12 @@ gst_nv_decoder_finish_frame (GstNvDecoder * decoder, gst_cuda_context_pop (NULL); #ifdef HAVE_NVCODEC_GST_GL - if (output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL) { + if (output_type == GST_NV_DECODER_OUTPUT_TYPE_GL) { ret = gst_nv_decoder_copy_frame_to_gl (decoder, GST_GL_CONTEXT (graphics_context), frame, buffer); } else #endif - if (output_type == GST_NV_DECOCER_OUTPUT_TYPE_CUDA) { + if (output_type == GST_NV_DECODER_OUTPUT_TYPE_CUDA) { ret = gst_nv_decoder_copy_frame_to_cuda (decoder, frame, buffer); } else { ret = gst_nv_decoder_copy_frame_to_system (decoder, frame, buffer); @@ -819,7 +819,7 @@ typedef enum } GstNvDecoderFormatFlags; static gboolean -gst_nv_decocer_get_supported_codec_profiles (GValue * profiles, +gst_nv_decoder_get_supported_codec_profiles (GValue * profiles, cudaVideoCodec codec, GstNvDecoderFormatFlags flags) { GValue val = G_VALUE_INIT; @@ -1173,7 +1173,7 @@ gst_nv_decoder_check_device_caps (CUcontext cuda_ctx, cudaVideoCodec codec, "width", GST_TYPE_INT_RANGE, min_width, max_width, "height", GST_TYPE_INT_RANGE, min_height, max_height, NULL); - if (gst_nv_decocer_get_supported_codec_profiles (&profile_list, codec, + if (gst_nv_decoder_get_supported_codec_profiles (&profile_list, codec, format_flags)) { gst_caps_set_value (sink_templ, "profile", &profile_list); } @@ -1418,7 +1418,7 @@ gst_nv_decoder_negotiate (GstVideoDecoder * decoder, gst_video_codec_state_unref (*output_state); *output_state = state; - *output_type = GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM; + *output_type = GST_NV_DECODER_OUTPUT_TYPE_SYSTEM; { GstCaps *caps; @@ -1454,31 +1454,31 @@ gst_nv_decoder_negotiate (GstVideoDecoder * decoder, } if (have_cuda) - *output_type = GST_NV_DECOCER_OUTPUT_TYPE_CUDA; + *output_type = GST_NV_DECODER_OUTPUT_TYPE_CUDA; else if (have_gl) - *output_type = GST_NV_DECOCER_OUTPUT_TYPE_GL; + *output_type = GST_NV_DECODER_OUTPUT_TYPE_GL; } gst_clear_caps (&caps); } #ifdef HAVE_NVCODEC_GST_GL - if (*output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL && + if (*output_type == GST_NV_DECODER_OUTPUT_TYPE_GL && !gst_nv_decoder_ensure_gl_context (GST_ELEMENT (decoder), gl_display, other_gl_context, gl_context)) { GST_WARNING_OBJECT (decoder, "OpenGL context is not CUDA-compatible, fallback to system memory"); - *output_type = GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM; + *output_type = GST_NV_DECODER_OUTPUT_TYPE_SYSTEM; } #endif switch (*output_type) { - case GST_NV_DECOCER_OUTPUT_TYPE_CUDA: + case GST_NV_DECODER_OUTPUT_TYPE_CUDA: GST_DEBUG_OBJECT (decoder, "using CUDA memory"); gst_caps_set_features (state->caps, 0, gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, NULL)); break; #ifdef HAVE_NVCODEC_GST_GL - case GST_NV_DECOCER_OUTPUT_TYPE_GL: + case GST_NV_DECODER_OUTPUT_TYPE_GL: GST_DEBUG_OBJECT (decoder, "using GL memory"); gst_caps_set_features (state->caps, 0, gst_caps_features_new (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, NULL)); @@ -1585,17 +1585,17 @@ gst_nv_decoder_ensure_gl_pool (GstNvDecoder * decoder, GstQuery * query, gboolean gst_nv_decoder_decide_allocation (GstNvDecoder * nvdec, - GstVideoDecoder * decocer, GstQuery * query, GstObject * gl_context, + GstVideoDecoder * decoder, GstQuery * query, GstObject * gl_context, GstNvDecoderOutputType output_type) { - GST_DEBUG_OBJECT (decocer, "decide allocation"); + GST_DEBUG_OBJECT (decoder, "decide allocation"); /* GstVideoDecoder will take care this case */ - if (output_type == GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM) + if (output_type == GST_NV_DECODER_OUTPUT_TYPE_SYSTEM) return TRUE; #ifdef HAVE_NVCODEC_GST_GL - if (output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL) { + if (output_type == GST_NV_DECODER_OUTPUT_TYPE_GL) { if (!gst_nv_decoder_ensure_gl_pool (nvdec, query, gl_context)) return FALSE; } else diff --git a/sys/nvcodec/gstnvdecoder.h b/sys/nvcodec/gstnvdecoder.h index c3d4473bea..7ea4694c67 100644 --- a/sys/nvcodec/gstnvdecoder.h +++ b/sys/nvcodec/gstnvdecoder.h @@ -48,9 +48,9 @@ typedef struct _GstNvDecoderFrame typedef enum { - GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM = 0, - GST_NV_DECOCER_OUTPUT_TYPE_GL, - GST_NV_DECOCER_OUTPUT_TYPE_CUDA, + GST_NV_DECODER_OUTPUT_TYPE_SYSTEM = 0, + GST_NV_DECODER_OUTPUT_TYPE_GL, + GST_NV_DECODER_OUTPUT_TYPE_CUDA, /* FIXME: add support D3D11 memory */ } GstNvDecoderOutputType; @@ -116,7 +116,7 @@ gboolean gst_nv_decoder_negotiate (GstVideoDecoder * decoder, GstNvDecoderOutputType * output_type); gboolean gst_nv_decoder_decide_allocation (GstNvDecoder * nvdec, - GstVideoDecoder * decocer, + GstVideoDecoder * decoder, GstQuery * query, GstObject * gl_context, GstNvDecoderOutputType output_type); diff --git a/sys/nvcodec/gstnvh264dec.c b/sys/nvcodec/gstnvh264dec.c index f09c5d2588..c0264a4624 100644 --- a/sys/nvcodec/gstnvh264dec.c +++ b/sys/nvcodec/gstnvh264dec.c @@ -462,9 +462,9 @@ gst_nv_h264_dec_output_picture (GstH264Decoder * decoder, goto error; } - if (self->output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL) { + if (self->output_type == GST_NV_DECODER_OUTPUT_TYPE_GL) { ret = gst_nv_decoder_finish_frame (self->decoder, - GST_NV_DECOCER_OUTPUT_TYPE_GL, self->gl_context, + GST_NV_DECODER_OUTPUT_TYPE_GL, self->gl_context, decoder_frame, frame->output_buffer); /* FIXME: This is the case where OpenGL context of downstream glbufferpool @@ -474,7 +474,7 @@ gst_nv_h264_dec_output_picture (GstH264Decoder * decoder, if (!ret) { GST_WARNING_OBJECT (self, "Couldn't copy frame to GL memory, fallback to system memory"); - self->output_type = GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM; + self->output_type = GST_NV_DECODER_OUTPUT_TYPE_SYSTEM; } } diff --git a/sys/nvcodec/gstnvh265dec.c b/sys/nvcodec/gstnvh265dec.c index 33bb94d0b4..bc308ccc20 100644 --- a/sys/nvcodec/gstnvh265dec.c +++ b/sys/nvcodec/gstnvh265dec.c @@ -457,9 +457,9 @@ gst_nv_h265_dec_output_picture (GstH265Decoder * decoder, frame->output_buffer = gst_video_decoder_allocate_output_buffer (GST_VIDEO_DECODER (self));; - if (self->output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL) { + if (self->output_type == GST_NV_DECODER_OUTPUT_TYPE_GL) { ret = gst_nv_decoder_finish_frame (self->decoder, - GST_NV_DECOCER_OUTPUT_TYPE_GL, self->gl_context, + GST_NV_DECODER_OUTPUT_TYPE_GL, self->gl_context, decoder_frame, frame->output_buffer); /* FIXME: This is the case where OpenGL context of downstream glbufferpool @@ -469,7 +469,7 @@ gst_nv_h265_dec_output_picture (GstH265Decoder * decoder, if (!ret) { GST_WARNING_OBJECT (self, "Couldn't copy frame to GL memory, fallback to system memory"); - self->output_type = GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM; + self->output_type = GST_NV_DECODER_OUTPUT_TYPE_SYSTEM; } } diff --git a/sys/nvcodec/gstnvvp8dec.c b/sys/nvcodec/gstnvvp8dec.c index da200d930f..40077083c5 100644 --- a/sys/nvcodec/gstnvvp8dec.c +++ b/sys/nvcodec/gstnvvp8dec.c @@ -424,9 +424,9 @@ gst_nv_vp8_dec_output_picture (GstVp8Decoder * decoder, goto error; } - if (self->output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL) { + if (self->output_type == GST_NV_DECODER_OUTPUT_TYPE_GL) { ret = gst_nv_decoder_finish_frame (self->decoder, - GST_NV_DECOCER_OUTPUT_TYPE_GL, self->gl_context, + GST_NV_DECODER_OUTPUT_TYPE_GL, self->gl_context, decoder_frame, frame->output_buffer); /* FIXME: This is the case where OpenGL context of downstream glbufferpool @@ -436,7 +436,7 @@ gst_nv_vp8_dec_output_picture (GstVp8Decoder * decoder, if (!ret) { GST_WARNING_OBJECT (self, "Couldn't copy frame to GL memory, fallback to system memory"); - self->output_type = GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM; + self->output_type = GST_NV_DECODER_OUTPUT_TYPE_SYSTEM; } } diff --git a/sys/nvcodec/gstnvvp9dec.c b/sys/nvcodec/gstnvvp9dec.c index e3c53d828e..b6a4448ccf 100644 --- a/sys/nvcodec/gstnvvp9dec.c +++ b/sys/nvcodec/gstnvvp9dec.c @@ -535,9 +535,9 @@ gst_nv_vp9_dec_output_picture (GstVp9Decoder * decoder, goto error; } - if (self->output_type == GST_NV_DECOCER_OUTPUT_TYPE_GL) { + if (self->output_type == GST_NV_DECODER_OUTPUT_TYPE_GL) { ret = gst_nv_decoder_finish_frame (self->decoder, - GST_NV_DECOCER_OUTPUT_TYPE_GL, self->gl_context, + GST_NV_DECODER_OUTPUT_TYPE_GL, self->gl_context, decoder_frame, frame->output_buffer); /* FIXME: This is the case where OpenGL context of downstream glbufferpool @@ -547,7 +547,7 @@ gst_nv_vp9_dec_output_picture (GstVp9Decoder * decoder, if (!ret) { GST_WARNING_OBJECT (self, "Couldn't copy frame to GL memory, fallback to system memory"); - self->output_type = GST_NV_DECOCER_OUTPUT_TYPE_SYSTEM; + self->output_type = GST_NV_DECODER_OUTPUT_TYPE_SYSTEM; } }