After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 339520 - [subparse] add "encoding" property
[subparse] add "encoding" property
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal enhancement
: 0.10.8
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-24 03:49 UTC by Young-Ho Cha
Modified: 2006-05-17 17:55 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
add encoding property patch (3.90 KB, patch)
2006-04-24 03:50 UTC, Young-Ho Cha
committed Details | Review

Description Young-Ho Cha 2006-04-24 03:49:54 UTC
Currently, subparse plugin use GST_SUBTITLE_ENCODING value for subtitle text charset decoding.

But, I think it is not end-user friendly.

End-user might want to select charset from some combobox or similar UI.

so, I suggest that add encoding property in plugin.
Comment 1 Young-Ho Cha 2006-04-24 03:50:51 UTC
Created attachment 64171 [details] [review]
add encoding property patch
Comment 2 Tim-Philipp Müller 2006-05-17 17:55:05 UTC
Well, I don't really see how a property is more *end-user* friendly, since end-users don't set properties on elements anyway, the application does that (and normally the subparse element is autoplugged by decodebin or playbin anyway, so even the application has a hard time doing this).

Nevertheless, let's add it, since this is the way we do stuff, and also that way it shows up in gst-inspect and in the docs.


Committed with some changes:

 - the first property must have an enum value > 0, that's why there's
   usually an unused PROP_0 enum at the beginning of the properties
   enums list

 - the property should be G_PARAM_READWRITE, not just G_PARAM_WRITABLE
   (and you implement both as well, ie. there is a getter function)

 - used subparse->encoding rather than subparse->default_encoding, since
   it's not really the default, but a fallback in case the text is not
   UTF-8 (also, it's shorter).


 2006-05-17  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Young-Ho Cha  <ganadist chollian net>

        * gst/subparse/gstsubparse.c: (gst_sub_parse_dispose),
        (gst_sub_parse_class_init), (gst_sub_parse_init),
        (gst_sub_parse_set_property), (gst_sub_parse_get_property),
        (convert_encoding):
        * gst/subparse/gstsubparse.h:
          Add 'encoding' property (#341681).

        * gst/subparse/samiparse.c: (characters_sami):
          Output is pango markup, so we need to escape text
          between tags (#342143).