// Text Field to show the expanded opts from unparse()
IBOutlet NSTextField * fDisplayX264PresetsUnparseTextField;
char * fX264PresetsUnparsedUTF8String;
+ NSUInteger fX264PresetsHeightForUnparse;
+ NSUInteger fX264PresetsWidthForUnparse;
/* Advanced options tab */
HBAdvancedController * fAdvancedOptions;
const char *advanced_opts = NULL;
const char *h264_profile = NULL;
const char *h264_level = NULL;
- int unparse_width, unparse_height;
+ int width = 1;
+ int height = 1;
// prepare the tune, advanced options, profile and level
if ([(tmpString = [self x264Tune]) length])
{
{
h264_level = [tmpString UTF8String];
}
- // prepare the width and height (FIXME)
- unparse_width = 1280;
- unparse_height = 720;
+ // width and height must be non-zero
+ if (fX264PresetsWidthForUnparse && fX264PresetsHeightForUnparse)
+ {
+ width = fX264PresetsWidthForUnparse;
+ height = fX264PresetsHeightForUnparse;
+ }
// free the previous unparsed string
free(fX264PresetsUnparsedUTF8String);
// now, unparse
advanced_opts,
h264_profile,
h264_level,
- unparse_width,
- unparse_height);
+ width, height);
// update the text field
[fDisplayX264PresetsUnparseTextField setStringValue:
[NSString stringWithFormat:@"x264 Unparse: %s",
}
[fVideoFiltersField setStringValue: [NSString stringWithFormat:@"Video Filters: %@", videoFilters]];
+ /* Store storage resolution for unparse */
+ fX264PresetsWidthForUnparse = fTitle->job->width;
+ fX264PresetsHeightForUnparse = fTitle->job->height;
+ // width or height may have changed, unparse
+ [self x264PresetsChangedDisplayExpandedOptions:nil];
+
//[fPictureController reloadStillPreview];
}