Mercurial > mplayer.hg
changeset 7541:f51e76c3882e
add aspect changing support
author | pontscho |
---|---|
date | Sat, 28 Sep 2002 21:16:12 +0000 |
parents | 2a1766fec13e |
children | 190d14d9130e |
files | Gui/events.c Gui/events.h Gui/mplayer/gtk/menu.c Gui/mplayer/mw.h mplayer.h |
diffstat | 5 files changed, 25 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/events.c Sat Sep 28 20:33:56 2002 +0000 +++ b/Gui/events.c Sat Sep 28 21:16:12 2002 +0000 @@ -48,7 +48,8 @@ { evPlayVCD, "evPlayVCD" }, { evSetURL, "evSetURL" }, { evLoadAudioFile, "evLoadAudioFile" }, - { evDropSubtitle, "evDropSubtitle" } + { evDropSubtitle, "evDropSubtitle" }, + { evSetAspect, "evSetAspect" } }; int evBoxs = sizeof( evNames ) / sizeof( evName );
--- a/Gui/events.h Sat Sep 28 20:33:56 2002 +0000 +++ b/Gui/events.h Sat Sep 28 21:16:12 2002 +0000 @@ -52,7 +52,8 @@ #define evPlayVCD 40 #define evPlayNetwork 41 #define evLoadAudioFile 42 -// 44 ... +#define evSetAspect 44 +// 45 ... #define evExit 1000
--- a/Gui/mplayer/gtk/menu.c Sat Sep 28 20:33:56 2002 +0000 +++ b/Gui/mplayer/gtk/menu.c Sat Sep 28 21:16:12 2002 +0000 @@ -258,7 +258,7 @@ GtkWidget * DVDChapterMenu; GtkWidget * DVDAudioLanguageMenu; GtkWidget * DVDSubtitleLanguageMenu; - +GtkWidget * AspectMenu; GtkWidget * VCDSubMenu; GtkWidget * VCDTitleMenu; @@ -388,6 +388,12 @@ gtk_widget_set_sensitive( MenuItem,FALSE ); } #endif + AspectMenu=AddSubMenu( Menu,"Aspect ratio" ); + AddMenuItem( AspectMenu,"Original",( 1 << 16 ) + evSetAspect ); + AddMenuItem( AspectMenu,"16:9",( 2 << 16 ) + evSetAspect ); + AddMenuItem( AspectMenu,"4:3",( 3 << 16 ) + evSetAspect ); + AddMenuItem( AspectMenu,"2.35",( 4 << 16 ) + evSetAspect ); + AddSeparator( Menu ); AddMenuItem( Menu,"Mute", evMute ); AddMenuItem( Menu,MSGTR_MENU_PlayList, evPlayList );
--- a/Gui/mplayer/mw.h Sat Sep 28 20:33:56 2002 +0000 +++ b/Gui/mplayer/mw.h Sat Sep 28 21:16:12 2002 +0000 @@ -447,6 +447,19 @@ mplFullScreen(); break; + case evSetAspect: + switch ( (int)param ) + { + case 2: movie_aspect=16.0f / 9.0f; break; + case 3: movie_aspect=4.0f / 3.0f; break; + case 4: movie_aspect=2.35; break; + case 1: + default: movie_aspect=-1; + } + guiIntfStruct.FilenameChanged=1; + wsClearWindow( appMPlayer.subWindow ); + break; + // --- timer events case evRedraw: mplMainRender=1;