[MPlayer-dev-eng] [PATCH] next-a/v-patch

Rüdiger Kuhlmann mplayer-list-UGa6JdjLujS2 at ruediger-kuhlmann.de
Mon Feb 10 22:10:21 CET 2003


Hi,

just the umpteenth repost of basically the same patch. Is there a reason why
you keep ignoring it? Is there a reason why the KDE skin is still not
downloadable?

Yours, Rüdiger.

-- 
         100 DM =  51  € 13 ¢.
         100  € = 195 DM 58 pf.
  mailto:ruediger at ruediger-kuhlmann.de
    http://www.ruediger-kuhlmann.de/
-------------- next part --------------
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.681
diff -u -r1.681 mplayer.c
--- mplayer.c	9 Feb 2003 20:18:11 -0000	1.681
+++ mplayer.c	10 Feb 2003 20:58:03 -0000
@@ -216,6 +216,8 @@
 // streaming:
 int audio_id=-1;
 int video_id=-1;
+int gui_audio_id = -1;
+int gui_video_id = -1;
 int dvdsub_id=-1;
 int vobsub_id=-1;
Index: mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.h,v
retrieving revision 1.28
diff -u -r1.28 mplayer.h
--- mplayer.h	21 Jan 2003 19:12:34 -0000	1.28
+++ mplayer.h	10 Feb 2003 20:58:03 -0000
@@ -54,8 +54,8 @@
 
 extern int auto_quality;
 
-extern int audio_id;
-extern int video_id;
+extern int audio_id, gui_audio_id;
+extern int video_id, gui_video_id;
 extern int dvdsub_id;
 extern int vobsub_id;
 
Index: Gui/app.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.c,v
retrieving revision 1.22
diff -u -r1.22 app.c
--- Gui/app.c	1 Feb 2003 16:41:39 -0000	1.22
+++ Gui/app.c	10 Feb 2003 20:58:03 -0000
@@ -62,7 +62,10 @@
   { evSetURL,		 "evSetURL"	       },
   { evLoadAudioFile,	 "evLoadAudioFile"     },
   { evDropSubtitle,      "evDropSubtitle"      },
-  { evSetAspect,	 "evSetAspect"	       }
+  { evSetAspect,	 "evSetAspect"	       },
+  { evSetAudio,		 "evSetAudio"	       },
+  { evAudioNext, 	 "evAudioNext"	       },
+  { evVideoNext, 	 "evVideoNext"	       }
  };
 
 int evBoxs = sizeof( evNames ) / sizeof( evName );
Index: Gui/app.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.h,v
retrieving revision 1.17
diff -u -r1.17 app.h
--- Gui/app.h	17 Jan 2003 22:39:38 -0000	1.17
+++ Gui/app.h	10 Feb 2003 20:58:03 -0000
@@ -61,6 +61,9 @@
 #define evSetVideo	    46
 // 47 ...
 
+#define evAudioNext         99
+#define evVideoNext        100
+
 #define evExit              1000
 
 // --- General events ---
Index: Gui/mplayer/common.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/common.c,v
retrieving revision 1.2
diff -u -r1.2 common.c
--- Gui/mplayer/common.c	1 Feb 2003 08:46:17 -0000	1.2
+++ Gui/mplayer/common.c	10 Feb 2003 20:58:03 -0000
@@ -109,11 +109,14 @@
        case 'v': sprintf( tmp,"%3.2f%%",guiIntfStruct.Volume ); strcat( trbuf,tmp ); break;
        case 'V': sprintf( tmp,"%3.1f",guiIntfStruct.Volume ); strcat( trbuf,tmp ); break;
        case 'b': sprintf( tmp,"%3.2f%%",guiIntfStruct.Balance ); strcat( trbuf,tmp ); break;
+       case 'A': if (audio_id == -1) sprintf (tmp, "a"); else sprintf (tmp, "%d", audio_id); strcat (trbuf, tmp); break;
+       case 'W': if (video_id == -1) sprintf (tmp, "a"); else sprintf (tmp, "%d", video_id); strcat (trbuf, tmp); break;
        case 'B': sprintf( tmp,"%3.1f",guiIntfStruct.Balance ); strcat( trbuf,tmp ); break;
        case 'd': sprintf( tmp,"%d",guiIntfStruct.FrameDrop ); strcat( trbuf,tmp ); break;
        case 'x': sprintf( tmp,"%d",guiIntfStruct.MovieWidth ); strcat( trbuf,tmp ); break;
        case 'y': sprintf( tmp,"%d",guiIntfStruct.MovieHeight ); strcat( trbuf,tmp ); break;
-       case 'C': sprintf( tmp,"%s", guiIntfStruct.sh_video? ((sh_video_t *)guiIntfStruct.sh_video)->codec->name : "");
+       case 'C': sprintf( tmp,"%s", guiIntfStruct.sh_video && ((sh_video_t *)guiIntfStruct.sh_video)->codec
+                         ? ((sh_video_t *)guiIntfStruct.sh_video)->codec->name : "");
                  strcat( trbuf,tmp ); break;
        case 's': if ( guiIntfStruct.Playing == 0 ) strcat( trbuf,"s" ); break;
        case 'l': if ( guiIntfStruct.Playing == 1 ) strcat( trbuf,"p" ); break;
Index: Gui/mplayer/mw.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.c,v
retrieving revision 1.108
diff -u -r1.108 mw.c
--- Gui/mplayer/mw.c	1 Feb 2003 16:42:00 -0000	1.108
+++ Gui/mplayer/mw.c	10 Feb 2003 20:58:03 -0000
@@ -49,7 +49,7 @@
 {
  wItem    * item;
  txSample * image = NULL;
- int        i, type;
+ int        i;
 
  if ( appMPlayer.mainWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
  
@@ -95,11 +95,39 @@
         gtkShow( evPlayNetwork,NULL );
 	break;
 
+   case evAudioNext:
+        if (!guiIntfStruct.demuxer) break;
+        if (gui_audio_id == -1)
+        {
+          for (gui_audio_id = 0; gui_audio_id < MAX_A_STREAMS; gui_audio_id++)
+            if (((demuxer_t *)guiIntfStruct.demuxer)->a_streams[gui_audio_id])
+              break;
+          gui_audio_id %= MAX_A_STREAMS;
+        }
+        for (j = gui_audio_id + 1; j < gui_audio_id + MAX_A_STREAMS; j++)
+          if (((demuxer_t *)guiIntfStruct.demuxer)->a_streams[j % MAX_A_STREAMS])
+            break;
+        iparam = j % MAX_A_STREAMS;
+        /* fall-through */
    case evSetAudio:
         if ( !guiIntfStruct.demuxer || audio_id == iparam ) break;
 	audio_id=iparam;
 	goto play;
 
+   case evVideoNext:
+        if (!guiIntfStruct.demuxer) break;
+        if (gui_video_id == -1)
+        {
+          for (gui_video_id = 0; gui_video_id < MAX_A_STREAMS; gui_video_id++)
+            if (((demuxer_t *)guiIntfStruct.demuxer)->v_streams[gui_video_id])
+              break;
+          gui_video_id %= MAX_A_STREAMS;
+        }
+        for (j = gui_video_id + 1; j < gui_video_id + MAX_A_STREAMS; j++)
+          if (((demuxer_t *)guiIntfStruct.demuxer)->v_streams[j % MAX_A_STREAMS])
+            break;
+        iparam = j % MAX_A_STREAMS;
+        /* fall-through */
    case evSetVideo:
         if ( !guiIntfStruct.demuxer || video_id == iparam ) break;
 	video_id=iparam;


More information about the MPlayer-dev-eng mailing list