[Bug 781537] NVDEC - Nvidia Decoder plugin

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu May 25 15:31:56 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=781537

--- Comment #32 from atopilski at gmail.com <atopilski at gmail.com> ---
Review of attachment 352564:
 --> (https://bugzilla.gnome.org/review?bug=781537&attachment=352564)

::: configure.ac
@@ +2036,3 @@
+    PKG_CHECK_MODULES([CUDA], [cuda-7.5 cudart-7.5],, [
+      PKG_CHECK_MODULES([CUDA], [cuda-7.0 cudart-7.0],, [
+        PKG_CHECK_MODULES([CUDA], [cuda-6.5 cudart-6.5],, [

agree

::: sys/nvdec/gstnvh264dec.c
@@ +206,3 @@
+      GST_DEBUG_FUNCPTR (gst_nvh264dec_set_format);
+  video_decoder_class->drain = GST_DEBUG_FUNCPTR (gst_nvh264dec_drain);
+  video_decoder_class->reset = GST_DEBUG_FUNCPTR (gst_nvh264dec_reset);

I don't know about this, please do it.

@@ +224,3 @@
+{
+  GstNvh264decPrivate *pnvh264dec = GST_NVH264DEC_GET_PRIVATE (nvh264dec);
+  IS_CUDA_CALL_SUCCSESS (nvh264dec, cuInit (0));

Yes, we tested on many streams on one machine, cuInit can be called many times.

@@ +234,3 @@
+  pnvh264dec->width = 0;
+  pnvh264dec->height = 0;
+  g_mutex_init (&pnvh264dec->queue_mutex);

agree

@@ +317,3 @@
+  pnvh264dec->is_frame_in_use[cuviddisp->picture_index] = TRUE;
+  // Wait until we have a free entry in the display queue (should never block
if we have enough
+  // entries)

agree

@@ +623,3 @@
+  if (gst_structure_get_int (pad_struct, "width", &width)) {
+  }
+  if (gst_structure_get_int (pad_struct, "height", &height)) {

Please do it, i don't know about this struct.

@@ +626,3 @@
+  }
+
+  codec_data = gst_structure_get_string (pad_struct, "codec_data");

agree

@@ +753,3 @@
+  }
+
+  memcpy (omap_info.data, pnvh264dec->host_data, pnvh264dec->host_data_size);

Yes, should allocate omap_info struct and copy from cuda memory.

@@ +822,3 @@
+      && gst_nvh264dec_dequeue_frame (pnvh264dec, &cuviddisp)) {
+    GstFlowReturn ret =
+        gst_nvh264dec_send_decoded_frame (decoder, &cuviddisp, frame);

In mostly you are right, but i don't know how to get decoded frame in same
thread where received input data, if play with push/pop context after some
execution this calls will destroy cuda context(all cuda calls should be done in
one thread). If you know how to do decoding(in mostly only coping from cuda
memory) and displaying in same thread please do it.

::: sys/nvdec/gstnvh264plugin.c
@@ +36,3 @@
+GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
+    GST_VERSION_MINOR,
+    nvh264dec,

May be better rename target, because cuda cards can decode other stream types.

@@ +39,3 @@
+    "Nvidia cuda decoder plugin",
+    plugin_init,
+    VERSION, "BSD", "Setplex GStreamer plugins", "http://www.setplex.com")

agree

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list