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 339405 - [textoverlay] can't display '\n' character
[textoverlay] can't display '\n' character
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.5
Other All
: High normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-22 14:46 UTC by Young-Ho Cha
Modified: 2006-04-28 13:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
can display '\n' and align center (914 bytes, patch)
2006-04-22 16:24 UTC, Young-Ho Cha
committed Details | Review

Description Young-Ho Cha 2006-04-22 14:46:55 UTC
Please describe the problem:
pango text overlay plugin can't display '\n' character.

subparse plugin can produce '\n', but pango plugin replace '\n' to space
character. so it can't display.


Steps to reproduce:
1. play a video file with subtitle
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
yes

Other information:
gst_text_overlay_render_text() at ext/pango/gsttextoverlay.c:953 replace '\n',
'\r' and '\t' characters to ' ' character like this.

g_strdelimit (string, "\n\r\t", ' ');

it need to change to 

g_strdelimit (string, "\r\t", ' ');
Comment 1 Young-Ho Cha 2006-04-22 16:20:27 UTC
Actual results:
http://ftp.mizi.com/~ganadist/totem_cant_render_cr.png

Expected results:
http://ftp.mizi.com/~ganadist/totem_render_cr.png

finally, when render multiline text, if render with center align, it looks better.

http://ftp.mizi.com/~ganadist/totem_aligned_center.png

Comment 2 Young-Ho Cha 2006-04-22 16:24:11 UTC
Created attachment 64109 [details] [review]
can display '\n' and align center
Comment 3 Tim-Philipp Müller 2006-04-25 15:01:31 UTC
Indeed, I don't really know why '\n' is in the list of characters to be replaced. Don't think that was on purpose. Will commit when -base is unfrozen again (ie. after the release). Center alignment for paragraphs with multiple lines of text seems fine as well.

Comment 4 Tim-Philipp Müller 2006-04-28 13:35:58 UTC
Committed, thanks for the patch:

 2006-04-28  Tim-Philipp Müller  <tim at centricular dot net>

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

        * ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
        (gst_text_overlay_render_text):
          Don't strip newlines from the text. Also, center lines
          within multi-line paragraphs (#339405).