summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--configure.ac4
-rw-r--r--gst/icydemux/gsticydemux.c80
3 files changed, 13 insertions, 80 deletions
diff --git a/ChangeLog b/ChangeLog
index 84ae7d65..b694b988 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-06-05 Tim-Philipp Müller <tim at centricular dot net>
+
+ * configure.ac:
+ Bump requirements to released versions (core and base 0.10.13).
+
+ * gst/icydemux/gsticydemux.c: (gst_icydemux_unicodify):
+ Use gst_tag_utf8_from_freeform_string() from libgsttag instead of
+ own implementation.
+
2007-06-05 Andy Wingo <wingo@pobox.com>
* sys/v4l2/gstv4l2src.c (gst_v4l2src_start, gst_v4l2src_stop): Add
diff --git a/configure.ac b/configure.ac
index e4294372..74d913f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,8 +46,8 @@ dnl AS_LIBTOOL_TAGS
AM_PROG_LIBTOOL
dnl *** required versions of GStreamer stuff ***
-GST_REQ=0.10.11.1
-GSTPB_REQ=0.10.12.1
+GST_REQ=0.10.13
+GSTPB_REQ=0.10.13
dnl *** autotools stuff ****
diff --git a/gst/icydemux/gsticydemux.c b/gst/icydemux/gsticydemux.c
index 971d0e72..d99b29f9 100644
--- a/gst/icydemux/gsticydemux.c
+++ b/gst/icydemux/gsticydemux.c
@@ -48,6 +48,7 @@
#endif
#include <gst/gst.h>
#include <gst/gst-i18n-plugin.h>
+#include <gst/tag/tag.h>
#include "gsticydemux.h"
@@ -291,83 +292,6 @@ gst_icydemux_remove_srcpad (GstICYDemux * icydemux)
return res;
};
-/* FIXME: remove this once we depend on gst-plugins-base >= 0.10.12.1 */
-static gchar *
-notgst_tag_freeform_string_to_utf8 (const gchar * data, gint size,
- const gchar ** env_vars)
-{
- const gchar *cur_loc = NULL;
- gsize bytes_read;
- gchar *utf8 = NULL;
-
- g_return_val_if_fail (data != NULL, NULL);
-
- if (size < 0)
- size = strlen (data);
-
- /* Should we try the charsets specified
- * via environment variables FIRST ? */
- if (g_utf8_validate (data, size, NULL))
- return g_strndup (data, size);
-
- while (env_vars != NULL && *env_vars != NULL) {
- const gchar *env = NULL;
-
- /* Try charsets specified via the environment */
- env = g_getenv (*env_vars);
- if (env != NULL && *env != '\0') {
- gchar **c, **csets;
-
- csets = g_strsplit (env, G_SEARCHPATH_SEPARATOR_S, -1);
-
- for (c = csets; c && *c; ++c) {
- if ((utf8 =
- g_convert (data, size, "UTF-8", *c, &bytes_read, NULL, NULL))) {
- if (bytes_read == size) {
- g_strfreev (csets);
- goto beach;
- }
- g_free (utf8);
- utf8 = NULL;
- }
- }
-
- g_strfreev (csets);
- }
-
- ++env_vars;
- }
-
- /* Try current locale (if not UTF-8) */
- if (!g_get_charset (&cur_loc)) {
- if ((utf8 = g_locale_to_utf8 (data, size, &bytes_read, NULL, NULL))) {
- if (bytes_read == size) {
- goto beach;
- }
- g_free (utf8);
- utf8 = NULL;
- }
- }
-
- /* Try ISO-8859-1 */
- utf8 = g_convert (data, size, "UTF-8", "ISO-8859-1", &bytes_read, NULL, NULL);
- if (utf8 != NULL && bytes_read == size) {
- goto beach;
- }
-
- g_free (utf8);
- return NULL;
-
-beach:
-
- g_strchomp (utf8);
- if (utf8 && utf8[0] != '\0')
- return utf8;
-
- g_free (utf8);
- return NULL;
-}
-
static gchar *
gst_icydemux_unicodify (const gchar * str)
{
@@ -375,7 +299,7 @@ gst_icydemux_unicodify (const gchar * str)
"GST_TAG_ENCODING", NULL
};
- return notgst_tag_freeform_string_to_utf8 (str, -1, env_vars);
+ return gst_tag_freeform_string_to_utf8 (str, -1, env_vars);
}
static void