Mercurial > mplayer.hg
comparison mplayer.c @ 17241:3ab613cdf96a
add "pausing_keep" and "pausing_toggle" input cmd prefixes
author | ods15 |
---|---|
date | Sun, 25 Dec 2005 19:22:48 +0000 |
parents | 11459d1ff17c |
children | 400b7cb357a7 |
comparison
equal
deleted
inserted
replaced
17240:11459d1ff17c | 17241:3ab613cdf96a |
---|---|
2446 /*float time_frame_corr_avg=0;*/ /* unused */ | 2446 /*float time_frame_corr_avg=0;*/ /* unused */ |
2447 | 2447 |
2448 float next_frame_time=0; | 2448 float next_frame_time=0; |
2449 int frame_time_remaining=0; // flag | 2449 int frame_time_remaining=0; // flag |
2450 int blit_frame=0; | 2450 int blit_frame=0; |
2451 int was_paused=0; | |
2451 | 2452 |
2452 osd_text_buffer[0]=0; | 2453 osd_text_buffer[0]=0; |
2453 // make sure OSD old does not stay around, | 2454 // make sure OSD old does not stay around, |
2454 // e.g. with -fixed-vo and same-resolution files | 2455 // e.g. with -fixed-vo and same-resolution files |
2455 vo_osd_text = osd_text_buffer; | 2456 vo_osd_text = osd_text_buffer; |
3045 { | 3046 { |
3046 if ( guiIntfStruct.Playing == guiSetStop ) goto goto_next_file; | 3047 if ( guiIntfStruct.Playing == guiSetStop ) goto goto_next_file; |
3047 guiGetEvent( guiCEvent,(char *)guiSetPlay ); | 3048 guiGetEvent( guiCEvent,(char *)guiSetPlay ); |
3048 } | 3049 } |
3049 #endif | 3050 #endif |
3051 was_paused = 1; | |
3050 } | 3052 } |
3051 | 3053 |
3052 // handle -sstep | 3054 // handle -sstep |
3053 if(step_sec>0) { | 3055 if(step_sec>0) { |
3054 osd_function=OSD_FFW; | 3056 osd_function=OSD_FFW; |
4127 else | 4129 else |
4128 #endif | 4130 #endif |
4129 mp_msg(MSGT_CPLAYER, MSGL_V, "Received unknown cmd %s\n",cmd->name); | 4131 mp_msg(MSGT_CPLAYER, MSGL_V, "Received unknown cmd %s\n",cmd->name); |
4130 } | 4132 } |
4131 } | 4133 } |
4132 if (cmd->pausing) | 4134 switch (cmd->pausing) { |
4133 osd_function = OSD_PAUSE; | 4135 case 1: // "pausing" |
4136 osd_function = OSD_PAUSE; | |
4137 break; | |
4138 case 3: // "pausing_toggle" | |
4139 was_paused = !was_paused; | |
4140 // fall through | |
4141 case 2: // "pausing_keep" | |
4142 if (was_paused) osd_function = OSD_PAUSE; | |
4143 } | |
4134 mp_cmd_free(cmd); | 4144 mp_cmd_free(cmd); |
4135 } | 4145 } |
4136 } | 4146 } |
4147 was_paused = 0; | |
4137 | 4148 |
4138 if (seek_to_sec) { | 4149 if (seek_to_sec) { |
4139 int a,b; float d; | 4150 int a,b; float d; |
4140 | 4151 |
4141 if (sscanf(seek_to_sec, "%d:%d:%f", &a,&b,&d)==3) | 4152 if (sscanf(seek_to_sec, "%d:%d:%f", &a,&b,&d)==3) |