summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-06-23 23:41:24 +0000
committerdynaflash <[email protected]>2009-06-23 23:41:24 +0000
commit94a12232650e5f29a185d4f009308f297b49c3ae (patch)
tree6fe7d28b079e0884afa5b673052713c20d1c5439
parenta05dbea22e8d056bea0984887236207579f7af6c (diff)
MacGui: Preview - Add the foreign language search for subtitles scan to the live preview.
- Note: Its very possible that we are getting a full title scan for the foreign language search due to the observed time of the scan during the preview encode. Further testing probably necessary. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2609 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.mm8
-rw-r--r--macosx/HBPreviewController.mm26
2 files changed, 32 insertions, 2 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 4203c6746..63523dc1c 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -2862,7 +2862,7 @@ bool one_burned = FALSE;
/* NOTE: Currently foreign language search is borked for preview.
* Commented out but left in for initial commit. */
- /*
+
[self writeToActivityLog: "Foreign Language Search: %d", 1];
job->indepth_scan = 1;
@@ -2872,12 +2872,16 @@ bool one_burned = FALSE;
{
job->select_subtitle_config.dest = hb_subtitle_config_s::PASSTHRUSUB;
}
+ else
+ {
+ job->select_subtitle_config.dest = hb_subtitle_config_s::RENDERSUB;
+ }
job->select_subtitle_config.force = force;
job->select_subtitle_config.default_track = def;
}
- */
+
}
else
diff --git a/macosx/HBPreviewController.mm b/macosx/HBPreviewController.mm
index 29beeb290..052648de9 100644
--- a/macosx/HBPreviewController.mm
+++ b/macosx/HBPreviewController.mm
@@ -928,7 +928,33 @@ return YES;
/* lets go ahead and send it off to libhb
* Note: unlike a full encode, we only send 1 pass regardless if the final encode calls for 2 passes.
* this should suffice for a fairly accurate short preview and cuts our preview generation time in half.
+ * However we also need to take into account the indepth scan for subtitles.
*/
+ /*
+ * If scanning we need to do some extra setup of the job.
+ */
+ if( job->indepth_scan == 1 )
+ {
+ char *x264opts_tmp;
+
+ /*
+ * When subtitle scan is enabled do a fast pre-scan job
+ * which will determine which subtitles to enable, if any.
+ */
+ job->pass = -1;
+ x264opts_tmp = job->x264opts;
+
+ job->x264opts = NULL;
+ job->indepth_scan = 1;
+ /*
+ * Add the pre-scan job
+ */
+ hb_add( fPreviewLibhb, job );
+ job->x264opts = x264opts_tmp;
+ }
+ /* Go ahead and perform the actual encoding preview scan */
+ job->indepth_scan = 0;
+ job->pass = 0;
hb_add( fPreviewLibhb, job );
[fEncodingControlBox setHidden: NO];