gpt4 book ai didi

ios - 值转换问题 : Implicit conversion loses integer precision: 'NSInteger' (aka 'long' ) to 'int32_t' (aka 'int' )

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:58:19 35 4
gpt4 key购买 nike

<分区>

我已将我的 Xcode 版本从 5.0 升级到 5.1,并开始在 GPUImage 库中出现以下错误 GPUImageVideoCamera.m:301:54:隐式转换会丢失整数精度:“NSInteger”(又名“long”)到“int32_t”(又名“int”)

在下面这一行的函数中“connection.videoMaxFrameDuration = CMTimeMake(1, _frameRate);”发生错误。

- (void)setFrameRate:(NSInteger)frameRate;
{

_frameRate = frameRate;

if (_frameRate > 0)
{

for (AVCaptureConnection *connection in videoOutput.connections)
{

if ([connection respondsToSelector:@selector(setVideoMinFrameDuration:)])

connection.videoMinFrameDuration = CMTimeMake(1, _frameRate);

if ([connection respondsToSelector:@selector(setVideoMaxFrameDuration:)])

connection.videoMaxFrameDuration = CMTimeMake(1, _frameRate);

}
}

else

{
for (AVCaptureConnection *connection in videoOutput.connections)

{
if ([connection respondsToSelector:@selector(setVideoMinFrameDuration:)])

connection.videoMinFrameDuration = kCMTimeInvalid;
// This sets videoMinFrameDuration back to default

if ([connection respondsToSelector:@selector(setVideoMaxFrameDuration:)])

connection.videoMaxFrameDuration = kCMTimeInvalid;
// This sets videoMaxFrameDuration back to default

}
}
}

enter image description here

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com