diff options
author | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-22 21:36:12 +0000 |
---|---|---|
committer | pontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-22 21:36:12 +0000 |
commit | b8f39a4f863e6da5eb7b98c5045f4ff4b82f1d88 (patch) | |
tree | e1465bce576dd66a0b6b02ad2913f81e07f721f3 /Gui/interface.c | |
parent | 281eecb323ccb20701c80775afae774ef4dec332 (diff) | |
download | mpv-b8f39a4f863e6da5eb7b98c5045f4ff4b82f1d88.tar.bz2 mpv-b8f39a4f863e6da5eb7b98c5045f4ff4b82f1d88.tar.xz |
fix audio only files play
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5790 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui/interface.c')
-rw-r--r-- | Gui/interface.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/Gui/interface.c b/Gui/interface.c index 5608c22c04..76939f43ad 100644 --- a/Gui/interface.c +++ b/Gui/interface.c @@ -13,8 +13,11 @@ #include "mplayer/mplayer.h" #include "app.h" #include "../libvo/x11_common.h" +#include "../libvo/video_out.h" #include "../input/input.h" + #include "../libmpdemux/stream.h" +#include "../libmpdemux/demuxer.h" guiInterface_t guiIntfStruct; @@ -45,6 +48,20 @@ int guiCMDArray[] = evSkinBrowser }; +typedef struct +{ + demux_stream_t *ds; + unsigned int format; + struct codecs_st *codec; + int inited; + // output format: + float timer; + float fps; + float frametime; + int i_bps; + int disp_w,disp_h; +} tmp_sh_video_t; + void guiGetEvent( int type,char * arg ) { #ifdef USE_DVDREAD @@ -70,6 +87,23 @@ void guiGetEvent( int type,char * arg ) case guiSetFileName: if ( arg ) guiSetFilename( guiIntfStruct.Filename,arg ); break; + case guiSetAudioOnly: + guiIntfStruct.AudioOnly=(int)arg; + if ( (int)arg ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); + else wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow ); + break; + case guiReDrawSubWindow: + wsPostRedisplay( &appMPlayer.subWindow ); + break; + case guiSetShVideo: + if ( arg ) + { + tmp_sh_video_t * sh_video = (tmp_sh_video_t *)arg; + mplResizeToMovieSize( sh_video->disp_w,sh_video->disp_h ); + guiIntfStruct.MovieWidth=sh_video->disp_w; + guiIntfStruct.MovieHeight=sh_video->disp_h; + } + break; #ifdef USE_DVDREAD case guiSetDVD: guiIntfStruct.DVD.titles=dvdp->vmg_file->tt_srpt->nr_of_srpts; @@ -106,7 +140,7 @@ void guiGetEvent( int type,char * arg ) void guiEventHandling( void ) { - if ( use_gui && !guiIntfStruct.Playing ) wsHandleEvents(); + if ( ( use_gui && !guiIntfStruct.Playing )||( guiIntfStruct.AudioOnly ) ) wsHandleEvents(); gtkEventHandling(); mplTimerHandler(); // handle GUI timer events } |