Mercurial > mplayer.hg
comparison Gui/mplayer/mplayer.c @ 1723:5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
author | arpi |
---|---|
date | Mon, 27 Aug 2001 23:56:44 +0000 |
parents | a4e0211455d8 |
children | 0880718750d5 |
comparison
equal
deleted
inserted
replaced
1722:9e23ceba3f65 | 1723:5e4214a7540e |
---|---|
46 if ( mplMouseTimer == 0 ) mplMsgHandle( evHideMouseCursor,0 ); | 46 if ( mplMouseTimer == 0 ) mplMsgHandle( evHideMouseCursor,0 ); |
47 if ( mplRedrawTimer == 0 ) mplMsgHandle( evRedraw,0 ); | 47 if ( mplRedrawTimer == 0 ) mplMsgHandle( evRedraw,0 ); |
48 if ( mplGeneralTimer == 0 ) mplMsgHandle( evGeneralTimer,0 ); | 48 if ( mplGeneralTimer == 0 ) mplMsgHandle( evGeneralTimer,0 ); |
49 } | 49 } |
50 | 50 |
51 void mplInit( int argc,char* argv[], char *envp[] ) | 51 void mplInit( int argc,char* argv[], char *envp[], void* disp ) |
52 { | 52 { |
53 // parse_cfgfiles( argc,argv,envp ); | 53 // parse_cfgfiles( argc,argv,envp ); |
54 | 54 |
55 // allocates shmem to gtkShMem | 55 // allocates shmem to gtkShMem |
56 // fork() a process which runs gtkThreadProc() [gtkChildPID] | 56 // fork() a process which runs gtkThreadProc() [gtkChildPID] |
61 mplMPlayerInit( argc,argv,envp ); | 61 mplMPlayerInit( argc,argv,envp ); |
62 | 62 |
63 message=mplErrorHandler; // error messagebox drawing function | 63 message=mplErrorHandler; // error messagebox drawing function |
64 | 64 |
65 // opens X display, checks for extensions (XShape, DGA etc) | 65 // opens X display, checks for extensions (XShape, DGA etc) |
66 wsXInit(); | 66 wsXInit(disp); |
67 | 67 |
68 if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) | 68 if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL ) |
69 { | 69 { |
70 fprintf( stderr,langNEMDB ); | 70 fprintf( stderr,langNEMDB ); |
71 exit( 0 ); | 71 exit( 0 ); |
73 | 73 |
74 wsCreateWindow( &appMPlayer.subWindow, | 74 wsCreateWindow( &appMPlayer.subWindow, |
75 appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height, | 75 appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height, |
76 wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsShowWindow,"ViDEO" ); | 76 wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsShowWindow,"ViDEO" ); |
77 | 77 |
78 vo_setwindow(appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC); | |
79 mplSubRender=0; | |
80 | |
78 wsCreateWindow( &appMPlayer.mainWindow, | 81 wsCreateWindow( &appMPlayer.mainWindow, |
79 appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height, | 82 appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height, |
80 wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsMaxSize|wsMinSize|wsShowWindow,"MPlayer" ); | 83 wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsMaxSize|wsMinSize|wsShowWindow,"MPlayer" ); |
81 | 84 |
82 wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image ); | 85 wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image ); |
103 | 106 |
104 btnModify( evSetVolume,mplShMem->Volume ); | 107 btnModify( evSetVolume,mplShMem->Volume ); |
105 btnModify( evSetBalance,mplShMem->Balance ); | 108 btnModify( evSetBalance,mplShMem->Balance ); |
106 btnModify( evSetMoviePosition,mplShMem->Position ); | 109 btnModify( evSetMoviePosition,mplShMem->Position ); |
107 | 110 |
111 mplShMem->Playing=0; | |
112 | |
108 // timerSetHandler( mplTimerHandler ); // various timer hacks | 113 // timerSetHandler( mplTimerHandler ); // various timer hacks |
109 // timerInit(); | 114 // timerInit(); |
110 | 115 |
111 // wsMainLoop(); // X event handler (calls mplTimerHandler periodically!) | 116 // wsMainLoop(); // X event handler (calls mplTimerHandler periodically!) |
112 | 117 |