NSArray * tempArray = [_videoCodecs objectAtIndex:1];
NSUInteger count = [tempArray count];
NSString * searchString = [components objectAtIndex:4];
NSArray * tempArray = [_videoCodecs objectAtIndex:1];
NSUInteger count = [tempArray count];
NSString * searchString = [components objectAtIndex:4];
- if ([searchString isEqualToString:@"none"] || [searchString isEqualToString:@"0"]) {
+ int videoKeep = [searchString isEqualToString:@"copy"];
+ [_customize_vid_keep_ckb setState:videoKeep];
+ if ([searchString isEqualToString:@"none"] || [searchString isEqualToString:@"0"] || videoKeep) {
tempArray = [_audioCodecs objectAtIndex:1];
count = [tempArray count];
searchString = [components objectAtIndex:10];
tempArray = [_audioCodecs objectAtIndex:1];
count = [tempArray count];
searchString = [components objectAtIndex:10];
- if ([searchString isEqualToString:@"none"] || [searchString isEqualToString:@"0"]) {
+ int audioKeep = [searchString isEqualToString:@"copy"];
+ [_customize_aud_keep_ckb setState:audioKeep];
+ if ([searchString isEqualToString:@"none"] || [searchString isEqualToString:@"0"] || audioKeep) {
- (NSString *)composedOptions
{
NSMutableString *composedOptions = [[NSMutableString alloc] initWithString:@":sout=#transcode{"];
- (NSString *)composedOptions
{
NSMutableString *composedOptions = [[NSMutableString alloc] initWithString:@":sout=#transcode{"];
if ([[self.currentProfile objectAtIndex:5] intValue] > 0) // bitrate
[composedOptions appendFormat:@",vb=%@", [self.currentProfile objectAtIndex:5]];
if ([[self.currentProfile objectAtIndex:6] floatValue] > 0.) // scale
if ([[self.currentProfile objectAtIndex:5] intValue] > 0) // bitrate
[composedOptions appendFormat:@",vb=%@", [self.currentProfile objectAtIndex:5]];
if ([[self.currentProfile objectAtIndex:6] floatValue] > 0.) // scale
[composedOptions appendFormat:@",width=%@", [self.currentProfile objectAtIndex:8]];
if ([[self.currentProfile objectAtIndex:9] intValue] > 0) // height
[composedOptions appendFormat:@",height=%@", [self.currentProfile objectAtIndex:9]];
[composedOptions appendFormat:@",width=%@", [self.currentProfile objectAtIndex:8]];
if ([[self.currentProfile objectAtIndex:9] intValue] > 0) // height
[composedOptions appendFormat:@",height=%@", [self.currentProfile objectAtIndex:9]];
- [composedOptions appendFormat:@"acodec=%@", [self.currentProfile objectAtIndex:10]];
- if (![[self.currentProfile objectAtIndex:10] isEqualToString:@"none"]) {
+ [composedOptions appendFormat:@"acodec=%@", [self.currentProfile objectAtIndex:10]];
[composedOptions appendFormat:@",ab=%@", [self.currentProfile objectAtIndex:11]]; // bitrate
[composedOptions appendFormat:@",channels=%@", [self.currentProfile objectAtIndex:12]]; // channel number
[composedOptions appendFormat:@",samplerate=%@", [self.currentProfile objectAtIndex:13]]; // sample rate
[composedOptions appendFormat:@",ab=%@", [self.currentProfile objectAtIndex:11]]; // bitrate
[composedOptions appendFormat:@",channels=%@", [self.currentProfile objectAtIndex:12]]; // channel number
[composedOptions appendFormat:@",samplerate=%@", [self.currentProfile objectAtIndex:13]]; // sample rate
if ([[self.currentProfile objectAtIndex:15] intValue])
[composedOptions appendFormat:@",soverlay"];
}
if ([[self.currentProfile objectAtIndex:15] intValue])
[composedOptions appendFormat:@",soverlay"];
}
[self.currentProfile addObject: [NSString stringWithFormat:@"%li", [_customize_vid_ckb state]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%li", [_customize_aud_ckb state]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%li", [_customize_subs_ckb state]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%li", [_customize_vid_ckb state]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%li", [_customize_aud_ckb state]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%li", [_customize_subs_ckb state]]];
- i = [_customize_vid_codec_pop indexOfSelectedItem];
- if (i >= 0)
- [self.currentProfile addObject: [[_videoCodecs objectAtIndex:1] objectAtIndex:i]];
- else
- [self.currentProfile addObject: @"none"];
+
+ NSString *videoCodec;
+ if([_customize_vid_keep_ckb state] == NSOnState)
+ videoCodec = @"copy";
+ else {
+ i = [_customize_vid_codec_pop indexOfSelectedItem];
+ if (i >= 0)
+ videoCodec = [[_videoCodecs objectAtIndex:1] objectAtIndex:i];
+ else
+ videoCodec = @"none";
+ }
+ [self.currentProfile addObject: videoCodec];
+
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self vidBitrate]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [[[_customize_vid_scale_pop selectedItem] title] intValue]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self vidFramerate]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [_customize_vid_width_fld intValue]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [_customize_vid_height_fld intValue]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self vidBitrate]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [[[_customize_vid_scale_pop selectedItem] title] intValue]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self vidFramerate]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [_customize_vid_width_fld intValue]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [_customize_vid_height_fld intValue]]];
- i = [_customize_aud_codec_pop indexOfSelectedItem];
- if (i >= 0)
- [self.currentProfile addObject: [[_audioCodecs objectAtIndex:1] objectAtIndex:i]];
- else
- [self.currentProfile addObject: @"none"];
+
+ NSString *audioCodec;
+ if([_customize_aud_keep_ckb state] == NSOnState)
+ audioCodec = @"copy";
+ else {
+ i = [_customize_aud_codec_pop indexOfSelectedItem];
+ if (i >= 0)
+ audioCodec = [[_audioCodecs objectAtIndex:1] objectAtIndex:i];
+ else
+ audioCodec = @"none";
+ }
+ [self.currentProfile addObject: audioCodec];
+
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self audBitrate]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self audChannels]]];
[self.currentProfile addObject: [[_customize_aud_samplerate_pop selectedItem] title]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self audBitrate]]];
[self.currentProfile addObject: [NSString stringWithFormat:@"%i", [self audChannels]]];
[self.currentProfile addObject: [[_customize_aud_samplerate_pop selectedItem] title]];