diff options
author | dynaflash <[email protected]> | 2011-08-24 20:11:53 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2011-08-24 20:11:53 +0000 |
commit | f73206bf585737a16706b7445a7add49959bc6a3 (patch) | |
tree | 61dde88b494b581b4db52b24673a61a8f7f6822f /macosx/HBPreviewController.m | |
parent | 3ec16036e88c9f795631f44be2e2ee1042feeca3 (diff) |
MacGui: Live Preview ...
- Use the first subs track that has been specified to display in the live preview.
-- Tested against TX3G (3GPP) subs in mp4 and vobsubs in mkv.
- Also change Live Preview durations to less granular yet longer durations to: (seconds) 15, 30, 45, 60 90, 105 and 120.
- Subs patch by Rodeo. Thanks!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4193 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBPreviewController.m')
-rw-r--r-- | macosx/HBPreviewController.m | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index adacb8bf1..4d0826b1d 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -183,18 +183,13 @@ /* we set the preview length popup in seconds */ [fPreviewMovieLengthPopUp removeAllItems]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"5"]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"10"]; [fPreviewMovieLengthPopUp addItemWithTitle: @"15"]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"20"]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"25"]; [fPreviewMovieLengthPopUp addItemWithTitle: @"30"]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"35"]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"40"]; [fPreviewMovieLengthPopUp addItemWithTitle: @"45"]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"50"]; - [fPreviewMovieLengthPopUp addItemWithTitle: @"55"]; [fPreviewMovieLengthPopUp addItemWithTitle: @"60"]; + [fPreviewMovieLengthPopUp addItemWithTitle: @"90"]; + [fPreviewMovieLengthPopUp addItemWithTitle: @"105"]; + [fPreviewMovieLengthPopUp addItemWithTitle: @"120"]; /* adjust the preview slider length */ /* We use our advance pref to determine how many previews we scanned */ @@ -1206,6 +1201,26 @@ [fMoviePlaybackControlBox setHidden: NO]; [fPictureControlBox setHidden: YES]; + // get and enable subtitles + NSArray *subtitlesArray; + subtitlesArray = [aMovie tracksOfMediaType: @"sbtl"]; + if( subtitlesArray && [subtitlesArray count] ) + { + // enable the first TX3G subtitle track + [[subtitlesArray objectAtIndex: 0] setEnabled: YES]; + } + else + { + // Perian subtitles + subtitlesArray = [aMovie tracksOfMediaType: QTMediaTypeVideo]; + if( subtitlesArray && ( [subtitlesArray count] >= 2 ) ) + { + // track 0 should be video, other video tracks should + // be subtitles; force-enable the first subs track + [[subtitlesArray objectAtIndex: 1] setEnabled: YES]; + } + } + // to actually play the movie [self initPreviewScrubberForMovie]; |