summaryrefslogtreecommitdiff
path: root/src/libsputext/xine_sputext_decoder.c
AgeCommit message (Collapse)Author
2008-01-06Constify bits of the OGM subtitle hack. Add a changelog entry.Darren Salt
2008-01-06for resolving Korean subtitle bugDongsu Park
In draw_subtitle(), if the given encoding is one the CJK charset, colored typefaces functionality is disabled and subtitles are printed with the render_text() method. Otherwise subtitles are drawn by ogm_render_line() function.
2007-12-27[Subtitles] SSA-tags patchDubois Nicolas
I watch a lot of movies with subtitles and I need "vobsub subtitles" work in xine, then I decide to write this patch. It may support SSA tags for all text subtiles (ssa, ass, srt, ...) This patch : 1. Remove all SSA tags from stream (they are ugly : {\a6}) 2. Handle some of them (b, i, a, an, pos). The other ones control colours, shadow, animation, ... I can't make them work in an easy way. 3. Correct wrap algorithm which have minors bugs (we can see them only with SSA patch...) Modified files : libsputext/demux_sputext.c just remove unneeded code (which remove some of SSA-tags) libsputext/xine_sputext_decoder.c the main modified file. video_out/video_out_xshm.c video_out/video_out_xv.c xine-engine/video_out.h get video output (position and size). See below. 1. Removing SSA tags is done in ogm_render_line_internal() like for html-like tags. (this was done in the previous version of xine) 2. b(bold) and i(italic) are implemented like html-ones, in ogm_render_line_internal(). The other tags this patch support are : aX : alignment in SSA-code anX : alignment in numpad code pos(X,Y) : position, depend on alignment For those ones, I need in first a full-screen OSD, not a five lines one. Then, I need to remember where the last subtitle was drawn, in order to erase it. At last, I need a translation function to convert subtitle coordinates in screen coordinates. For this last point, I first write a full-screen translation (don't care about blacks borders), but it's not really good: the 'pos' tag is sometime used to point out something in the video. (Moreover, ASS spec say we have to draw subtitle on the video) For doing this, I need the real video output size and position, which are only know by the video output driver! Then I had 4 VO properties (in xine-engine/video_out.h) for video driver could give us those informations. I implement it only in xshm and xv drivers (I can't test other ones). If video driver can't give us those informations, the patch fallback in a full-screen translation. 3. there was 3 problem with the wrap algorithm : 1. It was in double: exactly the same, twice. Look like a merge problem. I remove one and all work fine. 2. It want to cut string in equivalent display length but it cut it in equivalent byte length. In most cases, this is the same, but if we have UTF-8 chars or long SSA-tags (which will not be displayed) the result is strange. 3. If we have a too-long part (in bytes) of the string without spaces (bad subtitle file or long SSA-code), the algorithm don't know what to do. (this case is not handled) I re-write the wrap algorithm to correct those problems. Note that my version is slower than previous one : working with bytes is really faster than computing text-length. Maybe I should had to propose an other patch for this part...
2007-11-10Delete most of the CVS $Id$/$Log$ lines.Darren Salt
--HG-- extra : transplant_source : %E0%D0%C5%8B%BEU%DD%24%5D7%1F%ADV%AD%EB%23%CBU%80%EB
2007-11-09Update FSF address on non-contributed code and COPYING files.Diego 'Flameeyes' Pettenò
For contributed code, leave whatever the version we last synced for is using to make simpler future syncs.
2007-10-21small bugfix: make sure width/height are known before trying to use them ↵"Miguel Freitas ext:(%22)
(wait the main stream to fully initialize) prevents division by zero in draw_subtitle().
2007-08-19Merge and clean up ogm_get_width & ogm_render_line; fix strncmp() length params.Darren Salt
2007-08-18libsputext colored typefaces patchChristophe Thommeret
Le dimanche 24 décembre 2006 13:38, Miguel Freitas a écrit: > Hi Christophe, > > On 12/8/06, Christophe Thommeret <hftom@free.fr> wrote: > > Here is a patch that makes use of different colors for typeface tags. > > It uses yellow for italics and red for bold. > > this is an interesting idea and i agree it is probably better to use > the "ogm" rendering functions for other formats as well. > > however i have one problem with this change: it will override user's > selection of "ui.osd.text_palette". > > how can we implement this without losing ability to select font color? > > Miguel Well, seems i've forgot this one ;) This new patch honors ui.osd.text_palette
2007-04-04Rename xine_decoder.c to xine_sputext_decoder.c.Diego 'Flameeyes' Pettenò
Use xineplug_LTLIBRARIES. --HG-- rename : src/libsputext/xine_decoder.c => src/libsputext/xine_sputext_decoder.c