comparison mplayer.c @ 1772:591398376329

stop/pause/seek gui
author arpi
date Thu, 30 Aug 2001 12:47:13 +0000
parents b3f6e2baffbf
children de6a0987a08d
comparison
equal deleted inserted replaced
1771:b3f6e2baffbf 1772:591398376329
1496 video_out->check_events(); 1496 video_out->check_events();
1497 #endif 1497 #endif
1498 #ifdef HAVE_NEW_GUI 1498 #ifdef HAVE_NEW_GUI
1499 if(use_gui){ 1499 if(use_gui){
1500 wsHandleEvents();mplTimerHandler(0); // handle GUI timer events 1500 wsHandleEvents();mplTimerHandler(0); // handle GUI timer events
1501 if(mplShMem->Playing!=2) break; // end of pause 1501 if(mplShMem->Playing!=2 || (rel_seek_secs || abs_seek_pos)) break; // end of pause or seek
1502 } 1502 }
1503 #endif 1503 #endif
1504 if(use_stdin) usec_sleep(1000); // do not eat the CPU 1504 if(use_stdin) usec_sleep(1000); // do not eat the CPU
1505 } 1505 }
1506 osd_function=OSD_PLAY; 1506 osd_function=OSD_PLAY;
1767 int pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos; 1767 int pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos;
1768 mplShMem->Position=(len<=0)?0:((float)(pos-demuxer->movi_start) / len * 100.0f); 1768 mplShMem->Position=(len<=0)?0:((float)(pos-demuxer->movi_start) / len * 100.0f);
1769 } 1769 }
1770 mplShMem->TimeSec=d_video->pts; 1770 mplShMem->TimeSec=d_video->pts;
1771 printf("mplShMem->Playing=%d \n",mplShMem->Playing); 1771 printf("mplShMem->Playing=%d \n",mplShMem->Playing);
1772 switch(mplShMem->Playing){ 1772 if(mplShMem->Playing==0) break; // STOP
1773 case 0: // stop 1773 if(mplShMem->Playing==2) osd_function=OSD_PAUSE;
1774 // osd_function=OSD_PAUSE;break;
1775 case 1: // play
1776 break;
1777 case 2: // pause
1778 osd_function=OSD_PAUSE;break;
1779 }
1780 } 1774 }
1781 #endif 1775 #endif
1782 1776
1783 1777
1784 //================= Update OSD ==================== 1778 //================= Update OSD ====================