- (void)initStrings
{
- NSArray *o_muxers = @[@"MPEG TS", @"MPEG PS", @"MPEG 1",
- @"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", @"Raw"];
- NSArray *o_a_channels = @[@"1", @"2", @"4", @"6"];
- NSArray *o_a_bitrates = @[@"16", @"32", @"64", @"96",
- @"128", @"192", @"256", @"512"];
- NSArray *o_v_bitrates = @[@"16", @"32", @"64", @"96",
- @"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072"];
- NSArray *o_v_scales = @[@"0.25",@"0.5",@"0.75",@"1",@"1.25",@"1.5",@"1.75",@"2"];
- NSArray *o_a_codecs = @[@"mpga", @"mp3 ", @"mp4a", @"a52 ", @"vorb", @"flac", @"spx "];
- NSArray *o_v_codecs = @[@"mp1v", @"mp2v", @"mp4v", @"DIV1",
- @"DIV2", @"DIV3", @"h263", @"h264", @"WMV1", @"WMV2", @"MJPG", @"theo"];
+ NSArray *o_muxers = [NSArray arrayWithObjects:@"MPEG TS", @"MPEG PS", @"MPEG 1",
+ @"Ogg", @"AVI", @"ASF", @"MPEG 4", @"Quicktime", @"Raw", nil];
+ NSArray *o_a_channels = [NSArray arrayWithObjects:@"1", @"2", @"4", @"6", nil];
+ NSArray *o_a_bitrates = [NSArray arrayWithObjects:@"16", @"32", @"64", @"96",
+ @"128", @"192", @"256", @"512", nil];
+ NSArray *o_v_bitrates = [NSArray arrayWithObjects:@"16", @"32", @"64", @"96",
+ @"128", @"192", @"256", @"384", @"512", @"768", @"1024", @"2048", @"3072", nil];
+ NSArray *o_v_scales = [NSArray arrayWithObjects:@"0.25", @"0.5", @"0.75", @"1", @"1.25", @"1.5", @"1.75", @"2", nil];
+ NSArray *o_a_codecs = [NSArray arrayWithObjects:@"mpga", @"mp3 ", @"mp4a", @"a52 ", @"vorb", @"flac", @"spx ", nil];
+ NSArray *o_v_codecs = [NSArray arrayWithObjects:@"mp1v", @"mp2v", @"mp4v", @"DIV1",
+ @"DIV2", @"DIV3", @"h263", @"h264", @"WMV1", @"WMV2", @"MJPG", @"theo", nil];
[o_output_ckbox setTitle: _NS("Streaming/Saving:")];
[o_output_settings setTitle: _NS("Settings...")];
[NSApp endSheet: o_output_sheet];
}
-- (void)outputMethodChanged:(NSNotification *)o_notification
+- (IBAction)outputMethodChanged:(id)sender
{
NSString *o_mode;
o_mode = [[o_method selectedCell] title];
[self outputInfoChanged: nil];
}
-- (void)outputInfoChanged:(NSNotification *)o_notification
+- (IBAction)outputInfoChanged:(id)object
{
NSString *o_mode, *o_mux, *o_mux_string;
NSMutableString *o_announce = [NSMutableString stringWithString:@""];
if ([o_mode isEqualToString: _NS("File")]) {
if ([o_dump_chkbox state] == NSOnState) {
- o_sout_options = @[@":demux=dump",
+ o_sout_options = [NSArray arrayWithObjects:@":demux=dump",
[NSString stringWithFormat:
@":demuxdump-file=%@",
- [o_file_field stringValue]]];
+ [o_file_field stringValue]], nil];
[self setSoutMRL:o_sout_options];
return;
} else
* port correctly. Not need, if there isn't any path following the
* hostname. */
NSArray * o_urlItems = [[o_stream_address stringValue] componentsSeparatedByString: @"/"];
- NSMutableString * o_finalStreamAddress;
- o_finalStreamAddress = [[NSMutableString alloc] init];
+ NSMutableString * o_finalStreamAddress = [[[NSMutableString alloc] init] autorelease];
if ([o_urlItems count] == 1)
[o_finalStreamAddress appendFormat: @"\"%@:%@\"", [o_stream_address stringValue],[o_stream_port stringValue]];
else {
- [o_finalStreamAddress appendFormat: @"\"%@:%@", o_urlItems[0], [o_stream_port stringValue]];
+ [o_finalStreamAddress appendFormat: @"\"%@:%@", [o_urlItems objectAtIndex:0], [o_stream_port stringValue]];
NSUInteger itemCount = [o_urlItems count];
for (NSUInteger x = 0; x < itemCount; x++)
- [o_finalStreamAddress appendFormat: @"/%@", o_urlItems[x]];
+ [o_finalStreamAddress appendFormat: @"/%@", [o_urlItems objectAtIndex:x]];
[o_finalStreamAddress appendString: @"\""];
}
[o_mrl_string appendFormat:
@"standard{mux=%@,access=%@,dst=%@%@}",
- o_mode, o_mux_string, o_finalStreamAddress, o_announce];
+ o_mux_string, o_mode, o_finalStreamAddress, o_announce];
} else {
NSString * o_stream_name;
if ([o_display state] == NSOnState)
[o_mrl_string appendString: @"}"];
- o_sout_options = @[o_mrl_string];
+ o_sout_options = [NSArray arrayWithObject:o_mrl_string];
[self setSoutMRL:o_sout_options];
}
[self TTLChanged:nil];
}
-- (void)transcodeChanged:(NSNotification *)o_notification
+- (IBAction)transcodeChanged:(id)sender
{
if ([o_transcode_video_chkbox state] == NSOnState) {
[o_transcode_video_selector setEnabled: YES];
[self transcodeInfoChanged:nil];
}
-- (void)transcodeInfoChanged:(NSNotification *)o_notification
+- (IBAction)transcodeInfoChanged:(id)object
{
NSMutableString *o_transcode_string = [NSMutableString stringWithCapacity:200];