When posting a warning message because samples were dropped, post something more...
authorTim-Philipp Müller <tim@centricular.net>
Wed, 25 Apr 2007 08:54:34 +0000 (08:54 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Wed, 25 Apr 2007 08:54:34 +0000 (08:54 +0000)
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosrc.c: (_do_init),
(gst_base_audio_src_create):
* po/POTFILES.in:
When posting a warning message because samples were dropped, post
something more intelligible than he default error message for clock
errors which is just confusing in this context (#432984).

ChangeLog
gst-libs/gst/audio/gstbaseaudiosrc.c
po/POTFILES.in

index 0bbbff7..526ce8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-25  Tim-Philipp Müller  <tim at centricular dot net>
+
+       * gst-libs/gst/audio/gstbaseaudiosrc.c: (_do_init),
+       (gst_base_audio_src_create):
+       * po/POTFILES.in:
+         When posting a warning message because samples were dropped, post
+         something more intelligible than he default error message for clock
+         errors which is just confusing in this context (#432984).
+
 2007-04-25  Wim Taymans  <wim@fluendo.com>
 
        * gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_buffer_new),
index a798e36..377728e 100644 (file)
  * Last reviewed on 2006-09-27 (0.10.12)
  */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <string.h>
 
 #include "gstbaseaudiosrc.h"
 
+#include "gst/gst-i18n-plugin.h"
+
 GST_DEBUG_CATEGORY_STATIC (gst_base_audio_src_debug);
 #define GST_CAT_DEFAULT gst_base_audio_src_debug
 
@@ -56,8 +62,18 @@ enum
   PROP_LATENCY_TIME,
 };
 
-#define _do_init(bla) \
-    GST_DEBUG_CATEGORY_INIT (gst_base_audio_src_debug, "baseaudiosrc", 0, "baseaudiosrc element");
+static void
+_do_init (GType type)
+{
+  GST_DEBUG_CATEGORY_INIT (gst_base_audio_src_debug, "baseaudiosrc", 0,
+      "baseaudiosrc element");
+
+#ifdef ENABLE_NLS
+  GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
+      LOCALEDIR);
+  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif /* ENABLE_NLS */
+}
 
 GST_BOILERPLATE_FULL (GstBaseAudioSrc, gst_base_audio_src, GstPushSrc,
     GST_TYPE_PUSH_SRC, _do_init);
@@ -579,7 +595,8 @@ gst_base_audio_src_create (GstBaseSrc * bsrc, guint64 offset, guint length,
     GST_WARNING_OBJECT (src,
         "create DISCONT of %" G_GUINT64_FORMAT " samples at sample %"
         G_GUINT64_FORMAT, sample - src->next_sample, sample);
-    GST_ELEMENT_WARNING (src, CORE, CLOCK, (NULL),
+    GST_ELEMENT_WARNING (src, CORE, CLOCK,
+        (_("Can't record audio fast enough")),
         ("dropped %" G_GUINT64_FORMAT " samples", sample - src->next_sample));
     GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT);
   }
index 7312135..e6f155b 100644 (file)
@@ -10,6 +10,7 @@ gst/playback/gstplaybin.c
 gst/tcp/gsttcp.c
 gst/tcp/gsttcpclientsink.c
 gst/tcp/gsttcpclientsrc.c
+gst-libs/gst/audio/gstbaseaudiosrc.c
 gst-libs/gst/tag/tags.c
 gst-libs/gst/cdda/gstcddabasesrc.c
 gst-libs/gst/pbutils/descriptions.c