diff options
author | handbrake <[email protected]> | 2006-01-14 13:27:00 +0000 |
---|---|---|
committer | handbrake <[email protected]> | 2006-01-14 13:27:00 +0000 |
commit | b69e82fd960103c41979e00beb9b1c9fac78083b (patch) | |
tree | 264c5b637fd261c67d17e1d3649d4526c585e663 /macosx | |
parent | 951be4e0b69aa652c992124025c862c4f1660937 (diff) |
HandBrake 0.6.0-test3
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@12 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.mm | 32 | ||||
-rw-r--r-- | macosx/English.lproj/InfoPlist.strings | bin | 520 -> 520 bytes | |||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/info.nib | 11 | ||||
-rw-r--r-- | macosx/English.lproj/MainMenu.nib/objects.nib | bin | 19603 -> 19527 bytes | |||
-rw-r--r-- | macosx/HandBrake.xcode/project.pbxproj | 8 | ||||
-rw-r--r-- | macosx/PictureGLView.mm | 32 | ||||
-rw-r--r-- | macosx/i18n/nl.strings | bin | 0 -> 10106 bytes |
7 files changed, 48 insertions, 35 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 206c76369..1a3655d4b 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1,4 +1,4 @@ -/* $Id: Controller.mm,v 1.27 2004/02/18 17:07:20 titer Exp $ +/* $Id: Controller.mm,v 1.29 2004/03/08 12:39:49 titer Exp $ This file is part of the HandBrake source code. Homepage: <http://handbrake.m0k.org/>. @@ -50,6 +50,13 @@ static void _RipDone( void * data, int result ); - (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *) app { + if( [[fRipRipButton title] compare: _( @"Cancel" ) ] + == NSOrderedSame ) + { + [self Cancel: self]; + return NSTerminateCancel; + } + /* Clean up */ HBClose( &fHandle ); @@ -160,6 +167,13 @@ static void _RipDone( void * data, int result ); - (BOOL) windowShouldClose: (id) sender { + if( [[fRipRipButton title] compare: _( @"Cancel" ) ] + == NSOrderedSame ) + { + [self Cancel: self]; + return NO; + } + /* Stop the application when the user closes the window */ [NSApp terminate: self]; return YES; @@ -310,11 +324,8 @@ static void _RipDone( void * data, int result ); /* Resize the panel */ NSSize newSize; - /* XXX */ - newSize.width = 762 /*fPicturePanelSize.width*/ + - title->outWidthMax - 720; - newSize.height = 755 /*fPicturePanelSize.height*/ + - title->outHeightMax - 576; + newSize.width = 42 + MAX( 720, title->outWidthMax ); + newSize.height = 165 + title->outHeightMax; [fPicturePanel setContentSize: newSize]; [NSApp beginSheet: fPicturePanel modalForWindow: fWindow @@ -410,14 +421,14 @@ static void _RipDone( void * data, int result ); audio1->outBitrate = [[fRipAudBitPopUp titleOfSelectedItem] intValue]; - audio1->codec = ( !format ) ? HB_CODEC_AAC : ( ( format == 3 ) ? + audio1->outCodec = ( !format ) ? HB_CODEC_AAC : ( ( format == 3 ) ? HB_CODEC_VORBIS : HB_CODEC_MP3 );; HBListAdd( title->ripAudioList, audio1 ); if( audio2 ) { audio2->outBitrate = [[fRipAudBitPopUp titleOfSelectedItem] intValue]; - audio2->codec = ( !format ) ? HB_CODEC_AAC : ( ( format == 3 ) ? + audio2->outCodec = ( !format ) ? HB_CODEC_AAC : ( ( format == 3 ) ? HB_CODEC_VORBIS : HB_CODEC_MP3 ); HBListAdd( title->ripAudioList, audio2 ); } @@ -754,8 +765,10 @@ static void _RipDone( void * data, int result ); [fRipVideoMatrix setEnabled: YES]; [fRipTwoPassCheck setEnabled: YES]; +#if 0 /* Can't set Vorbis bitrate */ [fRipAudBitPopUp setEnabled: NO]; +#endif } else { @@ -954,6 +967,9 @@ static void _RipDone( void * data, int result ) [fRipInfoField setStringValue: @"MPEG4 encoder initialization failed"]; break; + default: + [fRipStatusField setStringValue: @"Error."]; + [fRipInfoField setStringValue: @"Unknown error"]; } } diff --git a/macosx/English.lproj/InfoPlist.strings b/macosx/English.lproj/InfoPlist.strings Binary files differindex 64540600c..8040503df 100644 --- a/macosx/English.lproj/InfoPlist.strings +++ b/macosx/English.lproj/InfoPlist.strings diff --git a/macosx/English.lproj/MainMenu.nib/info.nib b/macosx/English.lproj/MainMenu.nib/info.nib index c578cde0a..fab934582 100644 --- a/macosx/English.lproj/MainMenu.nib/info.nib +++ b/macosx/English.lproj/MainMenu.nib/info.nib @@ -9,22 +9,21 @@ <key>29</key> <string>297 654 165 44 0 0 1440 878 </string> <key>556</key> - <string>309 129 417 306 0 0 1440 878 </string> + <string>130 59 470 306 0 0 1440 878 </string> <key>583</key> <string>650 499 144 171 0 0 1440 878 </string> <key>689</key> - <string>513 258 418 610 0 0 1440 878 </string> + <string>513 258 470 610 0 0 1440 878 </string> </dict> <key>IBFramework Version</key> <string>349.0</string> <key>IBOpenObjects</key> <array> - <integer>434</integer> + <integer>29</integer> <integer>365</integer> - <integer>583</integer> + <integer>434</integer> <integer>21</integer> - <integer>689</integer> - <integer>29</integer> + <integer>583</integer> </array> <key>IBSystem Version</key> <string>7D24</string> diff --git a/macosx/English.lproj/MainMenu.nib/objects.nib b/macosx/English.lproj/MainMenu.nib/objects.nib Binary files differindex 7990b4e2c..ba5fa1e5e 100644 --- a/macosx/English.lproj/MainMenu.nib/objects.nib +++ b/macosx/English.lproj/MainMenu.nib/objects.nib diff --git a/macosx/HandBrake.xcode/project.pbxproj b/macosx/HandBrake.xcode/project.pbxproj index 1ecef4736..9c1b883bd 100644 --- a/macosx/HandBrake.xcode/project.pbxproj +++ b/macosx/HandBrake.xcode/project.pbxproj @@ -279,7 +279,7 @@ HEADER_SEARCH_PATHS = ""; LIBRARY_SEARCH_PATHS = "../core ../contrib/liba52 ../contrib/libavcodec ../contrib/libdvdcss ../contrib/libdvdplay ../contrib/libdvdread ../contrib/libfaac ../contrib/libmp3lame ../contrib/libmp4v2 ../contrib/libmpeg2 ../contrib/libogg ../contrib/libvorbis ../contrib/libx264 ../contrib/libxvidcore"; OPTIMIZATION_CFLAGS = "-O3"; - OTHER_CFLAGS = "-DHB_MACOSX"; + OTHER_CFLAGS = ""; OTHER_LDFLAGS = ""; PRODUCT_NAME = HandBrake; SECTORDER_FLAGS = ""; @@ -301,7 +301,7 @@ <key>CFBundleExecutable</key> <string>HandBrake</string> <key>CFBundleGetInfoString</key> - <string>HandBrake 0.6.0-test1+ - By Eric Petit <[email protected]></string> + <string>HandBrake 0.6.0-test3 - By Eric Petit <[email protected]></string> <key>CFBundleIconFile</key> <string>HandBrake.icns</string> <key>CFBundleIdentifier</key> @@ -313,11 +313,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>0.6.0-test1+</string> + <string>0.6.0-test3</string> <key>CFBundleSignature</key> <string>HB##</string> <key>CFBundleVersion</key> - <string>0.6.0-test1+</string> + <string>0.6.0-test3</string> <key>NSMainNibFile</key> <string>MainMenu</string> <key>NSPrincipalClass</key> diff --git a/macosx/PictureGLView.mm b/macosx/PictureGLView.mm index de755cba7..dbb641729 100644 --- a/macosx/PictureGLView.mm +++ b/macosx/PictureGLView.mm @@ -1,4 +1,4 @@ -/* $Id: PictureGLView.mm,v 1.4 2004/02/23 18:08:41 titer Exp $ +/* $Id: PictureGLView.mm,v 1.6 2004/03/08 12:39:49 titer Exp $ This file is part of the HandBrake source code. Homepage: <http://handbrake.m0k.org/>. @@ -49,7 +49,7 @@ uint8_t * truc; uint8_t * in = tmp; uint8_t * out = fPicture + 4 * ( fTitle->outWidthMax + 2 ) * ( fTitle->outHeightMax + 1 ); - for( int i = 0; i < fTitle->outHeightMax + 2; i++ ) + for( int i = fTitle->outHeightMax + 2; i--; ) { memcpy( out, in, 4 * ( fTitle->outWidthMax + 2 ) ); in += 4 * ( fTitle->outWidthMax + 2 ); @@ -59,14 +59,10 @@ uint8_t * truc; /* ARGB -> RGBA */ uint32_t * p = (uint32_t*) fPicture; - for( int i = 0; - i < ( fTitle->outHeightMax + 2 ) * ( fTitle->outWidthMax + 2 ); - i++ ) + for( int i = ( fTitle->outHeightMax + 2 ) * + ( fTitle->outWidthMax + 2 ); i--; ) { - *(p++) = ( ( (*p) & 0xff000000 ) >> 24 ) | - ( ( (*p) & 0x00ff0000 ) << 8 ) | - ( ( (*p) & 0x0000ff00 ) << 8 ) | - ( ( (*p) & 0x000000ff ) << 8 ); + *(p++) = ( ( (*p) & 0x00FFFFFF ) << 8 ) | 0xFF; } if( how == HB_ANIMATE_NONE ) @@ -77,7 +73,7 @@ uint8_t * truc; in = fOldPicture; out = truc; - for( int i = 0; i < fTitle->outHeightMax + 2; i++ ) + for( int i = fTitle->outHeightMax + 2; i--; ) { memcpy( out, in, ( fTitle->outWidthMax + 2 ) * 4 ); in += ( fTitle->outWidthMax + 2 ) * 4; @@ -92,7 +88,7 @@ uint8_t * truc; in = fPicture; out = truc; - for( int i = 0; i < fTitle->outHeightMax + 2; i++ ) + for( int i = fTitle->outHeightMax + 2; i--; ) { memcpy( out, in, ( fTitle->outWidthMax + 2 ) * 4 ); in += ( fTitle->outWidthMax + 2 ) * 4; @@ -113,8 +109,8 @@ uint8_t * truc; glDepthFunc( GL_LEQUAL ); glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); -#define ANIMATION_TIME 1000000 -#define FRAME_PER_SEC 30 +#define ANIMATION_TIME 500000 +#define FRAME_PER_SEC 50 rotation = 0.0; float w = ( how == HB_ANIMATE_LEFT ) ? 1.0 : -1.0; @@ -125,7 +121,6 @@ uint8_t * truc; date = HBGetDate(); translation = - PROUT - cos( rotation * M_PI / 180 ) * ( 1 + w * tan( rotation * M_PI / 180 ) ); - [self drawAnimation: how]; rotation += w * 90 * 1000000 / ANIMATION_TIME / FRAME_PER_SEC; @@ -134,7 +129,7 @@ uint8_t * truc; break; } - wait = ANIMATION_TIME / 90 - ( HBGetDate() - date ); + wait = 1000000 / FRAME_PER_SEC - ( HBGetDate() - date ); if( wait > 0 ) { HBSnooze( wait ); @@ -194,8 +189,11 @@ uint8_t * truc; [[self openGLContext] update]; bounds = [self bounds]; - glViewport( 0, 0, (GLsizei) bounds.size.width, - (GLsizei) bounds.size.height ); + if( fTitle ) + { + glViewport( 0, 0, fTitle->outWidthMax + 2, + fTitle->outHeightMax + 2 ); + } } - (void) drawAnimation: (int) how diff --git a/macosx/i18n/nl.strings b/macosx/i18n/nl.strings Binary files differnew file mode 100644 index 000000000..71ad84e66 --- /dev/null +++ b/macosx/i18n/nl.strings |