]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/wizard.m
* added 2 boxes to the wizard to allow access to sout-transcode-soverlay with the...
[vlc] / modules / gui / macosx / wizard.m
index 90e668f439e63ee7e26affc7664d13d7253642c9..710b064ff2e76265d00f6120f15084a59cbce16d 100644 (file)
@@ -444,6 +444,7 @@ static VLCWizard *_o_sharedInstance = nil;
     [o_t6_btn_mrInfo_sap setTitle: _NS("More Info")];
     [o_t6_ckb_local setTitle: _NS("Local playback")];
     [o_t6_btn_mrInfo_local setTitle: _NS("More Info")];
+    [o_t6_ckb_soverlay setTitle: _NS("Add Subtitles to transcoded video")];
 
     /* page seven ("Transcode 2") */
     [o_t7_title setStringValue: _NS("Additional transcode options")];
@@ -452,6 +453,11 @@ static VLCWizard *_o_sharedInstance = nil;
     [o_t7_txt_saveFileTo setStringValue: _NS("Select the file to save to")];
     [o_t7_btn_chooseFile setTitle: _NS("Choose...")];
     [o_t7_ckb_local setTitle: _NS("Local playback")];
+    [o_t7_ckb_soverlay setTitle: _NS("Add Subtitles to transcoded video")];
+    [o_t7_ckb_soverlay setToolTip: _NS("Adds available subtitles directly to " \
+                                       "the video. These cannot be disabled " \
+                                       "by the receiving user as they become " \
+                                       "part of the image.")];
     [o_t7_btn_mrInfo_local setTitle: _NS("More Info")];
 
     /* page eight ("Summary") */
@@ -476,6 +482,8 @@ static VLCWizard *_o_sharedInstance = nil;
         stringByAppendingString: @":"]];
     [o_t8_txt_trnscdVideo setStringValue: [_NS("Transcode video") \
         stringByAppendingString: @":"]];
+    [o_t8_txt_soverlay setStringValue: [_NS("Include subtitles") \
+        stringByAppendingString: @":"]];
     [o_t8_txt_local setStringValue: [_NS("Local playback") \
         stringByAppendingString: @":"]];
 }
@@ -1143,6 +1151,11 @@ static VLCWizard *_o_sharedInstance = nil;
             [o_userSelections setObject:@"NO" forKey:@"localPb"];
         }
         
+        /* include subtitles? */
+        [o_userSelections setObject: 
+            [[NSNumber numberWithInt:[o_t6_ckb_soverlay state]] stringValue]
+                             forKey: @"soverlay"];
+        
         /* go to "Summary" */
         [self showSummary];
     }
@@ -1267,6 +1280,11 @@ static VLCWizard *_o_sharedInstance = nil;
                     [o_t7_fld_filePath stringValue]] forKey: @"trnscdFilePath"];
             }
 
+            /* include subtitles ? */
+            [o_userSelections setObject: 
+                [[NSNumber numberWithInt:[o_t7_ckb_soverlay state]] stringValue]
+                                 forKey: @"soverlay"];
+            
             /* go to "Summary" */
             [self showSummary];
         }
@@ -1405,6 +1423,12 @@ static VLCWizard *_o_sharedInstance = nil;
     {
         [o_t8_fld_trnscdVideo setStringValue: _NS("no")];
     }
+    
+    if ([[o_userSelections objectForKey:@"soverlay"] isEqualToString:@"1"])
+        [o_t8_fld_soverlay setStringValue: _NS("yes")];
+    else
+        [o_t8_fld_soverlay setStringValue: _NS("no")];
+    
     if ([[o_userSelections objectForKey:@"trnscdAudio"] isEqualToString:@"YES"])
     {
         [o_t8_fld_trnscdAudio setStringValue: [NSString stringWithFormat:
@@ -1418,7 +1442,6 @@ static VLCWizard *_o_sharedInstance = nil;
         [o_t8_fld_trnscdAudio setStringValue: _NS("no")];
     }
 
-
     if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"strmg"])
     {
         /* we are streaming and perhaps also transcoding */
@@ -1493,7 +1516,7 @@ static VLCWizard *_o_sharedInstance = nil;
                 [o_trnscdCmd appendString: @"}:"];
             }
         }
-    
+            
         /* check whether the user requested local playback. if yes, prepare the
          * string, if not, let it empty */
         if ([[o_userSelections objectForKey:@"localPb"] isEqualToString:@"YES"])
@@ -1572,6 +1595,10 @@ static VLCWizard *_o_sharedInstance = nil;
         {
             [o_opts_string appendString: @"\"}"];
         }
+        
+        /* add subtitles to the video if desired */
+        [o_opts_string appendFormat: @":sout-transcode-soverlay=%@", 
+                [o_userSelections objectForKey:@"soverlay"]];
 
         [tempArray addObject: o_opts_string];