[Mplayer-cvslog] CVS: main/Gui app.c,1.15,1.16 app.h,1.10,1.11 interface.c,1.57,1.58

Zoltan Ponekker pontscho at mplayerhq.hu
Mon Nov 25 18:33:59 CET 2002


Update of /cvsroot/mplayer/main/Gui
In directory mail:/var/tmp.root/cvs-serv12051

Modified Files:
	app.c app.h interface.c 
Log Message:
no seeking if stream is STREAMTYPE_STREAM (net/stdin)

Index: app.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- app.c	2 Nov 2002 16:09:03 -0000	1.15
+++ app.c	25 Nov 2002 17:33:02 -0000	1.16
@@ -154,3 +154,41 @@
   if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg;
  return -1;
 }
+
+void btnModify( int event,float state )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+  if ( appMPlayer.Items[j].msg == event )
+   {
+    switch ( appMPlayer.Items[j].type )
+     {
+      case itButton:
+            appMPlayer.Items[j].pressed=(int)state;
+            appMPlayer.Items[j].tmp=(int)state;
+            break;
+      case itPotmeter:
+      case itHPotmeter:
+    	    if ( state < 0.0f ) state=0.0f;
+	    if ( state > 100.f ) state=100.0f;
+	    appMPlayer.Items[j].value=state;
+	    break;
+     }
+   }
+}
+
+float btnGetValue( int event )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+   if ( appMPlayer.Items[j].msg == event ) return appMPlayer.Items[j].value;
+ return 0;
+}
+
+void btnSet( int event,int set )
+{
+ int j;
+ for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+   if ( appMPlayer.Items[j].msg == event ) appMPlayer.Items[j].disabled=set;
+}
+												    
\ No newline at end of file

Index: app.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- app.h	2 Nov 2002 20:10:16 -0000	1.10
+++ app.h	25 Nov 2002 17:33:02 -0000	1.11
@@ -172,4 +172,8 @@
 extern int appFindMessage( unsigned char * str );
 extern int appFindKey( unsigned char * name );
 
+extern void btnModify( int event,float state );
+extern float btnGetValue( int event );
+extern void btnSet( int event,int set );
+
 #endif

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- interface.c	11 Nov 2002 16:56:39 -0000	1.57
+++ interface.c	25 Nov 2002 17:33:02 -0000	1.58
@@ -538,6 +538,9 @@
 	 }
 
 	if ( guiIntfStruct.NoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+	
+	if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) btnSet( evSetMoviePosition,1 );
+	 else btnSet( evSetMoviePosition,0 );
 
 // -- audio
         if ( audio_out )




More information about the MPlayer-cvslog mailing list