From c43aa11ff657ed6c2f30af3fbac0cdb70cf5bf69 Mon Sep 17 00:00:00 2001 From: dynaflash Date: Sun, 30 Nov 2008 04:09:33 +0000 Subject: MacGui: Implement variable number of preview frames - Set in Preferences -> Advanced and defaulted to 10 - Allows for up to 20 previews per title for now. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1972 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/PictureController.mm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'macosx/PictureController.mm') diff --git a/macosx/PictureController.mm b/macosx/PictureController.mm index 6888e55f3..7ba284f83 100644 --- a/macosx/PictureController.mm +++ b/macosx/PictureController.mm @@ -91,6 +91,12 @@ [fPreviewMovieLengthPopUp addItemWithTitle: @"55"]; [fPreviewMovieLengthPopUp addItemWithTitle: @"60"]; + /* adjust the preview slider length */ + /* We use our advance pref to determine how many previews we scanned */ + int hb_num_previews = [[[NSUserDefaults standardUserDefaults] objectForKey:@"PreviewsNumber"] intValue]; + [fPictureSlider setMaxValue: hb_num_previews - 1.0]; + [fPictureSlider setNumberOfTickMarks: hb_num_previews]; + if ([[NSUserDefaults standardUserDefaults] objectForKey:@"PreviewLength"]) { [fPreviewMovieLengthPopUp selectItemWithTitle:[[NSUserDefaults standardUserDefaults] objectForKey:@"PreviewLength"]]; @@ -571,7 +577,10 @@ are maintained across different sources */ /* We now direct our preview encode to fPreviewMoviePath */ fTitle->job->file = [fPreviewMoviePath UTF8String]; + /* We use our advance pref to determine how many previews to scan */ + int hb_num_previews = [[[NSUserDefaults standardUserDefaults] objectForKey:@"PreviewsNumber"] intValue]; job->start_at_preview = fPicture + 1; + job->seek_points = hb_num_previews; /* we use the preview duration popup to get the specified * number of seconds for the preview encode. -- cgit v1.2.3