**********************************************************************/
- (void) UpdateDockIcon: (float) progress
{
- NSImage * icon;
NSData * tiff;
NSBitmapImageRep * bmp;
uint32_t * pen;
int row_start, row_end;
int i, j;
- /* Get application original icon */
- icon = [NSImage imageNamed: @"NSApplicationIcon"];
-
if( progress < 0.0 || progress > 1.0 )
{
- [NSApp setApplicationIconImage: icon];
+ [NSApp setApplicationIconImage: fApplicationIcon];
return;
}
/* Get it in a raw bitmap form */
- tiff = [icon TIFFRepresentationUsingCompression:
+ tiff = [fApplicationIcon TIFFRepresentationUsingCompression:
NSTIFFCompressionNone factor: 1.0];
bmp = [NSBitmapImageRep imageRepWithData: tiff];
/* Now update the dock icon */
tiff = [bmp TIFFRepresentationUsingCompression:
NSTIFFCompressionNone factor: 1.0];
- icon = [[NSImage alloc] initWithData: tiff];
+ NSImage* icon = [[NSImage alloc] initWithData: tiff];
[NSApp setApplicationIconImage: icon];
[icon release];
}
if( checkScanCount > currentScanCount )
{
currentScanCount = checkScanCount;
- [self writeToActivityLog:"currentScanCount received from fQueueEncodeLibhb"];
}
//hb_state_t s;
case HB_STATE_WORKING:
{
NSMutableString * string;
+ NSString * pass_desc;
/* Update text field */
- string = [NSMutableString stringWithFormat: NSLocalizedString( @"Encoding: pass %d of %d, %.2f %%", @"" ), p.job_cur, p.job_count, 100.0 * p.progress];
+ if (p.job_cur == 1 && p.job_count > 1)
+ {
+ if ([[QueueFileArray objectAtIndex:currentQueueEncodeIndex] objectForKey:@"SubtitleList"] && [[[[[QueueFileArray objectAtIndex:currentQueueEncodeIndex]objectForKey:@"SubtitleList"] objectAtIndex:0] objectForKey:@"subtitleSourceTrackNum"] intValue] == 1)
+ {
+ pass_desc = @"(subtitle scan)";
+ }
+ else
+ {
+ pass_desc = @"";
+ }
+ }
+ else
+ {
+ pass_desc = @"";
+ }
+
+ string = [NSMutableString stringWithFormat: NSLocalizedString( @"Encoding: pass %d %@ of %d, %.2f %%", @"" ), p.job_cur, pass_desc, p.job_count, 100.0 * p.progress];
if( p.seconds > -1 )
{
- (IBAction)showAboutPanel:(id)sender
{
- //[NSApp orderFrontStandardAboutPanel:sender];
NSMutableDictionary* d = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
fApplicationIcon, @"ApplicationIcon",
nil ];
/* NOTE: Currently foreign language search is borked for preview.
* Commented out but left in for initial commit. */
- /*
+
[self writeToActivityLog: "Foreign Language Search: %d", 1];
job->indepth_scan = 1;
{
job->select_subtitle_config.dest = hb_subtitle_config_s::PASSTHRUSUB;
}
+ else
+ {
+ job->select_subtitle_config.dest = hb_subtitle_config_s::RENDERSUB;
+ }
job->select_subtitle_config.force = force;
job->select_subtitle_config.default_track = def;
}
- */
+
}
else
}
else
{
- [fVidQualitySlider setFloatValue:([fVidQualitySlider maxValue] - [fVidQualitySlider minValue]) - [[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
+ /* Since theora's qp value goes up from left to right, we can just set the slider float value */
+ if ([[fVidEncoderPopUp selectedItem] tag] == HB_VCODEC_THEORA)
+ {
+ [fVidQualitySlider setFloatValue:[[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
+ }
+ else
+ {
+ /* since ffmpeg and x264 use an "inverted" slider (lower qp/rf values indicate a higher quality) we invert the value on the slider */
+ [fVidQualitySlider setFloatValue:([fVidQualitySlider maxValue] + [fVidQualitySlider minValue]) - [[chosenPreset objectForKey:@"VideoQualitySlider"] floatValue]];
+ }
}
[self videoMatrixChanged:nil];
[preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"];
-
+ /* Temporarily remove subtitles from creating a new preset as it has to be converted over to use the new
+ * subititle array code. */
/* Subtitles*/
- [preset setObject:[fSubPopUp titleOfSelectedItem] forKey:@"Subtitles"];
+ //[preset setObject:[fSubPopUp titleOfSelectedItem] forKey:@"Subtitles"];
/* Forced Subtitles */
- [preset setObject:[NSNumber numberWithInt:[fSubForcedCheck state]] forKey:@"SubtitlesForced"];
+ //[preset setObject:[NSNumber numberWithInt:[fSubForcedCheck state]] forKey:@"SubtitlesForced"];
}
[preset autorelease];
return preset;