From: (no author) <(no author)@b64f7644-9d1e-0410-96f1-a4d463321fa5> Date: Mon, 1 Jan 2007 21:47:45 +0000 (+0000) Subject: -added Max Picture Width, options are 640 (default) and 320. X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=bcd6b0f47e73790107dca2890ffc70a4f71fde43;p=handbrake-jp%2Fhandbrake-jp-git.git -added Max Picture Width, options are 640 (default) and 320. -changed video bit rate to correspond to max width choice, 640x -> 1000, 320x ->500 -advanced IHB version to 1.0a2 git-svn-id: svn://localhost/HandBrake/trunk@78 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/English.lproj/Express.nib/classes.nib b/macosx/English.lproj/Express.nib/classes.nib index 0a71cdc6..3a057282 100644 --- a/macosx/English.lproj/Express.nib/classes.nib +++ b/macosx/English.lproj/Express.nib/classes.nib @@ -46,6 +46,7 @@ fConvertGoButton = NSButton; fConvertIndicator = NSProgressIndicator; fConvertInfoString = NSTextField; + fConvertMaxWidthPopUp = NSPopUpButton; fConvertOpenButton = NSButton; fConvertSubtitlePopUp = NSPopUpButton; fConvertTableView = NSTableView; diff --git a/macosx/English.lproj/Express.nib/info.nib b/macosx/English.lproj/Express.nib/info.nib index d110559a..f63c2715 100644 --- a/macosx/English.lproj/Express.nib/info.nib +++ b/macosx/English.lproj/Express.nib/info.nib @@ -9,7 +9,7 @@ 248 487 424 408 321 0 0 1440 878 259 - 516 332 408 508 0 0 1440 878 + 516 359 408 488 0 0 1440 878 29 33 298 338 44 0 0 1280 832 303 diff --git a/macosx/English.lproj/Express.nib/keyedobjects.nib b/macosx/English.lproj/Express.nib/keyedobjects.nib index 6653e701..b650bda9 100644 Binary files a/macosx/English.lproj/Express.nib/keyedobjects.nib and b/macosx/English.lproj/Express.nib/keyedobjects.nib differ diff --git a/macosx/Express.plist b/macosx/Express.plist index 35d6429f..262a7ec5 100644 --- a/macosx/Express.plist +++ b/macosx/Express.plist @@ -15,7 +15,7 @@ CFBundleSignature ???? CFBundleVersion - 1.0a1 + 1.0a2 NSMainNibFile Express NSPrincipalClass diff --git a/macosx/ExpressController.h b/macosx/ExpressController.h index 3cbe0b4d..5841f4e1 100644 --- a/macosx/ExpressController.h +++ b/macosx/ExpressController.h @@ -28,6 +28,7 @@ IBOutlet NSTableView * fConvertTableView; IBOutlet NSPopUpButton * fConvertFolderPopUp; IBOutlet NSPopUpButton * fConvertFormatPopUp; + IBOutlet NSPopUpButton * fConvertMaxWidthPopUp; IBOutlet NSPopUpButton * fConvertAspectPopUp; IBOutlet NSPopUpButton * fConvertAudioPopUp; IBOutlet NSPopUpButton * fConvertSubtitlePopUp; diff --git a/macosx/ExpressController.m b/macosx/ExpressController.m index 119d9eb5..406abe3f 100644 --- a/macosx/ExpressController.m +++ b/macosx/ExpressController.m @@ -201,22 +201,27 @@ hb_title_t * title = hb_list_item( fList, i ); hb_job_t * job = title->job; - int pixels, aspect; - pixels = 307200; - if( [fConvertAspectPopUp indexOfSelectedItem] == 0) - { - aspect = -1; - } - else + int pixels = 307200; + int aspect = title->aspect; + if( [fConvertAspectPopUp indexOfSelectedItem] == 1) { aspect = 4 * HB_ASPECT_BASE / 3; } + int maxwidth = 640; + job->vbitrate = 1000; + if( [fConvertMaxWidthPopUp indexOfSelectedItem] == 1) + { + maxwidth = 320; + job->vbitrate = 500; + } + job->deinterlace = 1; + do { hb_set_size( job, aspect, pixels ); pixels -= 10; - } while(job->width > 640); + } while(job->width > maxwidth); if( [fConvertFormatPopUp indexOfSelectedItem] == 0 ) { @@ -224,16 +229,12 @@ job->mux = HB_MUX_IPOD; job->vcodec = HB_VCODEC_X264; job->h264_level = 30; - job->vbitrate = 1000; - job->deinterlace = 1; } else if( [fConvertFormatPopUp indexOfSelectedItem] == 1 ) { /* iPod / MPEG-4 */ job->mux = HB_MUX_MP4; job->vcodec = HB_VCODEC_FFMPEG; - job->vbitrate = 1500; - job->deinterlace = 1; } else { @@ -507,6 +508,7 @@ [fConvertFolderPopUp setEnabled: b]; [fConvertFormatPopUp setEnabled: b]; [fConvertAspectPopUp setEnabled: b]; + [fConvertMaxWidthPopUp setEnabled: b]; [fConvertAudioPopUp setEnabled: b]; [fConvertSubtitlePopUp setEnabled: b]; [fConvertOpenButton setEnabled: b]; @@ -565,19 +567,34 @@ #undef p case HB_STATE_WORKDONE: - [timer invalidate]; - [fConvertInfoString setStringValue: @"Done."]; + { + [timer invalidate]; [fConvertIndicator setIndeterminate: NO]; [fConvertIndicator setDoubleValue: 0.0]; [self convertEnable: YES]; + +#define p s.param.workdone + switch(p.error) + { + case HB_ERROR_NONE: + [fConvertInfoString setStringValue: @"Done."]; + break; + case HB_ERROR_CANCELED: + [fConvertInfoString setStringValue: @"Canceled."]; + break; + case HB_ERROR_UNKNOWN: + [fConvertInfoString setStringValue: @"Unknown Error."]; + break; + } +#undef p - hb_job_t * job; + hb_job_t * job; while( ( job = hb_job( fHandle, 0 ) ) ) { hb_rem( fHandle, job ); } - break; - + break; + } default: break; }