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 | |
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')
-rw-r--r-- | macosx/English.lproj/PicturePreview.xib | 29 | ||||
-rw-r--r-- | macosx/HBPreviewController.m | 31 |
2 files changed, 36 insertions, 24 deletions
diff --git a/macosx/English.lproj/PicturePreview.xib b/macosx/English.lproj/PicturePreview.xib index 030fa9e7e..56ad6bec0 100644 --- a/macosx/English.lproj/PicturePreview.xib +++ b/macosx/English.lproj/PicturePreview.xib @@ -2,9 +2,9 @@ <archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">1050</int> - <string key="IBDocument.SystemVersion">10F569</string> - <string key="IBDocument.InterfaceBuilderVersion">788</string> - <string key="IBDocument.AppKitVersion">1038.29</string> + <string key="IBDocument.SystemVersion">10K549</string> + <string key="IBDocument.InterfaceBuilderVersion">851</string> + <string key="IBDocument.AppKitVersion">1038.36</string> <string key="IBDocument.HIToolboxVersion">461.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -15,13 +15,13 @@ </object> <object class="NSMutableArray" key="dict.values"> <bool key="EncodedWithXMLCoder">YES</bool> - <string>788</string> - <string>1742</string> + <string>851</string> + <string>1783</string> </object> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="252"/> + <integer value="251"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -29,13 +29,8 @@ <string>com.apple.InterfaceBuilder.CocoaPlugin</string> </object> <object class="NSMutableDictionary" key="IBDocument.Metadata"> - <bool key="EncodedWithXMLCoder">YES</bool> - <object class="NSArray" key="dict.sortedKeys" id="0"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> - <object class="NSMutableArray" key="dict.values"> - <bool key="EncodedWithXMLCoder">YES</bool> - </object> + <string key="NS.key.0">PluginDependencyRecalculationVersion</string> + <integer value="1" key="NS.object.0"/> </object> <object class="NSMutableArray" key="IBDocument.RootObjects" id="273418435"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -242,7 +237,7 @@ <object class="NSTextField" id="66510867"> <reference key="NSNextResponder" ref="385854969"/> <int key="NSvFlags">289</int> - <string key="NSFrame">{{119, 14}, {75, 11}}</string> + <string key="NSFrame">{{101, 14}, {75, 11}}</string> <reference key="NSSuperview" ref="385854969"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="567286013"> @@ -273,7 +268,7 @@ <object class="NSPopUpButton" id="598619000"> <reference key="NSNextResponder" ref="385854969"/> <int key="NSvFlags">289</int> - <string key="NSFrame">{{198, 11}, {45, 15}}</string> + <string key="NSFrame">{{184, 11}, {58, 15}}</string> <reference key="NSSuperview" ref="385854969"/> <object class="NSArray" key="NSViewContentFilters"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -1118,7 +1113,9 @@ <bool key="EncodedWithXMLCoder">YES</bool> <object class="IBObjectRecord"> <int key="objectID">0</int> - <reference key="object" ref="0"/> + <object class="NSArray" key="object" id="0"> + <bool key="EncodedWithXMLCoder">YES</bool> + </object> <reference key="children" ref="273418435"/> <nil key="parent"/> </object> 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]; |