- (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")];
- (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);
[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,
[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"])