summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-03-30 03:01:50 +0000
committerarpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-03-30 03:01:50 +0000
commit744b828d4f00d95ce6707c1ddd060821769ff5a4 (patch)
tree73f77cdd142622730d359c87fc8a83de679f61fa
parent3c41911ee444c58ef8b2672cad21085405fed403 (diff)
downloadmpv-744b828d4f00d95ce6707c1ddd060821769ff5a4.tar.bz2
mpv-744b828d4f00d95ce6707c1ddd060821769ff5a4.tar.xz
use subreader's sub struct
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@255 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/sub.c12
-rw-r--r--libvo/sub.h3
2 files changed, 7 insertions, 8 deletions
diff --git a/libvo/sub.c b/libvo/sub.c
index 7f40f2816d..ba7dfbf97c 100644
--- a/libvo/sub.c
+++ b/libvo/sub.c
@@ -1,4 +1,5 @@
+#include "subreader.h"
#include "sub.h"
//static int vo_font_loaded=-1;
@@ -89,17 +90,16 @@ void vo_draw_text_progbar(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int
}
-int vo_sub_lines=2;
-unsigned char* vo_sub_text[8];
+subtitle* vo_sub=NULL;
void vo_draw_text_sub(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)){
int i;
int y;
- y=dys-(1+vo_sub_lines)*vo_font->height;
+ y=dys-(1+vo_sub->lines)*vo_font->height;
- for(i=0;i<vo_sub_lines;i++){
- unsigned char* text="Hello World! HÛDEJÓ!"; //vo_sub_text[i];
+ for(i=0;i<vo_sub->lines;i++){
+ unsigned char* text=vo_sub->text[i];// "Hello World! HÛDEJÓ!";
int len=strlen(text);
int j;
int xsize=-vo_font->charspace;
@@ -144,7 +144,7 @@ void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h,
vo_draw_text_osd(dxs,dys,draw_alpha);
}
- if(vo_sub_lines>0){
+ if(vo_sub){
vo_draw_text_sub(dxs,dys,draw_alpha);
}
diff --git a/libvo/sub.h b/libvo/sub.h
index e464b11efc..8ab0dcf000 100644
--- a/libvo/sub.h
+++ b/libvo/sub.h
@@ -6,8 +6,7 @@ extern unsigned char* vo_osd_text;
extern int vo_osd_progbar_type;
extern int vo_osd_progbar_value; // 0..255
-extern int vo_sub_lines;
-extern unsigned char* vo_sub_text[8];
+extern subtitle* vo_sub;
#define OSD_PLAY 0x01
#define OSD_PAUSE 0x02