[Mplayer-cvslog] CVS: main find_sub.c,1.6,1.7 mp_msg.h,1.18,1.19 mplayer.c,1.468,1.469 spudec.c,1.23,1.24 spudec.h,1.9,1.10
Arpi of Ize
arpi at mplayer.dev.hu
Mon Apr 15 21:17:14 CEST 2002
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv23987
Modified Files:
find_sub.c mp_msg.h mplayer.c spudec.c spudec.h
Log Message:
new osd code, use osd objs to follow changes and do minimal updates
Index: find_sub.c
===================================================================
RCS file: /cvsroot/mplayer/main/find_sub.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- find_sub.c 22 Feb 2002 15:25:11 -0000 1.6
+++ find_sub.c 15 Apr 2002 19:17:12 -0000 1.7
@@ -36,7 +36,7 @@
// sub changed!
/* Tell the OSD subsystem that the OSD contents will change soon */
- vo_osd_changed(1);
+ vo_osd_changed(OSDTYPE_SUBTITLE);
if(key<=0){
vo_sub=NULL; // no sub here
Index: mp_msg.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- mp_msg.h 6 Apr 2002 22:00:27 -0000 1.18
+++ mp_msg.h 15 Apr 2002 19:17:12 -0000 1.19
@@ -68,6 +68,8 @@
#define MSGT_VFILTER 29
+#define MSGT_OSD 30
+
#define MSGT_MAX 64
void mp_msg_init();
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.468
retrieving revision 1.469
diff -u -r1.468 -r1.469
--- mplayer.c 15 Apr 2002 01:50:00 -0000 1.468
+++ mplayer.c 15 Apr 2002 19:17:12 -0000 1.469
@@ -669,6 +669,8 @@
}
#endif
+ vo_init_osd();
+
#if defined(HAVE_LIRC) && ! defined(HAVE_NEW_INPUT)
lirc_mp_setup();
inited_flags|=INITED_LIRC;
@@ -1798,7 +1800,9 @@
#ifdef USE_OSD
if(osd_visible){
- if (!--osd_visible){ vo_osd_progbar_type=-1; // disable
+ if (!--osd_visible){
+ vo_osd_progbar_type=-1; // disable
+ vo_osd_changed(OSDTYPE_PROGBAR);
if (osd_function != OSD_PAUSE)
osd_function = OSD_PLAY;
}
@@ -2038,6 +2042,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_VOLUME;
vo_osd_progbar_value=(mixer_getbothvolume()*256.0)/100.0;
+ vo_osd_changed(OSDTYPE_PROGBAR);
//printf("volume: %d\n",vo_osd_progbar_value);
}
#endif
@@ -2086,6 +2091,7 @@
vo_osd_progbar_type=OSD_CONTRAST;
vo_osd_progbar_value=((v_cont)<<8)/100;
if(v_hw_equ_cap) vo_osd_progbar_value = ((v_cont+100)<<8)/200;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2114,6 +2120,7 @@
vo_osd_progbar_type=OSD_BRIGHTNESS;
vo_osd_progbar_value=((v_bright)<<8)/100;
if(v_hw_equ_cap) vo_osd_progbar_value = ((v_bright+100)<<8)/200;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2142,6 +2149,7 @@
vo_osd_progbar_type=OSD_HUE;
vo_osd_progbar_value=((v_hue)<<8)/100;
if(v_hw_equ_cap) vo_osd_progbar_value = ((v_hue+100)<<8)/200;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2170,6 +2178,7 @@
vo_osd_progbar_type=OSD_SATURATION;
vo_osd_progbar_value=((v_saturation)<<8)/100;
if(v_hw_equ_cap) vo_osd_progbar_value = ((v_saturation+100)<<8)/200;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2302,6 +2311,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_VOLUME;
vo_osd_progbar_value=(mixer_getbothvolume()*256.0)/100.0;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
} break;
@@ -2322,6 +2332,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_CONTRAST;
vo_osd_progbar_value=((v_cont)<<8)/100;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2344,6 +2355,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_BRIGHTNESS;
vo_osd_progbar_value=((v_bright)<<8)/100;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2366,6 +2378,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_HUE;
vo_osd_progbar_value=((v_hue)<<8)/100;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2388,6 +2401,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_SATURATION;
vo_osd_progbar_value=((v_saturation)<<8)/100;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2701,6 +2715,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=0;
vo_osd_progbar_value=(demuxer->filepos-demuxer->movi_start)/len;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
}
#endif
@@ -2745,6 +2760,7 @@
osd_visible=sh_video->fps; // 1 sec
vo_osd_progbar_type=OSD_VOLUME;
vo_osd_progbar_value=( ( guiIntfStruct.Volume ) * 256.0 ) / 100.0;
+ vo_osd_changed(OSDTYPE_PROGBAR);
}
#endif
}
@@ -2787,12 +2803,12 @@
if(strcmp(vo_osd_text, osd_text_tmp)) {
strcpy(vo_osd_text, osd_text_tmp);
- vo_osd_changed(1);
+ vo_osd_changed(OSDTYPE_OSD);
}
} else {
if(vo_osd_text) {
vo_osd_text=NULL;
- vo_osd_changed(1);
+ vo_osd_changed(OSDTYPE_OSD);
}
}
// for(i=1;i<=11;i++) osd_text_buffer[10+i]=i;osd_text_buffer[10+i]=0;
@@ -2821,7 +2837,7 @@
vobsub_process(vo_vobsub,d_video->pts+sub_delay);
/* Don't know how to detect wether the sub has changed or not */
- vo_osd_changed(1);
+ vo_osd_changed(OSDTYPE_VOBSUB);
current_module=NULL;
}
@@ -2846,7 +2862,7 @@
spudec_heartbeat(vo_spudec,90000*d_video->pts);
/* Don't know how to detect wether the sub has changed or not */
- vo_osd_changed(1);
+ vo_osd_changed(OSDTYPE_SPU);
current_module=NULL;
}
Index: spudec.c
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- spudec.c 4 Apr 2002 14:24:11 -0000 1.23
+++ spudec.c 15 Apr 2002 19:17:12 -0000 1.24
@@ -368,6 +368,13 @@
((spudec_handle_t *)this)->now_pts = pts100;
}
+int spudec_visible(void *this){
+ spudec_handle_t *spu = (spudec_handle_t *)this;
+ int ret=(spu->start_pts <= spu->now_pts && spu->now_pts < spu->end_pts);
+// printf("spu visible: %d \n",ret);
+ return ret;
+}
+
void spudec_draw(void *this, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride))
{
spudec_handle_t *spu = (spudec_handle_t *)this;
Index: spudec.h
===================================================================
RCS file: /cvsroot/mplayer/main/spudec.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- spudec.h 3 Apr 2002 18:14:21 -0000 1.9
+++ spudec.h 15 Apr 2002 19:17:12 -0000 1.10
@@ -10,6 +10,7 @@
void *spudec_new(unsigned int *palette);
void spudec_free(void *this);
void spudec_reset(void *this); // called after seek
+int spudec_visible(void *this); // check if spu is visible
#endif
More information about the MPlayer-cvslog
mailing list