[Bug 738687] midi: add alsamidisrc, an ALSA MIDI sequencer source

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Jan 23 06:00:20 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=738687
  GStreamer | gst-plugins-bad | 1.x

Stefan Sauer (gstreamer, gtkdoc dev) <ensonic> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #288752|none                        |needs-work
             status|                            |

--- Comment #1 from Stefan Sauer (gstreamer, gtkdoc dev) <ensonic at sonicpulse.de> 2015-01-23 14:00:17 UTC ---
Review of attachment 288752:
 --> (https://bugzilla.gnome.org/review?bug=738687&attachment=288752)

::: gst/midi/alsamidisrc.c
@@ +261,3 @@
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}

looks like you can remove this vmethod completely

@@ +325,3 @@
+
+  local_data = g_malloc (size);
+  memcpy (local_data, data, size);

g_memdup()

@@ +331,3 @@
+          g_free));
+
+  if (alsamidisrc->dump) {

this is for debugging, I'd remove the property and use GST_MEMDUMP instead.

@@ +353,3 @@
+push_tick_buffer (GstAlsaMidiSrc * alsamidisrc, GstBufferList * buffer_list)
+{
+  alsamidisrc->buffer[0] = 0xf9;

use a constant for 0xf9 and/or add a comment.

@@ +393,3 @@
+          /* ENOENT indicates an event that is not a MIDI message, silently
skip it */
+          if (-ENOENT == size_ev) {
+            GST_WARNING ("Warning: Received non-MIDI message");

GST_WARNING_OBJECT (src, ...)
also for GST_ERROR and co.

@@ +469,3 @@
+  snd_midi_event_no_status (alsamidisrc->parser, 1);
+
+  alsamidisrc->buffer = malloc (DEFAULT_BUFSIZE);

g_malloc, please use g_malloc/g_free everywhere for consistency

@@ +471,3 @@
+  alsamidisrc->buffer = malloc (DEFAULT_BUFSIZE);
+  if (alsamidisrc->buffer == NULL) {
+    ret = -ENOMEM;

unused assigment?

@@ +486,3 @@
+
+err_free_buffer:
+  free (alsamidisrc->buffer);

g_free

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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