0

定格动画应用

尝试通过从步进器收到的用户值设置帧持续时间 (/.5): self.stepperValue;

每秒五帧的原始设置硬编码值

// 5 fps - taking 5 pictures will equal 1 second of video
frameDuration = CMTimeMakeWithSeconds(1./5., 90000);

现在尝试由步进值确定的每秒帧数,到目前为止我尝试过的内容(stepperValue 被正确读取)

 int x = self.stepperValue;
 frameDuration = CMTimeMakeWithSeconds(1./x, 90000);

这导致没有被捕获

第二次尝试

 float a = ([_stepperValue.text floatValue]);


// 5 fps - taking 5 pictures will equal 1 second of video
frameDuration = CMTimeMakeWithSeconds(1./a, 90000);

无论从步进器输入值,这都会产生标准的每秒 5 帧的值

4

1 回答 1

0

修复了这个

 Float64 seconds = ([_stepperValue.text floatValue]);

 frameDuration = CMTimeMakeWithSeconds(1./seconds, 90000);
于 2013-08-18T14:49:19.333 回答