comparison Gui/interface.c @ 5665:3e7f39c4110c

fix dvd playing under gui
author pontscho
date Wed, 17 Apr 2002 21:12:12 +0000
parents ce054c1eabdc
children 1f8b34f1e7c0
comparison
equal deleted inserted replaced
5664:ee6c9530729f 5665:3e7f39c4110c
12 #include "mplayer/widgets.h" 12 #include "mplayer/widgets.h"
13 #include "mplayer/mplayer.h" 13 #include "mplayer/mplayer.h"
14 #include "app.h" 14 #include "app.h"
15 #include "../libvo/x11_common.h" 15 #include "../libvo/x11_common.h"
16 #include "../input/input.h" 16 #include "../input/input.h"
17 #include "../libmpdemux/stream.h"
17 18
18 guiInterface_t guiIntfStruct; 19 guiInterface_t guiIntfStruct;
19 20
20 void guiInit( int argc,char* argv[], char *envp[] ) 21 void guiInit( int argc,char* argv[], char *envp[] )
21 { 22 {
44 evSkinBrowser 45 evSkinBrowser
45 }; 46 };
46 47
47 void guiGetEvent( int type,char * arg ) 48 void guiGetEvent( int type,char * arg )
48 { 49 {
50 dvd_priv_t * dvdp = (dvd_priv_t *) arg;
49 switch ( type ) 51 switch ( type )
50 { 52 {
51 case guiXEvent: 53 case guiXEvent:
52 wsEvents( wsDisplay,(XEvent *)arg,NULL ); 54 wsEvents( wsDisplay,(XEvent *)arg,NULL );
53 gtkEventHandling(); 55 gtkEventHandling();
58 case guiSetPlay: guiIntfStruct.Playing=1; mplState(); break; 60 case guiSetPlay: guiIntfStruct.Playing=1; mplState(); break;
59 case guiSetStop: guiIntfStruct.Playing=0; mplState(); break; 61 case guiSetStop: guiIntfStruct.Playing=0; mplState(); break;
60 case guiSetPause: guiIntfStruct.Playing=2; mplState(); break; 62 case guiSetPause: guiIntfStruct.Playing=2; mplState(); break;
61 } 63 }
62 break; 64 break;
65 case guiSetState:
66 mplState();
67 break;
68 case guiSetFileName:
69 if ( arg ) guiSetFilename( guiIntfStruct.Filename,arg );
70 break;
71 #ifdef USE_DVDREAD
72 case guiSetDVD:
73 guiIntfStruct.DVD.titles=dvdp->vmg_file->tt_srpt->nr_of_srpts;
74 guiIntfStruct.DVD.chapters=dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
75 guiIntfStruct.DVD.angles=dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_angles;
76 guiIntfStruct.DVD.nr_of_audio_channels=dvdp->nr_of_channels;
77 memcpy( guiIntfStruct.DVD.audio_streams,dvdp->audio_streams,sizeof( dvdp->audio_streams ) );
78 guiIntfStruct.DVD.nr_of_subtitles=dvdp->nr_of_subtitles;
79 memcpy( guiIntfStruct.DVD.subtitles,dvdp->subtitles,sizeof( dvdp->subtitles ) );
80 guiIntfStruct.DVD.current_title=dvd_title + 1;
81 guiIntfStruct.DVD.current_chapter=dvd_chapter + 1;
82 guiIntfStruct.DVD.current_angle=dvd_angle + 1;
83 guiIntfStruct.Track=dvd_title + 1;
84 break;
85 #endif
63 #ifdef HAVE_NEW_INPUT 86 #ifdef HAVE_NEW_INPUT
64 case guiIEvent: 87 case guiIEvent:
65 printf( "cmd: %d\n",(int)arg ); 88 printf( "cmd: %d\n",(int)arg );
66 switch( (int)arg ) 89 switch( (int)arg )
67 { 90 {