Encode canvas pick timing with macOS CoreMedia dictionaries
这个提交包含在:
1 父节点
c9bd52fff5
当前提交
e241f2a3e5
4 个文件已更改
+6
-6
没有与搜索条件相匹配的文件
+3
-3
@@ -50,12 +50,12 @@
|
||||
- (void)applyValues:(NSDictionary*)values{if(!values){[self alert:@"尚未拿到当前片段画面,请移动播放头后重试。"];return;}id<FxCustomParameterActionAPI_v4>a=[_apiManager apiForProtocol:@protocol(FxCustomParameterActionAPI_v4)];[a startAction:self];@try{id<FxParameterSettingAPI_v6>s=[_apiManager apiForProtocol:@protocol(FxParameterSettingAPI_v6)];for(NSDictionary*r in DYDescriptors()){NSNumber*v=values[r[@"key"]];if(v)[s setFloatValue:v.doubleValue toParameter:[r[@"pid"]unsignedIntValue] atTime:a.currentTime];}}@finally{[a endAction:self];}[NSNotificationCenter.defaultCenter postNotificationName:DYModelChanged object:_apiManager];}
|
||||
- (void)autoRequested:(NSNotification*)n{NSData*frame=[_renderer preview];[self applyValues:[n.name isEqual:@"DYAutoGrade"]?DYAutoGrade(frame):DYAutoWhiteBalance(frame)];}
|
||||
- (void)canvasWhiteBalanceRequested:(NSNotification*)note {
|
||||
CMTime time=[(NSValue*)note.userInfo[@"time"] CMTimeValue];
|
||||
CMTime time=CMTimeMakeFromDictionary((CFDictionaryRef)note.userInfo[@"time"]);
|
||||
if(_canvasSampler||!CMTIME_IS_NUMERIC(time))return;
|
||||
_canvasSampler=[NSColorSampler new];
|
||||
[_canvasSampler showSamplerWithSelectionHandler:^(NSColor *color){
|
||||
[self->_canvasSampler release];self->_canvasSampler=nil;
|
||||
if(color)[NSNotificationCenter.defaultCenter postNotificationName:@"DYWhiteBalanceColor" object:self->_apiManager userInfo:@{@"color":color,@"time":[NSValue valueWithCMTime:time]}];
|
||||
if(color)[NSNotificationCenter.defaultCenter postNotificationName:@"DYWhiteBalanceColor" object:self->_apiManager userInfo:@{@"color":color,@"time":[(NSDictionary*)CMTimeCopyAsDictionary(time,kCFAllocatorDefault) autorelease]}];
|
||||
}];
|
||||
}
|
||||
- (void)applyCanvasWhiteBalance:(NSDictionary*)values atTime:(CMTime)time {
|
||||
@@ -96,7 +96,7 @@
|
||||
[self alert:@"所选颜色过暗,请选择白色或中性灰区域。"];return;
|
||||
}
|
||||
NSDictionary *values=@{@"temperature":@(temperature),@"tint":@(tint)};
|
||||
if(n.userInfo[@"time"])[self applyCanvasWhiteBalance:values atTime:[(NSValue*)n.userInfo[@"time"] CMTimeValue]];
|
||||
if(n.userInfo[@"time"])[self applyCanvasWhiteBalance:values atTime:CMTimeMakeFromDictionary((CFDictionaryRef)n.userInfo[@"time"])];
|
||||
else [self applyValues:values];
|
||||
}
|
||||
@end
|
||||
|
||||
在新工单中引用
屏蔽一个用户