From 9e873a3c830b9d564fefd421db3c4bb1a74f0c45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 25 Apr 2007 08:54:34 +0000 Subject: [PATCH] When posting a warning message because samples were dropped, post something more intelligible than he default error m... 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 | 9 +++++++++ gst-libs/gst/audio/gstbaseaudiosrc.c | 23 ++++++++++++++++++++--- po/POTFILES.in | 1 + 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0bbbff74a9..526ce8e4c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-04-25 Tim-Philipp Müller + + * 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 * gst-libs/gst/rtp/gstrtcpbuffer.c: (gst_rtcp_buffer_new), diff --git a/gst-libs/gst/audio/gstbaseaudiosrc.c b/gst-libs/gst/audio/gstbaseaudiosrc.c index a798e36f96..377728e942 100644 --- a/gst-libs/gst/audio/gstbaseaudiosrc.c +++ b/gst-libs/gst/audio/gstbaseaudiosrc.c @@ -32,10 +32,16 @@ * Last reviewed on 2006-09-27 (0.10.12) */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include #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); } diff --git a/po/POTFILES.in b/po/POTFILES.in index 7312135839..e6f155be7f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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