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 342235 - add subtitle encoding in preference
add subtitle encoding in preference
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on: 342268
Blocks:
 
 
Reported: 2006-05-18 11:25 UTC by Young-Ho Cha
Modified: 2006-06-17 13:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
add subtitle encoding change api in bacon video widget (2.66 KB, patch)
2006-05-20 11:29 UTC, Young-Ho Cha
committed Details | Review
add encoding combobox in preference (glade) (8.62 KB, patch)
2006-05-20 14:55 UTC, Young-Ho Cha
none Details | Review
add subtitle encoding menu in preference (17.96 KB, patch)
2006-05-20 14:59 UTC, Young-Ho Cha
none Details | Review
add subtitle encoding menu in preference (17.88 KB, patch)
2006-05-21 00:15 UTC, Young-Ho Cha
none Details | Review
add subtitle encoding menu in preference (gconf schemas) (876 bytes, patch)
2006-05-21 00:17 UTC, Young-Ho Cha
committed Details | Review
add subtitle encoding menu in preference (glade) (4.29 KB, patch)
2006-05-21 01:15 UTC, Young-Ho Cha
committed Details | Review
add subtitle encoding menu in preference (18.86 KB, patch)
2006-05-25 11:41 UTC, Young-Ho Cha
none Details | Review
add subtitle encoding menu in preference (19.85 KB, patch)
2006-06-10 03:15 UTC, Young-Ho Cha
committed Details | Review

Description Young-Ho Cha 2006-05-18 11:25:23 UTC
many subtitle format has no charset encoding information.

so, totem shows broken subtitle.

if there is some menu for subtitle encoding, this problem will be resolved.

More info:

In xine-lib, it can load subtitle encoding value ("subtitles.separate.src_encoding") via xine_config_lookup_entry() and can update via xine_config_update_entry().

and in gstreamer HEAD, it can change "encoding" property in subparse plugin. (bug 339520)
Comment 1 Young-Ho Cha 2006-05-18 15:17:23 UTC
I found gstreamer backend use playbin plugin, not subparse.

so, it can be resolved after add property in playbin plugin.

add depend bug 342268.
Comment 2 Young-Ho Cha 2006-05-20 11:29:24 UTC
Created attachment 65891 [details] [review]
add subtitle encoding change api in bacon video widget

add subtitle encoding change api in bacon video widget for gstreamer 0.10 and xine
Comment 3 Young-Ho Cha 2006-05-20 14:55:57 UTC
Created attachment 65900 [details] [review]
add encoding combobox in preference (glade)

this is data/totem.glade patch for add subtitle encoding select ui
Comment 4 Young-Ho Cha 2006-05-20 14:59:05 UTC
Created attachment 65901 [details] [review]
add subtitle encoding menu in preference

this is patch for subtitle encoding behavior.

encoding list is copied from gnome-terminal :)
Comment 5 Bastien Nocera 2006-05-20 16:10:16 UTC
This looks good although:
- we need the GStreamer patch to be merged before we can commit this
- I'd rather the encoding.[ch] files be called totem-encoding.[ch], and that they be copied directly from gnome-terminal CVS (like the bacon-message-connection.[ch] and libegg files), to avoid having too much copied code.
Comment 6 Young-Ho Cha 2006-05-21 00:15:27 UTC
Created attachment 65922 [details] [review]
add subtitle encoding menu in preference

rename encoding.[ch] to totem-encoding.[ch] as Bastien mentioned.
move SubtitleEncoding and SubtitleEncodingIndex definition to totem-encoding.c cause they have no need to export.
use strcasecmp() to compare charset instead of strcmp().
subtitle_encoding_create_store() returns sorted treemodel.
Comment 7 Young-Ho Cha 2006-05-21 00:17:56 UTC
Created attachment 65925 [details] [review]
add subtitle encoding menu in preference (gconf schemas)

