[gstreamer-bugs] [Bug 405072] New: [API] add gst_tag_freeform_string_to_utf8()

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Feb 6 10:25:44 PST 2007


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=405072

  GStreamer | gst-plugins-base | Ver: HEAD CVS

           Summary: [API] add gst_tag_freeform_string_to_utf8()
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: t.i.m at zen.co.uk
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


I think it might be useful to add a function that takes a "freeform" string (=
ASCII, UTF-8 or of unknown 1-byte character encoding like ISO-8859-*) and tries
to convert it to UTF-8.

A possible use would then look like this:

static void
gst_tag_extract_id3v1_string (GstTagList * list, const gchar * tag,
    const gchar * start, const guint size)
{
  const gchar *env_vars[] = { "GST_ID3V1_TAG_ENCODING",
      "GST_ID3_TAG_ENCODING", "GST_TAG_ENCODING", NULL };
  gchar *utf8;

  utf8 = gst_tag_freeform_string_to_utf8 (start, size, env_vars);

  if (utf8 && *utf8 != '\0') {
    gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, tag, utf8, NULL);
  }

  g_free (utf8);
}

We have a few plugins where this could be useful, e.g. icydemux (where you
can't override the encoding used yet via environment variables).


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email




More information about the Gstreamer-bugs mailing list