From: Antonio Ospite Date: Mon, 25 Sep 2017 12:07:05 +0000 (+0200) Subject: Make push_buffer() look similar to the code used in alsamidisrc X-Git-Url: https://git.ao2.it/gst-aseq-appsrc.git/commitdiff_plain/2c5b603490fb866797473a684a256da35ef456b1?ds=inline Make push_buffer() look similar to the code used in alsamidisrc --- diff --git a/gst-aseq-appsrc.c b/gst-aseq-appsrc.c index 8b939e9..7c42ab4 100644 --- a/gst-aseq-appsrc.c +++ b/gst-aseq-appsrc.c @@ -171,12 +171,11 @@ connect_ports (App * app) static void push_buffer (App * app, gpointer data, guint size) { - GstBuffer *buffer; GstClockTime time; - int ret; gpointer local_data; + GstBuffer *buffer; + int ret; - /* read the next chunk */ buffer = gst_buffer_new (); time = app->tick * DEFAULT_TICK_PERIOD_MS * GST_MSECOND; @@ -192,6 +191,8 @@ push_buffer (App * app, gpointer data, guint size) gst_memory_new_wrapped (0, local_data, size, 0, size, local_data, g_free)); + GST_MEMDUMP ("MIDI data:", local_data, size); + GST_DEBUG ("feed buffer %p, tick %" G_GUINT64_FORMAT " size: %u", (gpointer) buffer, app->tick, size); g_signal_emit_by_name (app->appsrc, "push-buffer", buffer, &ret);