diff options
author | Alfred E. Heggestad <aeh@db.org> | 2014-04-12 21:19:28 +0200 |
---|---|---|
committer | Alfred E. Heggestad <aeh@db.org> | 2014-04-12 21:19:28 +0200 |
commit | ac32d6f03bd54b5a87ceb36b48832501c034ff51 (patch) | |
tree | 472cdefd27086a4a3ad21d11a7515ae7935bf79d /modules/gst/gst.c | |
parent | 096d7d04150eaa45c09e831aa98de1621c37a41d (diff) |
modules: use new logging functions
Diffstat (limited to 'modules/gst/gst.c')
-rw-r--r-- | modules/gst/gst.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/modules/gst/gst.c b/modules/gst/gst.c index aefd9de..301fe93 100644 --- a/modules/gst/gst.c +++ b/modules/gst/gst.c @@ -15,11 +15,6 @@ #include "gst.h" -#define DEBUG_MODULE "gst" -#define DEBUG_LEVEL 5 -#include <re_dbg.h> - - /** * Defines the Gstreamer state * @@ -62,7 +57,6 @@ static void *thread(void *arg) struct ausrc_st *st = arg; /* Now set to playing and iterate. */ - DEBUG_NOTICE("Setting pipeline to PLAYING\n"); gst_element_set_state(st->pipeline, GST_STATE_PLAYING); while (st->run) { @@ -87,8 +81,6 @@ static gboolean bus_watch_handler(GstBus *bus, GstMessage *msg, gpointer data) switch (GST_MESSAGE_TYPE(msg)) { case GST_MESSAGE_EOS: - DEBUG_NOTICE("End-of-stream\n"); - /* XXX decrementing repeat count? */ /* Re-start stream */ @@ -104,9 +96,9 @@ static gboolean bus_watch_handler(GstBus *bus, GstMessage *msg, gpointer data) case GST_MESSAGE_ERROR: gst_message_parse_error(msg, &err, &d); - DEBUG_WARNING("Error: %d(%m) message=%s\n", err->code, - err->code, err->message); - DEBUG_WARNING("Debug: %s\n", d); + warning("gst: Error: %d(%m) message=%s\n", err->code, + err->code, err->message); + warning("gst: Debug: %s\n", d); g_free(d); @@ -124,7 +116,7 @@ static gboolean bus_watch_handler(GstBus *bus, GstMessage *msg, gpointer data) gst_message_parse_tag(msg, &tag_list); if (gst_tag_list_get_string(tag_list, GST_TAG_TITLE, &title)) { - DEBUG_NOTICE("Title: %s\n", title); + info("gst: title: %s\n", title); g_free(title); } break; @@ -151,18 +143,18 @@ static void format_check(struct ausrc_st *st, GstStructure *s) gst_structure_get_boolean(s, "signed", &sign); if ((int)st->prm.srate != rate) { - DEBUG_WARNING("expected %u Hz (got %u Hz)\n", st->prm.srate, - rate); + warning("gst: expected %u Hz (got %u Hz)\n", st->prm.srate, + rate); } if (st->prm.ch != channels) { - DEBUG_WARNING("expected %d channels (got %d)\n", - st->prm.ch, channels); + warning("gst: expected %d channels (got %d)\n", + st->prm.ch, channels); } if (16 != width) { - DEBUG_WARNING("expected 16-bit width (got %d)\n", width); + warning("gst: expected 16-bit width (got %d)\n", width); } if (!sign) { - DEBUG_WARNING("expected signed 16-bit format\n"); + warning("gst: expected signed 16-bit format\n"); } } @@ -196,7 +188,7 @@ static void packet_handler(struct ausrc_st *st, GstBuffer *buffer) err = aubuf_write(st->aubuf, GST_BUFFER_DATA(buffer), GST_BUFFER_SIZE(buffer)); if (err) { - DEBUG_WARNING("aubuf_write: %m\n", err); + warning("gst: aubuf_write: %m\n", err); } /* Empty buffer now */ @@ -275,7 +267,7 @@ static int gst_setup(struct ausrc_st *st) st->pipeline = gst_pipeline_new("pipeline"); if (!st->pipeline) { - DEBUG_WARNING("failed to create pipeline element\n"); + warning("gst: failed to create pipeline element\n"); return ENOMEM; } @@ -283,7 +275,7 @@ static int gst_setup(struct ausrc_st *st) st->source = gst_element_factory_make("playbin", "source"); if (!st->source) { - DEBUG_WARNING("failed to create playbin source element\n"); + warning("gst: failed to create playbin source element\n"); return ENOMEM; } @@ -293,7 +285,7 @@ static int gst_setup(struct ausrc_st *st) st->capsfilt = gst_element_factory_make("capsfilter", NULL); if (!st->capsfilt) { - DEBUG_WARNING("failed to create capsfilter element\n"); + warning("gst: failed to create capsfilter element\n"); return ENOMEM; } @@ -301,7 +293,7 @@ static int gst_setup(struct ausrc_st *st) st->sink = gst_element_factory_make("fakesink", "sink"); if (!st->sink) { - DEBUG_WARNING("failed to create sink element\n"); + warning("gst: failed to create sink element\n"); return ENOMEM; } @@ -422,7 +414,7 @@ static int mod_gst_init(void) s = gst_version_string(); - DEBUG_NOTICE("init: %s\n", s); + info("gst: init: %s\n", s); g_free(s); |