From: Miguel F. <mig...@us...> - 2001-12-13 22:47:17
|
Update of /cvsroot/xine/xine-lib/src/xine-engine In directory usw-pr-cvs1:/tmp/cvs-serv23614/src/xine-engine Modified Files: xine.c xine_internal.h Log Message: enable/disable osd status Index: xine.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/xine.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -r1.90 -r1.91 --- xine.c 2001/12/13 18:32:16 1.90 +++ xine.c 2001/12/13 22:47:14 1.91 @@ -95,20 +95,30 @@ uint32_t seconds; char tstr[256]; - this->osd_renderer->filled_rect (this->osd, 0, 0, 299, 99, 0); - this->osd_renderer->render_text (this->osd, 0, 5, str); - - seconds = this->cur_input_time; - - sprintf (tstr, "%02d:%02d:%02d", - seconds / (60 * 60), - (seconds % (60*60)) / 60, - seconds % 60); + if( this->osd_display ) { + + this->osd_renderer->filled_rect (this->osd, 0, 0, 299, 99, 0); + this->osd_renderer->render_text (this->osd, 0, 5, str); + + seconds = this->cur_input_time; + + sprintf (tstr, "%02d:%02d:%02d", + seconds / (60 * 60), + (seconds % (60*60)) / 60, + seconds % 60); + + this->osd_renderer->render_text (this->osd, 70, 5, tstr); - this->osd_renderer->render_text (this->osd, 70, 5, tstr); + this->osd_renderer->show (this->osd, start_time); + this->osd_renderer->hide (this->osd, start_time+duration); + } +} - this->osd_renderer->show (this->osd, start_time); - this->osd_renderer->hide (this->osd, start_time+duration); +static void update_osd_display(void *this_gen, cfg_entry_t *entry) +{ + xine_t *this = (xine_t *) this_gen; + + this->osd_display = entry->num_value; } void xine_stop_internal (xine_t *this) { @@ -485,6 +495,10 @@ this->osd_renderer->set_text_palette (this->osd, TEXTPALETTE_WHITE_BLACK_TRANSPARENT ); this->osd_renderer->set_position (this->osd, 10,10); + this->osd_display = config->register_bool(config, "misc.osd_display", 1, + "Show status on play, pause, ff, ...", NULL, + update_osd_display, this ); + if(ao) this->audio_out = ao_new_instance (ao, this->metronom, config); Index: xine_internal.h =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/xine_internal.h,v retrieving revision 1.64 retrieving revision 1.65 diff -u -r1.64 -r1.65 --- xine_internal.h 2001/12/13 00:52:01 1.64 +++ xine_internal.h 2001/12/13 22:47:14 1.65 @@ -195,6 +195,7 @@ osd_renderer_t *osd_renderer; osd_object_t *osd; + int osd_display; ao_instance_t *audio_out; fifo_buffer_t *audio_fifo; |