]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/ConvertAndSave.m
macosx: add option to hide effects button in control bar
[vlc] / modules / gui / macosx / ConvertAndSave.m
index f504d3c0bb98d38bf36eb0a5c08d44cb28bc7747..f4ff7e0bccff53858731249e952ca3126e6c1ee9 100644 (file)
@@ -146,8 +146,8 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 
 - (void)awakeFromNib
 {
-    [_window setTitle: _NS("Convert & Save")];
-    [_ok_btn setTitle: _NS("Save")];
+    [_window setTitle: _NS("Convert & Stream")];
+    [_ok_btn setTitle: _NS("Go!")];
     [_drop_lbl setStringValue: _NS("Drop media here")];
     [_drop_btn setTitle: _NS("Open media...")];
     [_profile_lbl setStringValue: _NS("Choose Profile")];
@@ -273,7 +273,18 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
 
 - (IBAction)finalizePanel:(id)sender
 {
-    // HTTP, TODO: mux checking, since only MPEG PS, MPEG TS, MPEG 1, OGG, RAW and ASF are allowed
+    if (b_streaming) {
+        if ([[[_stream_type_pop selectedItem] title] isEqualToString:@"HTTP"]) {
+            NSString *muxformat = [self.currentProfile objectAtIndex:0];
+            if ([muxformat isEqualToString:@"wav"] || [muxformat isEqualToString:@"mov"] || [muxformat isEqualToString:@"mp4"] || [muxformat isEqualToString:@"mkv"]) {
+                NSBeginInformationalAlertSheet(_NS("Invalid container format for HTTP streaming"), _NS("OK"), @"", @"", _window,
+                                               nil, nil, nil, nil,
+                                               _NS("Media encapsulated as %@ cannot be streamed through the HTTP protocol for technical reasons."),
+                                               [[self currentEncapsulationFormatAsFileExtension:YES] uppercaseString]);
+                return;
+            }
+        }
+    }
 
     playlist_t * p_playlist = pl_Get(VLCIntf);
 
@@ -452,6 +463,13 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
     [labelContent release];
 
     /* catch obvious errors */
+    if (![[_stream_address_fld stringValue] length] > 0) {
+        NSBeginInformationalAlertSheet(_NS("No Address given"),
+                                       _NS("OK"), @"", @"", _stream_panel, nil, nil, nil, nil,
+                                       @"%@", _NS("In order to stream, a valid destination address is required."));
+        return;
+    }
+
     if ([_stream_sap_ckb state] && ![[_stream_channel_fld stringValue] length] > 0) {
         NSBeginInformationalAlertSheet(_NS("No Channel Name given"),
                                        _NS("OK"), @"", @"", _stream_panel, nil, nil, nil, nil,
@@ -884,7 +902,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
         [composedOptions appendFormat:@"}:standard{mux=%@", [self.currentProfile objectAtIndex:0]];
 
         // add output destination
-        [composedOptions appendFormat:@",dst=%@,access=file}", _outputDestination];
+        [composedOptions appendFormat:@",access=file{no-overwrite},dst=%@}", _outputDestination];
     } else {
         /* streaming */
         if ([[[_stream_type_pop selectedItem] title] isEqualToString:@"RTP"])