Mercurial > mplayer.hg
comparison mplayer.c @ 1790:f34087fa1469
stop fix, fileselector worx
author | arpi |
---|---|
date | Thu, 30 Aug 2001 21:49:24 +0000 |
parents | de6a0987a08d |
children | 89f616b1c2ae |
comparison
equal
deleted
inserted
replaced
1789:8bbfd587166b | 1790:f34087fa1469 |
---|---|
582 if(filename) strcpy( mplShMem->Filename,filename ); | 582 if(filename) strcpy( mplShMem->Filename,filename ); |
583 mplShMem->Playing= (gui_no_filename) ? 0 : 1; | 583 mplShMem->Playing= (gui_no_filename) ? 0 : 1; |
584 while(mplShMem->Playing!=1){ | 584 while(mplShMem->Playing!=1){ |
585 usleep(20000); | 585 usleep(20000); |
586 wsHandleEvents();mplTimerHandler(0); // handle GUI timer events | 586 wsHandleEvents();mplTimerHandler(0); // handle GUI timer events |
587 } | |
588 if(gui_no_filename){ | |
589 filename=mplShMem->Filename; | |
587 } | 590 } |
588 } | 591 } |
589 #endif | 592 #endif |
590 | 593 |
591 if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,"Playing %s\n", filename); | 594 if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,"Playing %s\n", filename); |
1775 int len=((demuxer->movi_end-demuxer->movi_start)); | 1778 int len=((demuxer->movi_end-demuxer->movi_start)); |
1776 int pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos; | 1779 int pos=(demuxer->file_format==DEMUXER_TYPE_AVI)?demuxer->filepos:d_video->pos; |
1777 mplShMem->Position=(len<=0)?0:((float)(pos-demuxer->movi_start) / len * 100.0f); | 1780 mplShMem->Position=(len<=0)?0:((float)(pos-demuxer->movi_start) / len * 100.0f); |
1778 } | 1781 } |
1779 mplShMem->TimeSec=d_video->pts; | 1782 mplShMem->TimeSec=d_video->pts; |
1780 printf("mplShMem->Playing=%d \n",mplShMem->Playing); | 1783 // printf("mplShMem->Playing=%d \n",mplShMem->Playing); |
1781 if(mplShMem->Playing==0) break; // STOP | 1784 if(mplShMem->Playing==0) break; // STOP |
1782 if(mplShMem->Playing==2) osd_function=OSD_PAUSE; | 1785 if(mplShMem->Playing==2) osd_function=OSD_PAUSE; |
1783 } | 1786 } |
1784 #endif | 1787 #endif |
1785 | 1788 |
1830 mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d \n",eof); | 1833 mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d \n",eof); |
1831 | 1834 |
1832 } | 1835 } |
1833 | 1836 |
1834 | 1837 |
1835 if(curr_filename+1<num_filenames){ | 1838 if(curr_filename+1<num_filenames || use_gui){ |
1836 // partial uninit: | 1839 // partial uninit: |
1837 | 1840 |
1838 // restore terminal: | 1841 // restore terminal: |
1839 getch2_disable(); | 1842 getch2_disable(); |
1840 | 1843 |
1850 if(audio_out) audio_out->uninit(); | 1853 if(audio_out) audio_out->uninit(); |
1851 // if(encode_name) avi_fixate(); | 1854 // if(encode_name) avi_fixate(); |
1852 } | 1855 } |
1853 | 1856 |
1854 goto_next_file: // don't jump here after ao/vo/getch initialization! | 1857 goto_next_file: // don't jump here after ao/vo/getch initialization! |
1855 ++curr_filename; | 1858 if(use_gui || ++curr_filename<num_filenames){ |
1856 if(curr_filename<num_filenames){ | |
1857 | 1859 |
1858 current_module="uninit_vcodec"; | 1860 current_module="uninit_vcodec"; |
1859 if(sh_video) uninit_video(sh_video); | 1861 if(sh_video) uninit_video(sh_video); |
1860 | 1862 |
1861 current_module="free_demuxer"; | 1863 current_module="free_demuxer"; |