- // Audio Codec needed by FormatInfo and AudioInfo
- NSString * jobAudioCodec = nil;
- if (withFormatInfo || withAudioInfo)
- {
- if (acodec == 256)
- jobAudioCodec = @"AAC"; // HB_ACODEC_FAAC
- else if (acodec == 512)
- jobAudioCodec = @"MP3"; // HB_ACODEC_LAME
- else if (acodec == 1024)
- jobAudioCodec = @"Vorbis"; // HB_ACODEC_VORBIS
- else if (acodec == 2048)
- jobAudioCodec = @"AC3"; // HB_ACODEC_AC3
- }
- if (jobAudioCodec == nil)
- jobAudioCodec = @"unknown";
-
-
- if (withFormatInfo)
- {
- NSString * jobFormatInfo;
- // Muxer settings (File Format in the gui)
- if (mux == 65536 || mux == 131072 || mux == 1048576)
- jobFormatInfo = @"MP4"; // HB_MUX_MP4,HB_MUX_PSP,HB_MUX_IPOD
- else if (mux == 262144)
- jobFormatInfo = @"AVI"; // HB_MUX_AVI
- else if (mux == 524288)
- jobFormatInfo = @"OGM"; // HB_MUX_OGM
- else if (mux == 2097152)
- jobFormatInfo = @"MKV"; // HB_MUX_MKV
- else
- jobFormatInfo = @"unknown";
-
- if (chapter_markers == 1)
- jobFormatInfo = [NSString stringWithFormat:@"%@ Container, %@ Video + %@ Audio, Chapter Markers\n", jobFormatInfo, jobVideoCodec, jobAudioCodec];
- else
- jobFormatInfo = [NSString stringWithFormat:@"%@ Container, %@ Video + %@ Audio\n", jobFormatInfo, jobVideoCodec, jobAudioCodec];
-
- [finalString appendString: @"Format: " withAttributes:detailBoldAttribute];
- [finalString appendString: jobFormatInfo withAttributes:detailAttribute];
- }
-
- if (withDestination)
- {
- [finalString appendString: @"Destination: " withAttributes:detailBoldAttribute];
- [finalString appendString:[NSString stringWithFormat:@"%@\n", file] withAttributes:detailAttribute];
- }
-
-
- if (withPictureInfo)
- {
- NSString * jobPictureInfo;
- // integers for picture values deinterlace, crop[4], keep_ratio, grayscale, pixel_ratio, pixel_aspect_width, pixel_aspect_height,
- // maxWidth, maxHeight
- if (pixel_ratio == 1)
- {
- int croppedWidth = titleWidth - crop[2] - crop[3];
- int displayparwidth = croppedWidth * pixel_aspect_width / pixel_aspect_height;
- int displayparheight = titleHeight - crop[0] - crop[1];
- jobPictureInfo = [NSString stringWithFormat:@"%dx%d (%dx%d Anamorphic)", displayparwidth, displayparheight, width, displayparheight];
- }
- else
- jobPictureInfo = [NSString stringWithFormat:@"%dx%d", width, height];
- if (keep_ratio == 1)
- jobPictureInfo = [jobPictureInfo stringByAppendingString:@" Keep Aspect Ratio"];
-
- if (grayscale == 1)
- jobPictureInfo = [jobPictureInfo stringByAppendingString:@", Grayscale"];
-
- if (deinterlace == 1)
- jobPictureInfo = [jobPictureInfo stringByAppendingString:@", Deinterlace"];
- if (withIcon) // implies indent the info
- [finalString appendString: @"\t" withAttributes:detailBoldAttribute];
- [finalString appendString: @"Picture: " withAttributes:detailBoldAttribute];
- [finalString appendString:[NSString stringWithFormat:@"%@\n", jobPictureInfo] withAttributes:detailAttribute];
- }