this is data/totem.schemas.in patch to adding /schemas/apps/totem/subtitle_encoding key.
and make default key translatable.
Comment 8 Young-Ho Cha 2006-05-21 01:15:21 UTC
Created attachment 65926 [details] [review]
add subtitle encoding menu in preference (glade)

use GtkTable instead of GtkVBox
Comment 9 Young-Ho Cha 2006-05-25 11:41:35 UTC
Created attachment 66180 [details] [review]
add subtitle encoding menu in preference

add missing src/Makefile.am
add missing po/POTFILES.in
in find_encoding_by_charset(), check whether charset is NULL.
Comment 10 Young-Ho Cha 2006-06-10 03:15:54 UTC
Created attachment 67077 [details] [review]
add subtitle encoding menu in preference

Changed combobox model to tree from list for grouping by language.

I think it will be increase usability.
Comment 11 Bastien Nocera 2006-06-17 09:46:47 UTC
Comment on attachment 65891 [details] [review]
add subtitle encoding change api in bacon video widget

Committed with build fixes to the xine-lib backend.

2006-06-17  Bastien Nocera  <hadess@hadess.net>

        * src/backend/bacon-video-widget-gst-0.10.c:
        (bacon_video_widget_set_subtitle_encoding):
        * src/backend/bacon-video-widget-xine.c:
        (bacon_video_widget_set_subtitle_encoding):
        * src/backend/bacon-video-widget.h:
        Patch from Young-Ho Cha <ganadist at chollian net>, to allow
        changing the default encoding for text subtitles
Comment 12 Bastien Nocera 2006-06-17 10:01:59 UTC
Comment on attachment 65926 [details] [review]
add subtitle encoding menu in preference (glade)

I just fixed the spacing in the .glade

2006-06-17  Bastien Nocera  <hadess@hadess.net>

        * data/totem.glade: patch from Young-Ho Cha <ganadist at chollian net>
        to add a widget to select the text subtitles encoding
        * src/backend/bacon-video-widget-xine.c:
        (bacon_video_widget_set_subtitle_encoding):
        really fix build
Comment 13 Bastien Nocera 2006-06-17 10:18:19 UTC
Comment on attachment 65925 [details] [review]
add subtitle encoding menu in preference (gconf schemas)

Committed with a slightly better message for the translators.

2006-06-17  Bastien Nocera  <hadess@hadess.net>

        * data/totem.schemas.in: patch from Young-Ho Cha
        <ganadist at chollian net> to add text subtitles
        encoding selection to GConf
Comment 14 Bastien Nocera 2006-06-17 13:04:03 UTC
A few changes to the patch committed:
- changed the file names from totem-encoding to totem-subtitle-encoding
- namespace the functions properly
- make sure that we set UTF-8 as the encoding if there's no default in GConf
- build and set the combobox in totem-subtitle-encoding

Thanks for your work.

2006-06-17  Bastien Nocera  <hadess@hadess.net>

        * src/Makefile.am:
        * src/backend/bacon-video-widget-xine.c:
        (bacon_video_widget_set_subtitle_encoding):
        lower-case the encoding string, as it's the way xine-lib
        expects it
        * src/totem-preferences.c: (on_encoding_set),
        (encoding_changed_cb), (totem_setup_preferences):
        * src/totem-subtitle-encoding.c: (find_encoding_by_charset),
        (subtitle_encoding_init), (subtitle_encoding_get_index),
        (subtitle_encoding_get_charset), (compare),
        (is_encoding_sensitive), (subtitle_encoding_create_store),
        (subtitle_encoding_combo_render),
        (totem_subtitle_encoding_get_selected),
        (totem_subtitle_encoding_set), (totem_subtitle_encoding_init):
        * src/totem-subtitle-encoding.h:
        * src/totem.c:
        Patch from Young-Ho Cha <ganadist at chollian net> to add
        subtitle selection to the Totem preferences (Closes: #342235)

2006-06-17  Bastien Nocera  <hadess@hadess.net>

        * POTFILES.in: upd