[Mplayer-cvslog] CVS: main/Gui/mplayer mplayer.c,1.3,1.4 mplayer.h,1.1,1.2 mw.h,1.2,1.3 play.c,1.1,1.2 psignal.c,1.2,1.3 sw.h,1.1,1.2
Arpi of Ize
arpi at mplayer.dev.hu
Tue Aug 28 01:56:46 CEST 2001
- Previous message: [Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.26,1.27 x11_common.c,1.30,1.31 x11_common.h,1.7,1.8
- Next message: [Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.4,1.5 ws.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/Gui/mplayer
In directory mplayer:/var/tmp.root/cvs-serv28362/Gui/mplayer
Modified Files:
mplayer.c mplayer.h mw.h play.c psignal.c sw.h
Log Message:
GUI stuff. now seeking works, and xmga renders to video window
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mplayer.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mplayer.c 27 Aug 2001 00:55:25 -0000 1.3
+++ mplayer.c 27 Aug 2001 23:56:43 -0000 1.4
@@ -48,7 +48,7 @@
if ( mplGeneralTimer == 0 ) mplMsgHandle( evGeneralTimer,0 );
}
-void mplInit( int argc,char* argv[], char *envp[] )
+void mplInit( int argc,char* argv[], char *envp[], void* disp )
{
// parse_cfgfiles( argc,argv,envp );
@@ -63,7 +63,7 @@
message=mplErrorHandler; // error messagebox drawing function
// opens X display, checks for extensions (XShape, DGA etc)
- wsXInit();
+ wsXInit(disp);
if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
{
@@ -75,6 +75,9 @@
appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height,
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsShowWindow,"ViDEO" );
+ vo_setwindow(appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC);
+ mplSubRender=0;
+
wsCreateWindow( &appMPlayer.mainWindow,
appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height,
wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsHideFrame|wsMaxSize|wsMinSize|wsShowWindow,"MPlayer" );
@@ -105,6 +108,8 @@
btnModify( evSetBalance,mplShMem->Balance );
btnModify( evSetMoviePosition,mplShMem->Position );
+ mplShMem->Playing=0;
+
// timerSetHandler( mplTimerHandler ); // various timer hacks
// timerInit();
Index: mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mplayer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mplayer.h 25 Aug 2001 21:04:28 -0000 1.1
+++ mplayer.h 27 Aug 2001 23:56:43 -0000 1.2
@@ -13,7 +13,7 @@
extern int mplMainAutoPlay;
-extern void mplInit( int argc,char* argv[], char *envp[] );
+extern void mplInit( int argc,char* argv[], char *envp[], void* disp );
extern void mplMsgHandle( int msg,float param );
#endif
Index: mw.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mw.h 26 Aug 2001 21:04:40 -0000 1.2
+++ mw.h 27 Aug 2001 23:56:43 -0000 1.3
@@ -178,6 +178,8 @@
XFlush( wsDisplay );
}
+#define IZE(x) printf("@@@ " x " @@@\n");
+
void mplMsgHandle( int msg,float param )
{
int j;
@@ -186,12 +188,15 @@
{
// --- user events
case evExit:
- wsDoExit();
+ IZE("evExit");
+ wsDoExit(); // sets wsTrue=False;
break;
case evIconify:
+ IZE("evIcon");
wsIconify( appMPlayer.mainWindow );
break;
case evFullScreen:
+ IZE("evFullS");
for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
{
if ( appMPlayer.Items[j].msg == evFullScreen )
@@ -205,6 +210,7 @@
break;
case evPlaySwitchToPause:
+ IZE("evPlay->Pause");
if ( Filename )
{
btnModify( evPlaySwitchToPause,btnDisabled );
@@ -212,20 +218,24 @@
}
if ( mplShMem->Playing == 1 ) goto NoPause;
case evPlay:
+ IZE("evPlay");
mplMainRender=1;
mplPlay();
break;
case evPauseSwitchToPlay:
+ IZE("evPause->Play");
btnModify( evPlaySwitchToPause,btnReleased );
btnModify( evPauseSwitchToPlay,btnDisabled );
case evPause:
NoPause:
+ IZE("evPause");
mplMainRender=1;
mplPause();
break;
case evStop:
+ IZE("evStop");
btnModify( evPlaySwitchToPause,btnReleased );
btnModify( evPauseSwitchToPlay,btnDisabled );
mplMainRender=1;
@@ -233,18 +243,22 @@
break;
case evLoadPlay:
+ IZE("evLoadPlay");
mplMainAutoPlay=1;
case evLoad:
+ IZE("evLoad");
mplMainRender=1;
gtkSendMessage( evLoad );
break;
case evPrev:
+ IZE("evPrev");
mplMainRender=1;
#ifdef DEBUG
dbprintf( 1,"[mw.h] previous stream ...\n" );
#endif
break;
case evNext:
+ IZE("evNext");
mplMainRender=1;
#ifdef DEBUG
dbprintf( 1,"[mw.h] next stream ...\n" );
@@ -252,6 +266,7 @@
break;
case evPlayList:
+ IZE("evPlayList");
mplMainRender=1;
if ( gtkVisiblePlayList )
{
Index: play.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- play.c 25 Aug 2001 21:04:28 -0000 1.1
+++ play.c 27 Aug 2001 23:56:43 -0000 1.2
@@ -9,6 +9,8 @@
int mplx,mply,mplwidth,mplheight;
+float gui_position=-1;
+
#include "../app.h"
#include "../wm/ws.h"
@@ -16,6 +18,7 @@
#include "../wm/widget.h"
#include "../../config.h"
+#include "../../libvo/x11_common.h"
#include "widgets.h"
#include "./mplayer.h"
@@ -25,6 +28,10 @@
mplCommStruct * mplShMem;
char * Filename = NULL;
+extern float rel_seek_secs;
+extern int abs_seek_pos;
+
+
void mplPlayerThread( void )
{
// mplayer( 0,NULL,NULL );
@@ -85,6 +92,10 @@
void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
{
+
+printf("mplResize(%d,%d,%d,%d) \n",X,Y,width,height);
+ vo_resize=1;
+
}
void mplMPlayerInit( int argc,char* argv[], char *envp[] )
@@ -109,7 +120,7 @@
float mplGetPosition( void )
{ // return 0.0 ... 100.0
- return mplShMem->Position;
+ return (gui_position<0)?(mplShMem->Position):(gui_position*100.0);
}
void mplRelSeek( float s )
@@ -118,12 +129,14 @@
printf("%%%%%% RelSEEK=%5.3f \n",s);
// ---
mplShMem->Position=mplGetPosition() + s;
+ rel_seek_secs=s; abs_seek_pos=0;
}
void mplAbsSeek( float s )
{ // 0.0 ... 100.0
// ---
printf("%%%%%% AbsSEEK=%5.3f \n",s);
+ rel_seek_secs=0.01*s; abs_seek_pos=3;
// ---
mplShMem->Position=s;
mplShMem->TimeSec=s;
Index: psignal.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/psignal.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- psignal.c 26 Aug 2001 00:28:56 -0000 1.2
+++ psignal.c 27 Aug 2001 23:56:43 -0000 1.3
@@ -18,6 +18,9 @@
#include "../../config.h"
+#include "../../libvo/x11_common.h"
+//#include "../../libvo/sub.h"
+
#include "./mplayer.h"
#define gtkShow( w ) gtkShMem->vs.window=w; gtkSendMessage( evShowWindow );
@@ -55,20 +58,21 @@
switch ( mplShMem->message )
{
case mplQuit:
-// exit_player( "Quit" );
+ exit_player( "GUI close" );
break;
case mplPauseEvent:
// if ( osd_function != OSD_PAUSE ) osd_function=OSD_PAUSE;
// else osd_function=OSD_PLAY;
break;
case mplResizeEvent:
-// vo_resize=1;
-// vo_expose=1;
-// dbprintf( 2,"[psignal] resize.\n" );
+ vo_resize=1;
+ vo_expose=1;
+ printf( "[psignal] resize.\n" );
// if (video_out != NULL ) video_out->check_events();
break;
case mplExposeEvent:
-// vo_expose=1;
+ vo_expose=1;
+ printf( "[psignal] expose.\n" );
// if (video_out != NULL ) video_out->check_events();
break;
case mplSeekEvent:
Index: sw.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/sw.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sw.h 25 Aug 2001 21:04:28 -0000 1.1
+++ sw.h 27 Aug 2001 23:56:43 -0000 1.2
@@ -18,8 +18,8 @@
wsClearWindow( appMPlayer.subWindow );
if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
mplSubRender=0;
+ if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
}
- if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
XFlush( wsDisplay );
XSync( wsDisplay,False );
}
- Previous message: [Mplayer-cvslog] CVS: main/libvo vo_xmga.c,1.26,1.27 x11_common.c,1.30,1.31 x11_common.h,1.7,1.8
- Next message: [Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.4,1.5 ws.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list