[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk menu.c,1.25,1.26 pl.c,1.13,1.14
Zoltan Ponekker
pontscho at mplayerhq.hu
Fri Dec 6 00:40:07 CET 2002
Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mail:/var/tmp.root/cvs-serv473
Modified Files:
menu.c pl.c
Log Message:
better 'Audio track' support, and one 10l
Index: menu.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/menu.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- menu.c 29 Nov 2002 00:58:25 -0000 1.25
+++ menu.c 5 Dec 2002 23:40:05 -0000 1.26
@@ -14,6 +14,7 @@
#include "../widgets.h"
#include "../app.h"
+#include "../../../libmpdemux/stream.h"
#include "../../../libmpdemux/demuxer.h"
void ActivateMenuItem( int Item )
@@ -414,7 +415,7 @@
}
#endif
- if ( guiIntfStruct.Playing )
+// if ( guiIntfStruct.Playing )
{
AspectMenu=AddSubMenu( Menu,MSGTR_MENU_AspectRatio );
AddMenuItem( AspectMenu,MSGTR_MENU_Original,( 1 << 16 ) + evSetAspect );
@@ -423,18 +424,39 @@
AddMenuItem( AspectMenu,"2.35",( 4 << 16 ) + evSetAspect );
}
- if ( guiIntfStruct.demuxer )
+ if ( guiIntfStruct.demuxer && guiIntfStruct.StreamType != STREAMTYPE_DVD )
{
int i,c = 0;
-
+
for ( i=0;i < MAX_A_STREAMS;i++ )
- if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] )
- {
- char tmp[32];
- snprintf( tmp,32,"Track %d",i );
- if ( !c ) { SubMenu=AddSubMenu( Menu, "Audio track" ); c=1; }
- AddMenuItem( SubMenu,tmp,( i << 16 ) + evSetAudio );
- }
+ if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] ) c++;
+
+ if ( c > 1 )
+ {
+ SubMenu=AddSubMenu( Menu,MSGTR_MENU_AudioTrack );
+ for ( i=0;i < MAX_A_STREAMS;i++ )
+ if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] )
+ {
+ char tmp[32];
+ snprintf( tmp,32,MSGTR_MENU_Track,i );
+ AddMenuItem( SubMenu,tmp,( i << 16 ) + evSetAudio );
+ }
+ }
+
+ for ( c=0,i=0;i < MAX_V_STREAMS;i++ )
+ if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] ) c++;
+
+ if ( c > 1 )
+ {
+ SubMenu=AddSubMenu( Menu,MSGTR_MENU_VideoTrack );
+ for ( i=0;i < MAX_V_STREAMS;i++ )
+ if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] )
+ {
+ char tmp[32];
+ snprintf( tmp,32,MSGTR_MENU_Track,i );
+ AddMenuItem( SubMenu,tmp,( i << 16 ) + evSetVideo );
+ }
+ }
}
AddSeparator( Menu );
Index: pl.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/pl.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- pl.c 27 Nov 2002 22:48:56 -0000 1.13
+++ pl.c 5 Dec 2002 23:40:05 -0000 1.14
@@ -223,9 +223,10 @@
}
if ( plCurrent )
{
- guiSetDF( guiIntfStruct.Filename,plCurrent->path,plCurrent->name );
- guiIntfStruct.FilenameChanged=1;
- guiIntfStruct.StreamType=STREAMTYPE_FILE;
+ mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
+// guiSetDF( guiIntfStruct.Filename,plCurrent->path,plCurrent->name );
+// guiIntfStruct.FilenameChanged=1;
+// guiIntfStruct.StreamType=STREAMTYPE_FILE;
}
}
case 0: // cancel
More information about the MPlayer-cvslog
mailing list