Commit 70337297 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: upgrade read-only array initializations to the modern ObjC syntax

No functional changes
parent a7440cba
...@@ -379,7 +379,7 @@ static AppleRemote* sharedInstance=nil; ...@@ -379,7 +379,7 @@ static AppleRemote* sharedInstance=nil;
eventNumber= [NSNumber numberWithUnsignedInt:event]; eventNumber= [NSNumber numberWithUnsignedInt:event];
} }
[self performSelector: @selector(executeClickCountEvent:) [self performSelector: @selector(executeClickCountEvent:)
withObject: [NSArray arrayWithObjects:eventNumber, timeNumber, nil] withObject: @[eventNumber, timeNumber]
afterDelay: _maxClickTimeDifference]; afterDelay: _maxClickTimeDifference];
} else { } else {
[delegate appleRemoteButton:event pressedDown: pressedDown clickCount:1]; [delegate appleRemoteButton:event pressedDown: pressedDown clickCount:1];
......
...@@ -84,7 +84,7 @@ static VLCAudioEffects *_o_sharedInstance = nil; ...@@ -84,7 +84,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
NSString *defaultProfile = [NSString stringWithFormat:@"ZmxhdA==;;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%i", NSString *defaultProfile = [NSString stringWithFormat:@"ZmxhdA==;;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%i",
.0,25.,100.,-11.,8.,2.5,7.,.85,1.,.4,.5,.5,2.,0]; .0,25.,100.,-11.,8.,2.5,7.,.85,1.,.4,.5,.5,2.,0];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray arrayWithArray:workValues], @"EQValues", [NSArray arrayWithArray:workPreamp], @"EQPreampValues", [NSArray arrayWithArray:workTitles], @"EQTitles", [NSArray arrayWithArray:workNames], @"EQNames", [NSArray arrayWithObject:defaultProfile], @"AudioEffectProfiles", [NSArray arrayWithObject:_NS("Default")], @"AudioEffectProfileNames", nil]; NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray arrayWithArray:workValues], @"EQValues", [NSArray arrayWithArray:workPreamp], @"EQPreampValues", [NSArray arrayWithArray:workTitles], @"EQTitles", [NSArray arrayWithArray:workNames], @"EQNames", @[defaultProfile], @"AudioEffectProfiles", @[_NS("Default")], @"AudioEffectProfileNames", nil];
[defaults registerDefaults:appDefaults]; [defaults registerDefaults:appDefaults];
[workValues release]; [workValues release];
......
...@@ -217,18 +217,12 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -217,18 +217,12 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[self setProfileNames: [defaults arrayForKey:@"CASProfileNames"]]; [self setProfileNames: [defaults arrayForKey:@"CASProfileNames"]];
[self recreateProfilePopup]; [self recreateProfilePopup];
_videoCodecs = [[NSArray alloc] initWithObjects: _videoCodecs = @[@[@"MPEG-1", @"MPEG-2", @"MPEG-4", @"DIVX 1", @"DIVX 2", @"DIVX 3", @"H.263", @"H.264", @"VP8", @"WMV1", @"WMV2", @"M-JPEG", @"Theora", @"Dirac"],
[NSArray arrayWithObjects:@"MPEG-1", @"MPEG-2", @"MPEG-4", @"DIVX 1", @"DIVX 2", @"DIVX 3", @"H.263", @"H.264", @"VP8", @"WMV1", @"WMV2", @"M-JPEG", @"Theora", @"Dirac", nil], @[@"mpgv", @"mp2v", @"mp4v", @"DIV1", @"DIV2", @"DIV3", @"H263", @"h264", @"VP80", @"WMV1", @"WMV2", @"MJPG", @"theo", @"drac"]];
[NSArray arrayWithObjects:@"mpgv", @"mp2v", @"mp4v", @"DIV1", @"DIV2", @"DIV3", @"H263", @"h264", @"VP80", @"WMV1", @"WMV2", @"MJPG", @"theo", @"drac", nil], _audioCodecs = @[@[@"MPEG Audio", @"MP3", @"MPEG 4 Audio (AAC)", @"A52/AC-3", @"Vorbis", @"Flac", @"Speex", @"WAV", @"WMA2"],
nil]; @[@"mpga", @"mp3", @"mp4a", @"a52", @"vorb", @"flac", @"spx", @"s16l", @"wma2"]];
_audioCodecs = [[NSArray alloc] initWithObjects: _subsCodecs = @[@[@"DVB subtitle", @"T.140"],
[NSArray arrayWithObjects:@"MPEG Audio", @"MP3", @"MPEG 4 Audio (AAC)", @"A52/AC-3", @"Vorbis", @"Flac", @"Speex", @"WAV", @"WMA2", nil], @[@"dvbs", @"t140"]];
[NSArray arrayWithObjects:@"mpga", @"mp3", @"mp4a", @"a52", @"vorb", @"flac", @"spx", @"s16l", @"wma2", nil],
nil];
_subsCodecs = [[NSArray alloc] initWithObjects:
[NSArray arrayWithObjects:@"DVB subtitle", @"T.140", nil],
[NSArray arrayWithObjects:@"dvbs", @"t140", nil],
nil];
[_customize_vid_codec_pop removeAllItems]; [_customize_vid_codec_pop removeAllItems];
[_customize_vid_scale_pop removeAllItems]; [_customize_vid_scale_pop removeAllItems];
...@@ -430,7 +424,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -430,7 +424,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
[saveFilePanel setCanSelectHiddenExtension: YES]; [saveFilePanel setCanSelectHiddenExtension: YES];
[saveFilePanel setCanCreateDirectories: YES]; [saveFilePanel setCanCreateDirectories: YES];
if ([[_customize_encap_matrix selectedCell] tag] != RAW) // there is no clever guess for this if ([[_customize_encap_matrix selectedCell] tag] != RAW) // there is no clever guess for this
[saveFilePanel setAllowedFileTypes:[NSArray arrayWithObject:[self currentEncapsulationFormatAsFileExtension:YES]]]; [saveFilePanel setAllowedFileTypes:@[[self currentEncapsulationFormatAsFileExtension:YES]]];
[saveFilePanel beginSheetModalForWindow:_window completionHandler:^(NSInteger returnCode) { [saveFilePanel beginSheetModalForWindow:_window completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) { if (returnCode == NSOKButton) {
[self setOutputDestination:[[saveFilePanel URL] path]]; [self setOutputDestination:[[saveFilePanel URL] path]];
...@@ -530,7 +524,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -530,7 +524,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
NSSavePanel * saveFilePanel = [NSSavePanel savePanel]; NSSavePanel * saveFilePanel = [NSSavePanel savePanel];
[saveFilePanel setCanSelectHiddenExtension: YES]; [saveFilePanel setCanSelectHiddenExtension: YES];
[saveFilePanel setCanCreateDirectories: YES]; [saveFilePanel setCanCreateDirectories: YES];
[saveFilePanel setAllowedFileTypes:[NSArray arrayWithObject:@"sdp"]]; [saveFilePanel setAllowedFileTypes:@[@"sdp"]];
[saveFilePanel beginSheetModalForWindow:_stream_panel completionHandler:^(NSInteger returnCode) { [saveFilePanel beginSheetModalForWindow:_stream_panel completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) if (returnCode == NSOKButton)
[_stream_sdp_fld setStringValue:[[saveFilePanel URL] path]]; [_stream_sdp_fld setStringValue:[[saveFilePanel URL] path]];
...@@ -540,7 +534,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -540,7 +534,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{ {
NSPasteboard *paste = [sender draggingPasteboard]; NSPasteboard *paste = [sender draggingPasteboard];
NSArray *types = [NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]; NSArray *types = @[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"];
NSString *desired_type = [paste availableTypeFromArray: types]; NSString *desired_type = [paste availableTypeFromArray: types];
NSData *carried_data = [paste dataForType: desired_type]; NSData *carried_data = [paste dataForType: desired_type];
...@@ -1004,7 +998,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -1004,7 +998,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [self registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
...@@ -1070,7 +1064,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -1070,7 +1064,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [self registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
...@@ -1099,7 +1093,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil; ...@@ -1099,7 +1093,7 @@ static VLCConvertAndSave *_o_sharedInstance = nil;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [self registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
......
...@@ -551,7 +551,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil; ...@@ -551,7 +551,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{ {
NSPasteboard *o_paste = [sender draggingPasteboard]; NSPasteboard *o_paste = [sender draggingPasteboard];
NSArray *o_types = [NSArray arrayWithObject: NSFilenamesPboardType]; NSArray *o_types = @[NSFilenamesPboardType];
NSString *o_desired_type = [o_paste availableTypeFromArray:o_types]; NSString *o_desired_type = [o_paste availableTypeFromArray:o_types];
NSData *o_carried_data = [o_paste dataForType:o_desired_type]; NSData *o_carried_data = [o_paste dataForType:o_desired_type];
BOOL b_autoplay = config_GetInt(VLCIntf, "macosx-autoplay"); BOOL b_autoplay = config_GetInt(VLCIntf, "macosx-autoplay");
......
...@@ -77,8 +77,8 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -77,8 +77,8 @@ static VLCMainMenu *_o_sharedInstance = nil;
_NS("URI"), URI_COLUMN, _NS("URI"), URI_COLUMN,
nil]; nil];
// this array also assigns tags (index) to type of menu item // this array also assigns tags (index) to type of menu item
o_ptc_menuorder = [NSArray arrayWithObjects:TRACKNUM_COLUMN, TITLE_COLUMN, ARTIST_COLUMN, DURATION_COLUMN, o_ptc_menuorder = @[TRACKNUM_COLUMN, TITLE_COLUMN, ARTIST_COLUMN, DURATION_COLUMN,
GENRE_COLUMN, ALBUM_COLUMN, DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN, nil]; GENRE_COLUMN, ALBUM_COLUMN, DESCRIPTION_COLUMN, DATE_COLUMN, LANGUAGE_COLUMN, URI_COLUMN];
} }
return _o_sharedInstance; return _o_sharedInstance;
...@@ -925,7 +925,7 @@ static VLCMainMenu *_o_sharedInstance = nil; ...@@ -925,7 +925,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
[openPanel setCanChooseFiles: YES]; [openPanel setCanChooseFiles: YES];
[openPanel setCanChooseDirectories: NO]; [openPanel setCanChooseDirectories: NO];
[openPanel setAllowsMultipleSelection: YES]; [openPanel setAllowsMultipleSelection: YES];
[openPanel setAllowedFileTypes: [NSArray arrayWithObjects: @"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil", nil]]; [openPanel setAllowedFileTypes: @[@"cdg",@"@idx",@"srt",@"sub",@"utf",@"ass",@"ssa",@"aqt",@"jss",@"psb",@"rt",@"smi",@"txt",@"smil"]];
[openPanel setDirectoryURL:[NSURL fileURLWithPath:[[NSString stringWithUTF8String:path] stringByExpandingTildeInPath]]]; [openPanel setDirectoryURL:[NSURL fileURLWithPath:[[NSString stringWithUTF8String:path] stringByExpandingTildeInPath]]];
i_returnValue = [openPanel runModal]; i_returnValue = [openPanel runModal];
free(path); free(path);
......
...@@ -296,7 +296,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -296,7 +296,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
free(ppsz_longnames); free(ppsz_longnames);
free(p_categories); free(p_categories);
[libraryItem setChildren: [NSArray arrayWithObjects: playlistItem, medialibraryItem, nil]]; [libraryItem setChildren: @[playlistItem, medialibraryItem]];
[o_sidebaritems addObject: libraryItem]; [o_sidebaritems addObject: libraryItem];
if ([mycompItem hasChildren]) if ([mycompItem hasChildren])
[o_sidebaritems addObject: mycompItem]; [o_sidebaritems addObject: mycompItem];
...@@ -310,7 +310,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -310,7 +310,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[o_sidebar_view reloadData]; [o_sidebar_view reloadData];
[o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO]; [o_sidebar_view selectRowIndexes:[NSIndexSet indexSetWithIndex:1] byExtendingSelection:NO];
[o_sidebar_view setDropItem:playlistItem dropChildIndex:NSOutlineViewDropOnItemIndex]; [o_sidebar_view setDropItem:playlistItem dropChildIndex:NSOutlineViewDropOnItemIndex];
[o_sidebar_view registerForDraggedTypes:[NSArray arrayWithObjects: NSFilenamesPboardType, @"VLCPlaylistItemPboardType", nil]]; [o_sidebar_view registerForDraggedTypes:@[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
[o_sidebar_view setAutosaveName:@"mainwindow-sidebar"]; [o_sidebar_view setAutosaveName:@"mainwindow-sidebar"];
[(PXSourceList *)o_sidebar_view setDataSource:self]; [(PXSourceList *)o_sidebar_view setDataSource:self];
...@@ -836,7 +836,7 @@ static VLCMainWindow *_o_sharedInstance = nil; ...@@ -836,7 +836,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
[dict setObject:self forKey:NSViewAnimationTargetKey]; [dict setObject:self forKey:NSViewAnimationTargetKey];
[dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey]; [dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
o_makekey_anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict]]; o_makekey_anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
[dict release]; [dict release];
[o_makekey_anim setAnimationBlockingMode: NSAnimationNonblocking]; [o_makekey_anim setAnimationBlockingMode: NSAnimationNonblocking];
......
...@@ -131,28 +131,26 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv ...@@ -131,28 +131,26 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv
+ (NSArray*)defaultMediaKeyUserBundleIdentifiers; + (NSArray*)defaultMediaKeyUserBundleIdentifiers;
{ {
return [NSArray arrayWithObjects: return @[[[NSBundle mainBundle] bundleIdentifier], // your app
[[NSBundle mainBundle] bundleIdentifier], // your app @"com.spotify.client",
@"com.spotify.client", @"com.apple.iTunes",
@"com.apple.iTunes", @"com.apple.QuickTimePlayerX",
@"com.apple.QuickTimePlayerX", @"com.apple.quicktimeplayer",
@"com.apple.quicktimeplayer", @"com.apple.iWork.Keynote",
@"com.apple.iWork.Keynote", @"com.apple.iPhoto",
@"com.apple.iPhoto", @"org.videolan.vlc",
@"org.videolan.vlc", @"com.apple.Aperture",
@"com.apple.Aperture", @"com.plexsquared.Plex",
@"com.plexsquared.Plex", @"com.soundcloud.desktop",
@"com.soundcloud.desktop", @"org.niltsh.MPlayerX",
@"org.niltsh.MPlayerX", @"com.ilabs.PandorasHelper",
@"com.ilabs.PandorasHelper", @"com.mahasoftware.pandabar",
@"com.mahasoftware.pandabar", @"com.bitcartel.pandorajam",
@"com.bitcartel.pandorajam", @"org.clementine-player.clementine",
@"org.clementine-player.clementine", @"fm.last.Last.fm",
@"fm.last.Last.fm", @"com.beatport.BeatportPro",
@"com.beatport.BeatportPro", @"com.Timenut.SongKey",
@"com.Timenut.SongKey", @"com.macromedia.fireworks", // the tap messes up their mouse input
@"com.macromedia.fireworks", // the tap messes up their mouse input
nil
]; ];
} }
......
...@@ -54,7 +54,8 @@ static VLCVideoEffects *_o_sharedInstance = nil; ...@@ -54,7 +54,8 @@ static VLCVideoEffects *_o_sharedInstance = nil;
+ (void)initialize + (void)initialize
{ {
NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:[NSArray arrayWithObject:@";;;0;1.000000;1.000000;1.000000;1.000000;0.050000;16;2.000000;OTA=;4;4;0;16711680;20;15;120;Z3JhZGllbnQ=;1;0;16711680;6;80;VkxD;-1;;-1;255;2;3;3"], @"VideoEffectProfiles", [NSArray arrayWithObject:_NS("Default")], @"VideoEffectProfileNames", nil]; NSDictionary *appDefaults = [NSDictionary dictionaryWithObjectsAndKeys:@[@";;;0;1.000000;1.000000;1.000000;1.000000;0.050000;16;2.000000;OTA=;4;4;0;16711680;20;15;120;Z3JhZGllbnQ=;1;0;16711680;6;80;VkxD;-1;;-1;255;2;3;3"], @"VideoEffectProfiles",
@[_NS("Default")], @"VideoEffectProfileNames", nil];
[[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults]; [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
-(id)initWithFrame:(NSRect)frameRect -(id)initWithFrame:(NSRect)frameRect
{ {
if (self = [super initWithFrame:frameRect]) { if (self = [super initWithFrame:frameRect]) {
[self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]]; [self registerForDraggedTypes:@[NSFilenamesPboardType]];
} }
i_lastScrollWheelDirection = 0; i_lastScrollWheelDirection = 0;
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
[dict setObject:self forKey:NSViewAnimationTargetKey]; [dict setObject:self forKey:NSViewAnimationTargetKey];
[dict setObject:NSViewAnimationFadeOutEffect forKey:NSViewAnimationEffectKey]; [dict setObject:NSViewAnimationFadeOutEffect forKey:NSViewAnimationEffectKey];
anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict, nil]]; anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
[dict release]; [dict release];
[anim setAnimationBlockingMode:NSAnimationNonblocking]; [anim setAnimationBlockingMode:NSAnimationNonblocking];
...@@ -176,7 +176,7 @@ ...@@ -176,7 +176,7 @@
[dict setObject:self forKey:NSViewAnimationTargetKey]; [dict setObject:self forKey:NSViewAnimationTargetKey];
[dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey]; [dict setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
anim = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict, nil]]; anim = [[NSViewAnimation alloc] initWithViewAnimations:@[dict]];
[dict release]; [dict release];
[anim setAnimationBlockingMode:NSAnimationNonblocking]; [anim setAnimationBlockingMode:NSAnimationNonblocking];
...@@ -859,8 +859,8 @@ ...@@ -859,8 +859,8 @@
- Keep at most 2 animation at a time - Keep at most 2 animation at a time
- leaveFullscreen/enterFullscreen are the only responsible for releasing and alloc-ing - leaveFullscreen/enterFullscreen are the only responsible for releasing and alloc-ing
*/ */
o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict1]]; o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict1]];
o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObject:dict2]]; o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict2]];
[dict1 release]; [dict1 release];
[dict2 release]; [dict2 release];
...@@ -978,7 +978,7 @@ ...@@ -978,7 +978,7 @@
[dict2 setObject:self forKey:NSViewAnimationTargetKey]; [dict2 setObject:self forKey:NSViewAnimationTargetKey];
[dict2 setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey]; [dict2 setObject:NSViewAnimationFadeInEffect forKey:NSViewAnimationEffectKey];
o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict2, nil]]; o_fullscreen_anim2 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict2]];
[dict2 release]; [dict2 release];
[o_fullscreen_anim2 setAnimationBlockingMode: NSAnimationNonblocking]; [o_fullscreen_anim2 setAnimationBlockingMode: NSAnimationNonblocking];
...@@ -993,7 +993,7 @@ ...@@ -993,7 +993,7 @@
[dict1 setObject:[NSValue valueWithRect:[o_fullscreen_window frame]] forKey:NSViewAnimationStartFrameKey]; [dict1 setObject:[NSValue valueWithRect:[o_fullscreen_window frame]] forKey:NSViewAnimationStartFrameKey];
[dict1 setObject:[NSValue valueWithRect:frame] forKey:NSViewAnimationEndFrameKey]; [dict1 setObject:[NSValue valueWithRect:frame] forKey:NSViewAnimationEndFrameKey];
o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:[NSArray arrayWithObjects:dict1, nil]]; o_fullscreen_anim1 = [[NSViewAnimation alloc] initWithViewAnimations:@[dict1]];
[dict1 release]; [dict1 release];
[o_fullscreen_anim1 setAnimationBlockingMode: NSAnimationNonblocking]; [o_fullscreen_anim1 setAnimationBlockingMode: NSAnimationNonblocking];
...@@ -1074,11 +1074,10 @@ ...@@ -1074,11 +1074,10 @@
static NSMutableArray *attributes = nil; static NSMutableArray *attributes = nil;
if (attributes == nil) { if (attributes == nil) {
attributes = [[super accessibilityAttributeNames] mutableCopy]; attributes = [[super accessibilityAttributeNames] mutableCopy];
NSArray *appendAttributes = [NSArray arrayWithObjects: NSAccessibilitySubroleAttribute, NSArray *appendAttributes = @[NSAccessibilitySubroleAttribute,
NSAccessibilityCloseButtonAttribute, NSAccessibilityCloseButtonAttribute,
NSAccessibilityMinimizeButtonAttribute, NSAccessibilityMinimizeButtonAttribute,
NSAccessibilityZoomButtonAttribute, NSAccessibilityZoomButtonAttribute];
nil];
for(NSString *attribute in appendAttributes) { for(NSString *attribute in appendAttributes) {
if (![attributes containsObject:attribute]) if (![attributes containsObject:attribute])
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
if (o_url != nil) if (o_url != nil)
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: o_url]; [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: o_url];
NSMutableArray *o_result = [NSMutableArray arrayWithObject:[NSDictionary dictionaryWithObject:o_urlString forKey:@"ITEM_URL"]]; NSArray *o_result = @[[NSDictionary dictionaryWithObject:o_urlString forKey: @"ITEM_URL"]];
if (b_autoplay) if (b_autoplay)
[[[VLCMain sharedInstance] playlist] appendArray: o_result atPos: -1 enqueue: NO]; [[[VLCMain sharedInstance] playlist] appendArray: o_result atPos: -1 enqueue: NO];
......
...@@ -1868,7 +1868,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1868,7 +1868,7 @@ static VLCMain *_o_sharedMainInstance = nil;
return; return;
} }
NSArray * ourPreferences = [NSArray arrayWithObjects:@"org.videolan.vlc.plist", @"VLC", @"org.videolan.vlc", nil]; NSArray * ourPreferences = @[@"org.videolan.vlc.plist", @"VLC", @"org.videolan.vlc"];
/* Move the file to trash so that user can find them later */ /* Move the file to trash so that user can find them later */
[[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:preferences destination:nil files:ourPreferences tag:0]; [[NSWorkspace sharedWorkspace] performFileOperation:NSWorkspaceRecycleOperation source:preferences destination:nil files:ourPreferences tag:0];
...@@ -1982,7 +1982,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1982,7 +1982,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[saveFolderPanel setCanSelectHiddenExtension: NO]; [saveFolderPanel setCanSelectHiddenExtension: NO];
[saveFolderPanel setCanCreateDirectories: YES]; [saveFolderPanel setCanCreateDirectories: YES];
[saveFolderPanel setAllowedFileTypes: [NSArray arrayWithObject:@"rtf"]]; [saveFolderPanel setAllowedFileTypes: @[@"rtf"]];
[saveFolderPanel setNameFieldStringValue:[NSString stringWithFormat: _NS("VLC Debug Log (%s).rtf"), VERSION_MESSAGE]]; [saveFolderPanel setNameFieldStringValue:[NSString stringWithFormat: _NS("VLC Debug Log (%s).rtf"), VERSION_MESSAGE]];
[saveFolderPanel beginSheetModalForWindow: o_msgs_panel completionHandler:^(NSInteger returnCode) { [saveFolderPanel beginSheetModalForWindow: o_msgs_panel completionHandler:^(NSInteger returnCode) {
if (returnCode == NSOKButton) { if (returnCode == NSOKButton) {
......
...@@ -302,7 +302,7 @@ static NSMutableArray *blackoutWindows = NULL; ...@@ -302,7 +302,7 @@ static NSMutableArray *blackoutWindows = NULL;
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]]; [self registerForDraggedTypes:@[NSFilenamesPboardType]];
[self setImageScaling: NSScaleToFit]; [self setImageScaling: NSScaleToFit];
[self setImageFrameStyle: NSImageFrameNone]; [self setImageFrameStyle: NSImageFrameNone];
[self setImageAlignment: NSImageAlignCenter]; [self setImageAlignment: NSImageAlignCenter];
...@@ -756,7 +756,7 @@ void _drawFrameInRect(NSRect frameRect) ...@@ -756,7 +756,7 @@ void _drawFrameInRect(NSRect frameRect)
- (void)awakeFromNib - (void)awakeFromNib
{ {
[self registerForDraggedTypes:[NSArray arrayWithObject: NSFilenamesPboardType]]; [self registerForDraggedTypes:@[NSFilenamesPboardType]];
} }
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
......
...@@ -514,9 +514,9 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -514,9 +514,9 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* apply the options to our item(s) */ /* apply the options to our item(s) */
[o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"]; [o_dic setObject: (NSArray *)[o_options copy] forKey: @"ITEM_OPTIONS"];
if (b_autoplay) if (b_autoplay)
[[[VLCMain sharedInstance] playlist] appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:NO]; [[[VLCMain sharedInstance] playlist] appendArray: @[o_dic] atPos: -1 enqueue:NO];
else else
[[[VLCMain sharedInstance] playlist] appendArray: [NSArray arrayWithObject: o_dic] atPos: -1 enqueue:YES]; [[[VLCMain sharedInstance] playlist] appendArray: @[o_dic] atPos: -1 enqueue:YES];
} }
} }
...@@ -1106,7 +1106,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -1106,7 +1106,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
/* work-around for Mountain Lion, which treats folders called "BDMV" including an item named "INDEX.BDM" /* work-around for Mountain Lion, which treats folders called "BDMV" including an item named "INDEX.BDM"
* as a _FILE_. Don't ask, move on. There is nothing to see here */ * as a _FILE_. Don't ask, move on. There is nothing to see here */
[o_open_panel setCanChooseFiles: YES]; [o_open_panel setCanChooseFiles: YES];
[o_open_panel setAllowedFileTypes:[NSArray arrayWithObjects:@"public.directory", nil]]; [o_open_panel setAllowedFileTypes:@[@"public.directory"]];
if ([o_open_panel runModal] == NSOKButton) { if ([o_open_panel runModal] == NSOKButton) {
NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path]; NSString *o_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
......
...@@ -112,17 +112,17 @@ ...@@ -112,17 +112,17 @@
- (void)initStrings - (void)initStrings
{ {
NSArray *o_muxers = [NSArray arrayWithObjects: @"MPEG TS", @"MPEG PS", @"MPEG 1", NSArray *o_muxers = @[@"MPEG TS", @"MPEG PS", @"MPEG 1",
@"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", @"Raw", nil]; @"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", @"Raw"];
NSArray *o_a_channels = [NSArray arrayWithObjects: @"1", @"2", @"4", @"6", nil]; NSArray *o_a_channels = @[@"1", @"2", @"4", @"6"];
NSArray *o_a_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96", NSArray *o_a_bitrates = @[@"16", @"32", @"64", @"96",
@"128", @"192", @"256", @"512", nil]; @"128", @"192", @"256", @"512"];
NSArray *o_v_bitrates = [NSArray arrayWithObjects: @"16", @"32", @"64", @"96", NSArray *o_v_bitrates = @[@"16", @"32", @"64", @"96",
@"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072", nil]; @"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072"];
NSArray *o_v_scales = [NSArray arrayWithObjects: @"0.25",@"0.5",@"0.75",@"1",@"1.25",@"1.5",@"1.75",@"2",nil]; NSArray *o_v_scales = @[@"0.25",@"0.5",@"0.75",@"1",@"1.25",@"1.5",@"1.75",@"2"];
NSArray *o_a_codecs = [NSArray arrayWithObjects: @"mpga", @"mp3 ", @"mp4a", @"a52 ", @"vorb", @"flac", @"spx ", nil]; NSArray *o_a_codecs = @[@"mpga", @"mp3 ", @"mp4a", @"a52 ", @"vorb", @"flac", @"spx "];
NSArray *o_v_codecs = [NSArray arrayWithObjects: @"mp1v", @"mp2v", @"mp4v", @"DIV1", NSArray *o_v_codecs = @[@"mp1v", @"mp2v", @"mp4v", @"DIV1",
@"DIV2", @"DIV3", @"h263", @"h264", @"WMV1", @"WMV2", @"MJPG", @"theo", nil]; @"DIV2", @"DIV3", @"h263", @"h264", @"WMV1", @"WMV2", @"MJPG", @"theo"];
[o_output_ckbox setTitle: _NS("Streaming/Saving:")]; [o_output_ckbox setTitle: _NS("Streaming/Saving:")];
[o_output_settings setTitle: _NS("Settings...")]; [o_output_settings setTitle: _NS("Settings...")];
...@@ -340,13 +340,10 @@ ...@@ -340,13 +340,10 @@
if ([o_mode isEqualToString: _NS("File")]) { if ([o_mode isEqualToString: _NS("File")]) {
if ([o_dump_chkbox state] == NSOnState) { if ([o_dump_chkbox state] == NSOnState) {
NSMutableArray * o_sout_options; o_sout_options = @[@":demux=dump",
o_sout_options = [NSArray arrayWithObjects: [NSString stringWithFormat:
@":demux=dump", @":demuxdump-file=%@",
[NSString stringWithFormat: [o_file_field stringValue]]];
@":demuxdump-file=%@",
[o_file_field stringValue]],
nil];
[self setSoutMRL:o_sout_options]; [self setSoutMRL:o_sout_options];
return; return;
} else } else
...@@ -420,7 +417,7 @@ ...@@ -420,7 +417,7 @@
if ([o_display state] == NSOnState) if ([o_display state] == NSOnState)
[o_mrl_string appendString: @"}"]; [o_mrl_string appendString: @"}"];
o_sout_options = [NSArray arrayWithObjects: o_mrl_string,nil]; o_sout_options = @[o_mrl_string];
[self setSoutMRL:o_sout_options]; [self setSoutMRL:o_sout_options];
} }
......
...@@ -411,10 +411,10 @@ ...@@ -411,10 +411,10 @@
+ (void)initialize{ + (void)initialize{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSMutableArray * o_columnArray = [[NSMutableArray alloc] init]; NSMutableArray * o_columnArray = [[NSMutableArray alloc] init];
[o_columnArray addObject: [NSArray arrayWithObjects: TITLE_COLUMN, [NSNumber numberWithFloat: 190.], nil]]; [o_columnArray addObject: @[TITLE_COLUMN, @190.]];
[o_columnArray addObject: [NSArray arrayWithObjects: ARTIST_COLUMN, [NSNumber numberWithFloat: 95.], nil]]; [o_columnArray addObject: @[ARTIST_COLUMN, @95.]];
[o_columnArray addObject: [NSArray arrayWithObjects: DURATION_COLUMN, [NSNumber numberWithFloat: 95.], nil]]; [o_columnArray addObject: @[DURATION_COLUMN, @95.]];
NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:[NSArray arrayWithArray:o_columnArray] forKey:@"PlaylistColumnSelection"]; NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:[NSArray arrayWithArray:o_columnArray] forKey: @"PlaylistColumnSelection"];
[defaults registerDefaults:appDefaults]; [defaults registerDefaults:appDefaults];
[o_columnArray release]; [o_columnArray release];
...@@ -446,14 +446,10 @@ ...@@ -446,14 +446,10 @@
[o_outline_view setDoubleAction: @selector(playItem:)]; [o_outline_view setDoubleAction: @selector(playItem:)];
[o_outline_view_other setDoubleAction: @selector(playItem:)]; [o_outline_view_other setDoubleAction: @selector(playItem:)];
[o_outline_view registerForDraggedTypes: [o_outline_view registerForDraggedTypes: @[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
[NSArray arrayWithObjects: NSFilenamesPboardType,
@"VLCPlaylistItemPboardType", nil]];
[o_outline_view setIntercellSpacing: NSMakeSize (0.0, 1.0)]; [o_outline_view setIntercellSpacing: NSMakeSize (0.0, 1.0)];
[o_outline_view_other registerForDraggedTypes: [o_outline_view_other registerForDraggedTypes: @[NSFilenamesPboardType, @"VLCPlaylistItemPboardType"]];
[NSArray arrayWithObjects: NSFilenamesPboardType,
@"VLCPlaylistItemPboardType", nil]];
[o_outline_view_other setIntercellSpacing: NSMakeSize (0.0, 1.0)]; [o_outline_view_other setIntercellSpacing: NSMakeSize (0.0, 1.0)];
/* This uses a private API, but works fine on all current OSX releases. /* This uses a private API, but works fine on all current OSX releases.
...@@ -1374,7 +1370,7 @@ ...@@ -1374,7 +1370,7 @@
NSTableColumn * o_currentColumn; NSTableColumn * o_currentColumn;
for (NSUInteger i = 0; i < count; i++) { for (NSUInteger i = 0; i < count; i++) {
o_currentColumn = [o_columns objectAtIndex: i]; o_currentColumn = [o_columns objectAtIndex: i];
[o_arrayToSave addObject: [NSArray arrayWithObjects: [o_currentColumn identifier], [NSNumber numberWithFloat: [o_currentColumn width]], nil]]; [o_arrayToSave addObject: @[[o_currentColumn identifier], @([o_currentColumn width])]];
} }
[[NSUserDefaults standardUserDefaults] setObject: o_arrayToSave forKey:@"PlaylistColumnSelection"]; [[NSUserDefaults standardUserDefaults] setObject: o_arrayToSave forKey:@"PlaylistColumnSelection"];
[[NSUserDefaults standardUserDefaults] synchronize]; [[NSUserDefaults standardUserDefaults] synchronize];
...@@ -1424,8 +1420,7 @@ ...@@ -1424,8 +1420,7 @@
/* We add the "VLCPlaylistItemPboardType" type to be able to recognize /* We add the "VLCPlaylistItemPboardType" type to be able to recognize
a Drop operation coming from the playlist. */ a Drop operation coming from the playlist. */
[pboard declareTypes: [NSArray arrayWithObjects: [pboard declareTypes: @[@"VLCPlaylistItemPboardType"] owner: self];
@"VLCPlaylistItemPboardType", nil] owner: self];
[pboard setData:[NSData data] forType:@"VLCPlaylistItemPboardType"]; [pboard setData:[NSData data] forType:@"VLCPlaylistItemPboardType"];
return YES; return YES;
......
...@@ -2132,8 +2132,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2132,8 +2132,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
[o_tableColumn setDataCell: o_dataCell]; [o_tableColumn setDataCell: o_dataCell];
[o_tableColumn setWidth:s_rc.size.width - 34]; [o_tableColumn setWidth:s_rc.size.width - 34];
[o_tableview addTableColumn: o_tableColumn]; [o_tableview addTableColumn: o_tableColumn];
[o_tableview registerForDraggedTypes:[NSArray arrayWithObjects: [o_tableview registerForDraggedTypes:@[@"VLC media player module"]];
@"VLC media player module", nil]];
[o_tableview setDataSource:self]; [o_tableview setDataSource:self];
[o_tableview setTarget: self]; [o_tableview setTarget: self];
...@@ -2205,8 +2204,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2205,8 +2204,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
return NO; return NO;
} }
[pb declareTypes:[NSArray [pb declareTypes:@[@"VLC media player module"] owner:nil];
arrayWithObject:@"VLC media player module"] owner:nil];
[pb setPropertyList:rows forType:@"VLC media player module"]; [pb setPropertyList:rows forType:@"VLC media player module"];
return YES; return YES;
} }
......
...@@ -105,7 +105,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil; ...@@ -105,7 +105,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[o_hotkeys_listbox setDoubleAction:@selector(hotkeyTableDoubleClick:)]; [o_hotkeys_listbox setDoubleAction:@selector(hotkeyTableDoubleClick:)];
/* setup useful stuff */ /* setup useful stuff */
o_hotkeysNonUseableKeys = [[NSArray arrayWithObjects: @"Command-c", @"Command-x", @"Command-v", @"Command-a", @"Command-," , @"Command-h", @"Command-Alt-h", @"Command-Shift-o", @"Command-o", @"Command-d", @"Command-n", @"Command-s", @"Command-z", @"Command-l", @"Command-r", @"Command-3", @"Command-m", @"Command-w", @"Command-Shift-w", @"Command-Shift-c", @"Command-Shift-p", @"Command-i", @"Command-e", @"Command-Shift-e", @"Command-b", @"Command-Shift-m", @"Command-Ctrl-m", @"Command-?", @"Command-Alt-?", nil] retain]; o_hotkeysNonUseableKeys = [@[@"Command-c", @"Command-x", @"Command-v", @"Command-a", @"Command-," , @"Command-h", @"Command-Alt-h", @"Command-Shift-o", @"Command-o", @"Command-d", @"Command-n", @"Command-s", @"Command-z", @"Command-l", @"Command-r", @"Command-3", @"Command-m", @"Command-w", @"Command-Shift-w", @"Command-Shift-c", @"Command-Shift-p", @"Command-i", @"Command-e", @"Command-Shift-e", @"Command-b", @"Command-Shift-m", @"Command-Ctrl-m", @"Command-?", @"Command-Alt-?"] retain];
} }
#define CreateToolbarItem(o_name, o_desc, o_img, sel) \ #define CreateToolbarItem(o_name, o_desc, o_img, sel) \
...@@ -155,20 +155,22 @@ create_toolbar_item(NSString * o_itemIdent, NSString * o_name, NSString * o_desc ...@@ -155,20 +155,22 @@ create_toolbar_item(NSString * o_itemIdent, NSString * o_name, NSString * o_desc
- (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar - (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar
{ {
return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, return @[VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
NSToolbarFlexibleSpaceItemIdentifier];
} }
- (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar - (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar
{ {
return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, return @[VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, NSToolbarFlexibleSpaceItemIdentifier, nil]; VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier,
NSToolbarFlexibleSpaceItemIdentifier];
} }
- (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar
{ {
return [NSArray arrayWithObjects: VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier, return @[VLCIntfSettingToolbarIdentifier, VLCAudioSettingToolbarIdentifier, VLCVideoSettingToolbarIdentifier,
VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier, nil]; VLCOSDSettingToolbarIdentifier, VLCInputSettingToolbarIdentifier, VLCHotkeysSettingToolbarIdentifier];
} }
- (void)initStrings - (void)initStrings
...@@ -558,9 +560,8 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam ...@@ -558,9 +560,8 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
[self setupButton: o_input_mkv_preload_dir_ckb forBoolValue: "mkv-preload-local-dir"]; [self setupButton: o_input_mkv_preload_dir_ckb forBoolValue: "mkv-preload-local-dir"];
[o_input_cachelevel_pop removeAllItems]; [o_input_cachelevel_pop removeAllItems];
[o_input_cachelevel_pop addItemsWithTitles: [o_input_cachelevel_pop addItemsWithTitles: @[_NS("Custom"), _NS("Lowest latency"),
[NSArray arrayWithObjects: _NS("Custom"), _NS("Lowest latency"), _NS("Low latency"), _NS("Normal"), _NS("Low latency"), _NS("Normal"), _NS("High latency"), _NS("Higher latency")]];
_NS("High latency"), _NS("Higher latency"), nil]];
[[o_input_cachelevel_pop itemAtIndex: 0] setTag: 0]; [[o_input_cachelevel_pop itemAtIndex: 0] setTag: 0];
[[o_input_cachelevel_pop itemAtIndex: 1] setTag: 100]; [[o_input_cachelevel_pop itemAtIndex: 1] setTag: 100];
[[o_input_cachelevel_pop itemAtIndex: 2] setTag: 200]; [[o_input_cachelevel_pop itemAtIndex: 2] setTag: 200];
......
...@@ -83,16 +83,14 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -83,16 +83,14 @@ static VLCWizard *_o_sharedInstance = nil;
/* add audio-bitrates for transcoding */ /* add audio-bitrates for transcoding */
NSArray * audioBitratesArray; NSArray * audioBitratesArray;
audioBitratesArray = [NSArray arrayWithObjects: @"512", @"256", @"192", audioBitratesArray = @[@"512", @"256", @"192", @"128", @"64", @"32", @"16"];
@"128", @"64", @"32", @"16", nil ];
[o_t4_pop_audioBitrate removeAllItems]; [o_t4_pop_audioBitrate removeAllItems];
[o_t4_pop_audioBitrate addItemsWithTitles: audioBitratesArray]; [o_t4_pop_audioBitrate addItemsWithTitles: audioBitratesArray];
[o_t4_pop_audioBitrate selectItemWithTitle: @"192"]; [o_t4_pop_audioBitrate selectItemWithTitle: @"192"];
/* add video-bitrates for transcoding */ /* add video-bitrates for transcoding */
NSArray * videoBitratesArray; NSArray * videoBitratesArray;
videoBitratesArray = [NSArray arrayWithObjects: @"3072", @"2048", @"1024", videoBitratesArray = @[@"3072", @"2048", @"1024", @"768", @"512", @"256", @"192", @"128", @"64", @"32", @"16"];
@"768", @"512", @"256", @"192", @"128", @"64", @"32", @"16", nil ];
[o_t4_pop_videoBitrate removeAllItems]; [o_t4_pop_videoBitrate removeAllItems];
[o_t4_pop_videoBitrate addItemsWithTitles: videoBitratesArray]; [o_t4_pop_videoBitrate addItemsWithTitles: videoBitratesArray];
[o_t4_pop_videoBitrate selectItemWithTitle: @"1024"]; [o_t4_pop_videoBitrate selectItemWithTitle: @"1024"];
...@@ -114,58 +112,58 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -114,58 +112,58 @@ static VLCWizard *_o_sharedInstance = nil;
NSArray * o_mjpg; NSArray * o_mjpg;
NSArray * o_theo; NSArray * o_theo;
NSArray * o_dummyVid; NSArray * o_dummyVid;
o_mp1v = [NSArray arrayWithObjects: @"MPEG-1 Video", @"mp1v", o_mp1v = @[@"MPEG-1 Video", @"mp1v",
_NS("MPEG-1 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG " _NS("MPEG-1 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG "
"and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
@"NO", @"NO", @"NO", @"NO", nil]; @"NO", @"NO", @"NO", @"NO"];
o_mp2v = [NSArray arrayWithObjects: @"MPEG-2 Video", @"mp2v", o_mp2v = @[@"MPEG-2 Video", @"mp2v",
_NS("MPEG-2 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG " _NS("MPEG-2 Video codec (usable with MPEG PS, MPEG TS, MPEG1, OGG "
"and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW", "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_OGG", @"MUX_RAW",
@"NO", @"NO", @"NO", @"NO", nil]; @"NO", @"NO", @"NO", @"NO"];
o_mp4v = [NSArray arrayWithObjects: @"MPEG-4 Video", @"mp4v", o_mp4v = @[@"MPEG-4 Video", @"mp4v",
_NS("MPEG-4 Video codec (useable with MPEG PS, MPEG TS, MPEG1, ASF, " _NS("MPEG-4 Video codec (useable with MPEG PS, MPEG TS, MPEG1, ASF, "
"MP4, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", "MP4, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF",
@"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO", nil]; @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"NO", @"NO"];
o_div1 = [NSArray arrayWithObjects: @"DIVX 1", @"DIV1", o_div1 = @[@"DIVX 1", @"DIV1",
_NS("DivX first version (useable with MPEG TS, MPEG1, ASF and OGG)"), _NS("DivX first version (useable with MPEG TS, MPEG1, ASF and OGG)"),
@"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
@"NO", @"NO", nil]; @"NO", @"NO"];
o_div2 = [NSArray arrayWithObjects: @"DIVX 2", @"DIV2", o_div2 = @[@"DIVX 2", @"DIV2",
_NS("DivX second version (useable with MPEG TS, MPEG1, ASF and OGG)"), _NS("DivX second version (useable with MPEG TS, MPEG1, ASF and OGG)"),
@"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
@"NO", @"NO", nil]; @"NO", @"NO"];
o_div3 = [NSArray arrayWithObjects: @"DIVX 3", @"DIV3", o_div3 = @[@"DIVX 3", @"DIV3",
_NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"), _NS("DivX third version (useable with MPEG TS, MPEG1, ASF and OGG)"),
@"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", @"NO",
@"NO", @"NO", nil]; @"NO", @"NO"];
o_h263 = [NSArray arrayWithObjects: @"H.263", @"h263", o_h263 = @[@"H.263", @"h263",
_NS("H263 is a video codec optimized for videoconference " _NS("H263 is a video codec optimized for videoconference "
"(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO", "(low rates, useable with MPEG TS)"), @"MUX_TS", @"NO", @"NO", @"NO",
@"NO", @"NO", @"NO", @"NO", @"NO", nil]; @"NO", @"NO", @"NO", @"NO", @"NO"];
o_h264 = [NSArray arrayWithObjects: @"H.264", @"h264", o_h264 = @[@"H.264", @"h264",
_NS("H264 is a new video codec (useable with MPEG TS and MP4)"), _NS("H264 is a new video codec (useable with MPEG TS and MP4)"),
@"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO", @"MUX_TS", @"MUX_MP4", @"NO", @"NO", @"NO", @"NO", @"NO", @"NO",
@"NO", nil]; @"NO"];
o_wmv1 = [NSArray arrayWithObjects: @"WMV 1", @"WMV1", o_wmv1 = @[@"WMV 1", @"WMV1",
_NS("WMV (Windows Media Video) 1 (useable with MPEG TS, MPEG1, ASF and " _NS("WMV (Windows Media Video) 1 (useable with MPEG TS, MPEG1, ASF and "
"OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
@"NO", @"NO", @"NO", nil]; @"NO", @"NO", @"NO"];
o_wmv2 = [NSArray arrayWithObjects: @"WMV 2", @"WMV2", o_wmv2 = @[@"WMV 2", @"WMV2",
_NS("WMV (Windows Media Video) 2 (useable with MPEG TS, MPEG1, ASF and " _NS("WMV (Windows Media Video) 2 (useable with MPEG TS, MPEG1, ASF and "
"OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO", "OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", @"NO", @"NO",
@"NO", @"NO", @"NO", nil]; @"NO", @"NO", @"NO"];
o_mjpg = [NSArray arrayWithObjects: @"MJPEG", @"MJPG", o_mjpg = @[@"MJPEG", @"MJPG",
_NS("MJPEG consists of a series of JPEG pictures (useable with MPEG TS," _NS("MJPEG consists of a series of JPEG pictures (useable with MPEG TS,"
" MPEG1, ASF and OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", " MPEG1, ASF and OGG)"), @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
@"NO", @"NO", @"NO", @"NO", @"NO", nil]; @"NO", @"NO", @"NO", @"NO", @"NO"];
o_theo = [NSArray arrayWithObjects: @"Theora", @"theo", o_theo = @[@"Theora", @"theo",
_NS("Theora is a free general-purpose codec (useable with MPEG TS " _NS("Theora is a free general-purpose codec (useable with MPEG TS "
"and OGG)"), @"MUX_TS", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO", "and OGG)"), @"MUX_TS", @"MUX_OGG", @"NO", @"NO", @"NO", @"NO", @"NO",
@"NO", @"NO", nil]; @"NO", @"NO"];
o_dummyVid = [NSArray arrayWithObjects: @"Dummy", @"dummy", o_dummyVid = @[@"Dummy", @"dummy",
_NS("Dummy codec (do not transcode, useable with all encapsulation " _NS("Dummy codec (do not transcode, useable with all encapsulation "
"formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
@"MUX_OGG", @"MUX_WAV", @"MUX_RAW", @"MUX_MOV", nil]; @"MUX_OGG", @"MUX_WAV", @"MUX_RAW", @"MUX_MOV"];
o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v, o_videoCodecs = [[NSArray alloc] initWithObjects: o_mp1v, o_mp2v, o_mp4v,
o_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo, o_div1, o_div2, o_div3, o_h263, o_h264, o_wmv1, o_wmv2, o_mjpg, o_theo,
o_dummyVid, nil]; o_dummyVid, nil];
...@@ -181,42 +179,41 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -181,42 +179,41 @@ static VLCWizard *_o_sharedInstance = nil;
NSArray * o_s16l; NSArray * o_s16l;
NSArray * o_fl32; NSArray * o_fl32;
NSArray * o_dummyAud; NSArray * o_dummyAud;
o_mpga = [NSArray arrayWithObjects: @"MPEG Audio", @"mpga", o_mpga = @[@"MPEG Audio", @"mpga",
_NS("The standard MPEG audio (1/2) format (useable with MPEG PS, MPEG TS, " _NS("The standard MPEG audio (1/2) format (useable with MPEG PS, MPEG TS, "
"MPEG1, ASF, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", "MPEG1, ASF, OGG and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG",
@"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", nil]; @"MUX_ASF", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1"];
o_mp3 = [NSArray arrayWithObjects: @"MP3", @"mp3", o_mp3 = @[@"MP3", @"mp3",
_NS("MPEG Audio Layer 3 (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG " _NS("MPEG Audio Layer 3 (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
"and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
@"MUX_RAW", @"-1", @"-1", @"-1", nil]; @"MUX_RAW", @"-1", @"-1", @"-1"];
o_mp4a = [NSArray arrayWithObjects: @"MPEG 4 Audio", @"mp4a", o_mp4a = @[@"MPEG 4 Audio", @"mp4a",
_NS("Audio format for MPEG4 (useable with MPEG TS and MPEG4)"), @"MUX_TS", _NS("Audio format for MPEG4 (useable with MPEG TS and MPEG4)"), @"MUX_TS",
@"MUX_MP4", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil]; @"MUX_MP4", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
o_a52 = [NSArray arrayWithObjects: @"A/52", @"a52", o_a52 = @[@"A/52", @"a52",
_NS("DVD audio format (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG " _NS("DVD audio format (useable with MPEG PS, MPEG TS, MPEG1, ASF, OGG "
"and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG", "and RAW)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_OGG",
@"MUX_RAW", @"-1", @"-1", @"-1", nil]; @"MUX_RAW", @"-1", @"-1", @"-1"];
o_vorb = [NSArray arrayWithObjects: @"Vorbis", @"vorb", o_vorb = @[@"Vorbis", @"vorb",
_NS("Vorbis is a free audio codec (useable with OGG)"), @"MUX_OGG", _NS("Vorbis is a free audio codec (useable with OGG)"), @"MUX_OGG",
@"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil]; @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
o_flac = [NSArray arrayWithObjects: @"FLAC", @"flac", o_flac = @[@"FLAC", @"flac",
_NS("FLAC is a lossless audio codec (useable with OGG and RAW)"), _NS("FLAC is a lossless audio codec (useable with OGG and RAW)"),
@"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"MUX_OGG", @"MUX_RAW", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
@"-1", nil]; o_spx = @[@"Speex", @"spx",
o_spx = [NSArray arrayWithObjects: @"Speex", @"spx", _NS("A free audio codec dedicated to compression of voice (useable "
_NS("A free audio codec dedicated to compression of voice (useable " "with OGG)"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1",
"with OGG)"), @"MUX_OGG", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
@"-1", @"-1", nil]; o_s16l = @[@"Uncompressed, integer", @"s16l",
o_s16l = [NSArray arrayWithObjects: @"Uncompressed, integer", @"s16l", _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
_NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
@"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil]; o_fl32 = @[@"Uncompressed, floating point", @"fl32",
o_fl32 = [NSArray arrayWithObjects: @"Uncompressed, floating point", @"fl32", _NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV",
_NS("Uncompressed audio samples (useable with WAV)"), @"MUX_WAV", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1"];
@"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", @"-1", nil]; o_dummyAud = @[@"Dummy", @"dummy",
o_dummyAud = [NSArray arrayWithObjects: @"Dummy", @"dummy", _NS("Dummy codec (do not transcode, useable with all encapsulation "
_NS("Dummy codec (do not transcode, useable with all encapsulation " "formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4",
"formats)"), @"MUX_PS", @"MUX_TS", @"MUX_MPEG", @"MUX_ASF", @"MUX_MP4", @"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV"];
@"MUX_OGG", @"MUX_RAW", @"MUX_MOV", @"MUX_WAV", nil];
o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a, o_audioCodecs = [[NSArray alloc] initWithObjects: o_mpga, o_mp3, o_mp4a,
o_a52, o_vorb, o_flac, o_spx, o_s16l, o_fl32, o_dummyAud, nil]; o_a52, o_vorb, o_flac, o_spx, o_s16l, o_fl32, o_dummyAud, nil];
...@@ -234,19 +231,16 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -234,19 +231,16 @@ static VLCWizard *_o_sharedInstance = nil;
NSArray * o_mov; NSArray * o_mov;
NSArray * o_wav; NSArray * o_wav;
NSArray * o_asfh; NSArray * o_asfh;
o_ps = [NSArray arrayWithObjects: @"ps", @"MPEG PS", o_ps = @[@"ps", @"MPEG PS", _NS("MPEG Program Stream"), @"mpg"];
_NS("MPEG Program Stream"), @"mpg", nil]; o_ts = @[@"ts", @"MPEG TS", _NS("MPEG Transport Stream")];
o_ts = [NSArray arrayWithObjects: @"ts", @"MPEG TS", o_mpeg = @[@"ps", @"MPEG 1", _NS("MPEG 1 Format"), @"mpg"];
_NS("MPEG Transport Stream"), nil]; o_ogg = @[@"ogg", @"OGG", @"OGG"];
o_mpeg = [NSArray arrayWithObjects: @"ps", @"MPEG 1", o_raw = @[@"raw", @"RAW", @"RAW"];
_NS("MPEG 1 Format"), @"mpg", nil]; o_asf = @[@"asf", @"ASF", @"ASF"];
o_ogg = [NSArray arrayWithObjects: @"ogg", @"OGG", @"OGG", nil]; o_mp4 = @[@"mp4", @"MP4", @"MPEG4"];
o_raw = [NSArray arrayWithObjects: @"raw", @"RAW", @"RAW", nil]; o_mov = @[@"mov", @"MOV", @"MOV"];
o_asf = [NSArray arrayWithObjects: @"asf", @"ASF", @"ASF", nil]; o_wav = @[@"wav", @"WAV", @"WAV"];
o_mp4 = [NSArray arrayWithObjects: @"mp4", @"MP4", @"MPEG4", nil]; o_asfh = @[@"asfh", @"ASFH", @"ASFH"];
o_mov = [NSArray arrayWithObjects: @"mov", @"MOV", @"MOV", nil];
o_wav = [NSArray arrayWithObjects: @"wav", @"WAV", @"WAV", nil];
o_asfh = [NSArray arrayWithObjects: @"asfh", @"ASFH", @"ASFH", nil];
o_encapFormats = [[NSArray alloc] initWithObjects: o_ps, o_ts, o_mpeg, o_encapFormats = [[NSArray alloc] initWithObjects: o_ps, o_ts, o_mpeg,
o_ogg, o_raw, o_asf, o_mp4, o_mov, o_wav, o_asfh, nil]; o_ogg, o_raw, o_asf, o_mp4, o_mov, o_wav, o_asfh, nil];
...@@ -257,14 +251,14 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -257,14 +251,14 @@ static VLCWizard *_o_sharedInstance = nil;
NSArray * o_udp_multi; NSArray * o_udp_multi;
NSArray * o_rtp_uni; NSArray * o_rtp_uni;
NSArray * o_rtp_multi; NSArray * o_rtp_multi;
o_http = [NSArray arrayWithObjects: @"http", @"HTTP", _NS("Enter the local " o_http = @[@"http", @"HTTP", _NS("Enter the local "
"addresses you want to listen requests on. Do not enter anything if " "addresses you want to listen requests on. Do not enter anything if "
"you want to listen on all the network interfaces. This is generally " "you want to listen on all the network interfaces. This is generally "
"the best thing to do. Other computers can then access the stream at " "the best thing to do. Other computers can then access the stream at "
"http://yourip:8080 by default.") , _NS("Use this to stream to several " "http://yourip:8080 by default.") , _NS("Use this to stream to several "
"computers. This method is not the most efficient, as the server needs "\ "computers. This method is not the most efficient, as the server needs "\
"to send the stream several times, but generally the most compatible"), nil]; "to send the stream several times, but generally the most compatible")];
o_mms = [NSArray arrayWithObjects: @"mmsh", @"MMS", _NS("Enter the local " o_mms = @[@"mmsh", @"MMS", _NS("Enter the local "
"addresses you want to listen requests on. Do not enter anything if " "addresses you want to listen requests on. Do not enter anything if "
"you want to listen on all the network interfaces. This is generally " "you want to listen on all the network interfaces. This is generally "
"the best thing to do. Other computers can then access the stream at " "the best thing to do. Other computers can then access the stream at "
...@@ -272,27 +266,27 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -272,27 +266,27 @@ static VLCWizard *_o_sharedInstance = nil;
"computers using the Microsoft MMS protocol. This protocol is used as " "computers using the Microsoft MMS protocol. This protocol is used as "
"transport method by many Microsoft's softwares. Note that only a " "transport method by many Microsoft's softwares. Note that only a "
"small part of the MMS protocol is supported (MMS encapsulated in " "small part of the MMS protocol is supported (MMS encapsulated in "
"HTTP)."), nil]; "HTTP).")];
o_udp_uni = [NSArray arrayWithObjects: @"udp", @"UDP-Unicast", _NS("Enter " o_udp_uni = @[@"udp", @"UDP-Unicast", _NS("Enter "
"the address of the computer to stream to."), _NS("Use this to stream " "the address of the computer to stream to."), _NS("Use this to stream "
"to a single computer."), nil]; "to a single computer.")];
o_udp_multi = [NSArray arrayWithObjects: @"udp", @"UDP-Multicast", _NS("Enter " o_udp_multi = @[@"udp", @"UDP-Multicast", _NS("Enter "
"the multicast address to stream to in this field. This must be an IP " "the multicast address to stream to in this field. This must be an IP "
"address between 224.0.0.0 and 239.255.255.255. For a private use, " "address between 224.0.0.0 and 239.255.255.255. For a private use, "
"enter an address beginning with 239.255."), _NS("Use this to stream " "enter an address beginning with 239.255."), _NS("Use this to stream "
"to a dynamic group of computers on a multicast-enabled network. This " "to a dynamic group of computers on a multicast-enabled network. This "
"is the most efficient method to stream to several computers, but it " "is the most efficient method to stream to several computers, but it "
"won't work over the Internet."), nil]; "won't work over the Internet.")];
o_rtp_uni = [NSArray arrayWithObjects: @"rtp", @"RTP-Unicast", _NS("Enter the " o_rtp_uni = @[@"rtp", @"RTP-Unicast", _NS("Enter the "
"address of the computer to stream to.") , _NS("Use this to stream " "address of the computer to stream to.") , _NS("Use this to stream "
"to a single computer. RTP headers will be added to the stream"), nil]; "to a single computer. RTP headers will be added to the stream")];
o_rtp_multi = [NSArray arrayWithObjects: @"rtp", @"RTP-Multicast", _NS("Enter " o_rtp_multi = @[@"rtp", @"RTP-Multicast", _NS("Enter "
"the multicast address to stream to in this field. This must be an IP " "the multicast address to stream to in this field. This must be an IP "
"address between 224.0.0.0 and 239.255.255.255. For a private use, " "address between 224.0.0.0 and 239.255.255.255. For a private use, "
"enter an address beginning with 239.255."), _NS("Use this to stream " "enter an address beginning with 239.255."), _NS("Use this to stream "
"to a dynamic group of computers on a multicast-enabled network. This " "to a dynamic group of computers on a multicast-enabled network. This "
"is the most efficient method to stream to several computers, but it " "is the most efficient method to stream to several computers, but it "
"won't work over Internet. RTP headers will be added to the stream"), nil]; "won't work over Internet. RTP headers will be added to the stream")];
o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_mms, o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_mms,
o_udp_uni, o_udp_multi, o_rtp_uni, o_rtp_multi, nil]; o_udp_uni, o_udp_multi, o_rtp_uni, o_rtp_multi, nil];
} }
...@@ -542,8 +536,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -542,8 +536,7 @@ static VLCWizard *_o_sharedInstance = nil;
} }
else else
{ {
[o_userSelections setObject:[NSArray arrayWithObject: [o_userSelections setObject:@[[o_t2_fld_pathToNewStrm stringValue]] forKey:@"pathToStrm"];
[o_t2_fld_pathToNewStrm stringValue]] forKey:@"pathToStrm"];
} }
} }
else else
...@@ -1180,8 +1173,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1180,8 +1173,7 @@ static VLCWizard *_o_sharedInstance = nil;
/* we don't need to check for existing items because Cocoa /* we don't need to check for existing items because Cocoa
* does that already when we are asking the user for a location * does that already when we are asking the user for a location
* to save her file */ * to save her file */
[o_userSelections setObject: [NSArray arrayWithObject: [o_userSelections setObject: @[[o_t7_fld_filePath stringValue]] forKey: @"trnscdFilePath"];
[o_t7_fld_filePath stringValue]] forKey: @"trnscdFilePath"];
} }
/* include subtitles ? */ /* include subtitles ? */
...@@ -1859,9 +1851,9 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1859,9 +1851,9 @@ static VLCWizard *_o_sharedInstance = nil;
[[o_userSelections objectForKey:@"encapFormat"] intValue]] [[o_userSelections objectForKey:@"encapFormat"] intValue]]
objectAtIndex:0]; objectAtIndex:0];
if (![theEncapFormat isEqualToString:@"ps"]) if (![theEncapFormat isEqualToString:@"ps"])
[saveFilePanel setAllowedFileTypes: [NSArray arrayWithObject:theEncapFormat]]; [saveFilePanel setAllowedFileTypes: @[theEncapFormat]];
else else
[saveFilePanel setAllowedFileTypes: [NSArray arrayWithObject:@"mpg"]]; [saveFilePanel setAllowedFileTypes: @[@"mpg"]];
[saveFilePanel setCanSelectHiddenExtension: YES]; [saveFilePanel setCanSelectHiddenExtension: YES];
[saveFilePanel setCanCreateDirectories: YES]; [saveFilePanel setCanCreateDirectories: YES];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment