changeset 8280:72700fefd3dc

no seeking if stream is STREAMTYPE_STREAM (net/stdin)
author pontscho
date Mon, 25 Nov 2002 17:33:30 +0000
parents fade8f754da0
children 74f4c42e2317
files Gui/app.c Gui/app.h Gui/interface.c Gui/mplayer/mw.c Gui/mplayer/play.c Gui/skin/skin.c Gui/skin/skin.h
diffstat 7 files changed, 47 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/app.c	Mon Nov 25 16:54:05 2002 +0000
+++ b/Gui/app.c	Mon Nov 25 17:33:30 2002 +0000
@@ -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
--- a/Gui/app.h	Mon Nov 25 16:54:05 2002 +0000
+++ b/Gui/app.h	Mon Nov 25 17:33:30 2002 +0000
@@ -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
--- a/Gui/interface.c	Mon Nov 25 16:54:05 2002 +0000
+++ b/Gui/interface.c	Mon Nov 25 17:33:30 2002 +0000
@@ -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 )
--- a/Gui/mplayer/mw.c	Mon Nov 25 16:54:05 2002 +0000
+++ b/Gui/mplayer/mw.c	Mon Nov 25 17:33:30 2002 +0000
@@ -196,6 +196,7 @@
    for( i=0;i < appMPlayer.NumberOfItems + 1;i++ )
     {
      item=&appMPlayer.Items[i];
+    if ( !item->disabled )
      switch( item->type )
       {
        case itButton:
--- a/Gui/mplayer/play.c	Mon Nov 25 16:54:05 2002 +0000
+++ b/Gui/mplayer/play.c	Mon Nov 25 17:33:30 2002 +0000
@@ -179,6 +179,7 @@
 
 void mplAbsSeek( float s )
 { // 0.0 ... 100.0
+ if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) return;
  rel_seek_secs=0.01*s; abs_seek_pos=3;
 }
 
--- a/Gui/skin/skin.c	Mon Nov 25 16:54:05 2002 +0000
+++ b/Gui/skin/skin.c	Mon Nov 25 17:33:30 2002 +0000
@@ -635,33 +635,3 @@
   }
  return 0;
 }
-
-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;
-}
--- a/Gui/skin/skin.h	Mon Nov 25 16:54:05 2002 +0000
+++ b/Gui/skin/skin.h	Mon Nov 25 17:33:30 2002 +0000
@@ -11,9 +11,6 @@
 extern int skinRead( char * dname  );
 extern int skinBPRead( char * fname, txSample * bf );
 
-extern void btnModify( int event,float state );
-extern float btnGetValue( int event );
-
 // ---
 
 extern char * strdelspacesbeforecommand( char * in );