comparison mplayer.c @ 17938:810b407ba6c4

Get rid of 2 osd related hacks.
author albeu
date Fri, 24 Mar 2006 20:42:23 +0000
parents d72e7330c548
children 392c7c1b8ccc
comparison
equal deleted inserted replaced
17937:ec6781a09b3a 17938:810b407ba6c4
344 #define SUB_SOURCE_SUBS 0 344 #define SUB_SOURCE_SUBS 0
345 #define SUB_SOURCE_VOBSUB 1 345 #define SUB_SOURCE_VOBSUB 1
346 #define SUB_SOURCE_DEMUX 2 346 #define SUB_SOURCE_DEMUX 2
347 #define SUB_SOURCES 3 347 #define SUB_SOURCES 3
348 int global_sub_indices[SUB_SOURCES]; 348 int global_sub_indices[SUB_SOURCES];
349 int global_sub_quiet_osd_hack = 0;
350 349
351 extern int mp_msg_levels[MSGT_MAX]; 350 extern int mp_msg_levels[MSGT_MAX];
352 extern int mp_msg_level_all; 351 extern int mp_msg_level_all;
353 352
354 static stream_t* stream=NULL; 353 static stream_t* stream=NULL;
1134 if(last) 1133 if(last)
1135 last->prev = msg->prev; 1134 last->prev = msg->prev;
1136 else 1135 else
1137 osd_msg_stack = msg->prev; 1136 osd_msg_stack = msg->prev;
1138 free(msg); 1137 free(msg);
1138 }
1139
1140 /**
1141 * \brief Remove all messages from the OSD stack
1142 *
1143 */
1144
1145 static void clear_osd_msgs(void) {
1146 mp_osd_msg_t* msg = osd_msg_stack, *prev = NULL;
1147 while(msg) {
1148 prev = msg->prev;
1149 free(msg);
1150 msg = prev;
1151 }
1152 osd_msg_stack = NULL;
1139 } 1153 }
1140 1154
1141 /** 1155 /**
1142 * \brief Get the current message fron the OSD stack 1156 * \brief Get the current message fron the OSD stack
1143 * 1157 *
2544 play_next_file: 2558 play_next_file:
2545 2559
2546 // init global sub numbers 2560 // init global sub numbers
2547 global_sub_size = 0; 2561 global_sub_size = 0;
2548 { int i; for (i = 0; i < SUB_SOURCES; i++) global_sub_indices[i] = -1; } 2562 { int i; for (i = 0; i < SUB_SOURCES; i++) global_sub_indices[i] = -1; }
2549 global_sub_quiet_osd_hack = 1;
2550 2563
2551 if (filename) load_per_file_config (mconfig, filename); 2564 if (filename) load_per_file_config (mconfig, filename);
2552 2565
2553 // We must enable getch2 here to be able to interrupt network connection 2566 // We must enable getch2 here to be able to interrupt network connection
2554 // or cache filling 2567 // or cache filling
3290 //int frame_corr_num=0; // 3303 //int frame_corr_num=0; //
3291 //float v_frame=0; // Video 3304 //float v_frame=0; // Video
3292 float time_frame=0; // Timer 3305 float time_frame=0; // Timer
3293 //float num_frames=0; // number of frames played 3306 //float num_frames=0; // number of frames played
3294 int grab_frames=0; 3307 int grab_frames=0;
3295 char osd_text_buffer[64];
3296 int drop_frame=0; // current dropping status 3308 int drop_frame=0; // current dropping status
3297 int dropped_frames=0; // how many frames dropped since last non-dropped frame 3309 int dropped_frames=0; // how many frames dropped since last non-dropped frame
3298 int too_slow_frame_cnt=0; 3310 int too_slow_frame_cnt=0;
3299 int too_fast_frame_cnt=0; 3311 int too_fast_frame_cnt=0;
3300 // for auto-quality: 3312 // for auto-quality:
3306 float next_frame_time=0; 3318 float next_frame_time=0;
3307 int frame_time_remaining=0; // flag 3319 int frame_time_remaining=0; // flag
3308 int blit_frame=0; 3320 int blit_frame=0;
3309 int was_paused=0; 3321 int was_paused=0;
3310 3322
3311 osd_text_buffer[0]=0;
3312 // make sure OSD old does not stay around, 3323 // make sure OSD old does not stay around,
3313 // e.g. with -fixed-vo and same-resolution files 3324 // e.g. with -fixed-vo and same-resolution files
3314 vo_osd_text = osd_text_buffer; 3325 clear_osd_msgs();
3315 vo_osd_changed(OSDTYPE_OSD); 3326 update_osd_msg();
3316 3327
3317 //================ SETUP AUDIO ========================== 3328 //================ SETUP AUDIO ==========================
3318 3329
3319 if(sh_audio){ 3330 if(sh_audio){
3320 //const ao_info_t *info=audio_out->info; 3331 //const ao_info_t *info=audio_out->info;