@property (nonatomic, readwrite, copy) NSString *denoiseCustomString;
@property (nonatomic, readwrite) int deblock;
+@property (nonatomic, readwrite) int rotate;
@property (nonatomic, readwrite) BOOL grayscale;
@property (nonatomic, readwrite, weak, nullable) NSUndoManager *undo;
[self postChangedNotification];
}
+- (void)setRotate:(int)rotate
+{
+ if (rotate != _rotate)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setRotate:_rotate];
+ }
+ _rotate = rotate;
+ [self postChangedNotification];
+}
+
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key
{
NSSet *retval = nil;
copy->_deblock = _deblock;
copy->_grayscale = _grayscale;
+ copy->_rotate = _rotate;
}
return copy;
encodeInt(_deblock);
encodeBool(_grayscale);
+ encodeInt(_rotate);
}
- (instancetype)initWithCoder:(NSCoder *)decoder
decodeInt(_deblock);
decodeBool(_grayscale);
+ decodeInt(_rotate);
_notificationsEnabled = YES;
preset[@"PictureDeblock"] = @(self.deblock);
preset[@"VideoGrayScale"] = @(self.grayscale);
+ preset[@"PictureRotate"] = @(self.grayscale);
}
- (void)applyPreset:(HBPreset *)preset
self.deblock = [preset[@"PictureDeblock"] intValue];
self.grayscale = [preset[@"VideoGrayScale"] boolValue];
+ self.rotate = [preset[@"PictureRotate"] intValue];
}
self.notificationsEnabled = YES;
hb_add_filter(job, filter, NULL);
}
+ // Add rotate filter
+ if (self.filters.rotate)
+ {
+ filter = hb_filter_init(HB_FILTER_ROTATE);
+ hb_add_filter(job, filter, [NSString stringWithFormat:@"%d", self.filters.rotate].UTF8String);
+ }
+
// Add framerate shaping filter
filter = hb_filter_init(HB_FILTER_VFR);
hb_add_filter(job, filter, [[NSString stringWithFormat:@"%d:%d:%d",