Mercurial > mplayer.hg
annotate Gui/skin/font.h @ 11350:007ec48cf146
Current mplayer (mine is mplayer-1.0-pre1cvs20031001) cannot play mms
stream with multibyte characters in the url.
There is a bug in string_utf16() of libmpdemux/asf_mmst_streaming.c:
the url encoding code is written for single-byte character only. It
just fill a zero byte between every two adjacent bytes of the url
string. This is wrong when the url string contains multi-byte
characters.
My patch is in the attachment, and has been tested working. It uses
iconv() to convert the url's encoding to utf-16 correctly. So can this
patch be accepted and commit into CVS?
patch by Wang WenRui <wangwr@mail.ustc.edu.cn>
author | attila |
---|---|
date | Sat, 01 Nov 2003 14:43:28 +0000 |
parents | b8c271750450 |
children | 0e1471d9da74 |
rev | line source |
---|---|
1693 | 1 |
6218 | 2 #ifndef _FONT_H |
3 #define _FONT_H | |
1693 | 4 |
8058 | 5 #include "../bitmap.h" |
8864 | 6 #include "../app.h" |
7 | |
8 #define fntAlignLeft 0 | |
9 #define fntAlignCenter 1 | |
10 #define fntAlignRight 2 | |
1693 | 11 |
12 typedef struct | |
13 { | |
14 int x,y; // location | |
15 int sx,sy; // size | |
16 } fntChar; | |
17 | |
18 typedef struct | |
19 { | |
20 fntChar Fnt[256]; | |
21 txSample Bitmap; | |
22 char name[128]; | |
23 } bmpFont; | |
24 | |
25 extern txSample Bitmap; | |
6218 | 26 extern bmpFont * Fonts[26]; |
1693 | 27 |
28 extern int fntAddNewFont( char * name ); | |
1829 | 29 extern void fntFreeFont( void ); |
1693 | 30 extern int fntFindID( char * name ); |
6755 | 31 extern int fntTextHeight( int id,char * str ); |
32 extern int fntTextWidth( int id,char * str ); | |
1693 | 33 |
6218 | 34 extern int fntRead( char * path,char * fname ); |
8864 | 35 extern txSample * fntRender( wItem * item,int px,char * fmt,... ); |
1693 | 36 |
2082 | 37 #endif |
38 |