Mercurial > mplayer.hg
comparison mplayer.c @ 1771:b3f6e2baffbf
pause/play
author | arpi |
---|---|
date | Thu, 30 Aug 2001 12:19:52 +0000 |
parents | 63db543aae94 |
children | 591398376329 |
comparison
equal
deleted
inserted
replaced
1770:7e3136adcfb1 | 1771:b3f6e2baffbf |
---|---|
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 } | 1502 } |
1502 #endif | 1503 #endif |
1503 if(use_stdin) usec_sleep(1000); // do not eat the CPU | 1504 if(use_stdin) usec_sleep(1000); // do not eat the CPU |
1504 } | 1505 } |
1505 osd_function=OSD_PLAY; | 1506 osd_function=OSD_PLAY; |
1765 int len=((demuxer->movi_end-demuxer->movi_start)); | 1766 int len=((demuxer->movi_end-demuxer->movi_start)); |
1766 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; |
1767 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); |
1768 } | 1769 } |
1769 mplShMem->TimeSec=d_video->pts; | 1770 mplShMem->TimeSec=d_video->pts; |
1771 printf("mplShMem->Playing=%d \n",mplShMem->Playing); | |
1772 switch(mplShMem->Playing){ | |
1773 case 0: // stop | |
1774 // osd_function=OSD_PAUSE;break; | |
1775 case 1: // play | |
1776 break; | |
1777 case 2: // pause | |
1778 osd_function=OSD_PAUSE;break; | |
1779 } | |
1770 } | 1780 } |
1771 #endif | 1781 #endif |
1772 | 1782 |
1773 | 1783 |
1774 //================= Update OSD ==================== | 1784 //================= Update OSD ==================== |