ffi_prep_cif()返回了FFI_BAD_TYPEDEF错误

时间:2016-08-30 00:15:46

标签: objective-c node.js macos avfoundation nodobjc

我正在尝试将以下代码从Objective-C移植到Node.js:

[[self.output connectionWithMediaType:AVMediaTypeVideo] setVideoMinFrameDuration: CMTimeMake(1, 30)];

我写的是:

this.output('connectionWithMediaType', macOS.AVMediaTypeVideo)('setVideoMinFrameDuration', macOS.CMTimeMake(1, 30));

其中macOSNodObjC个实例。

当我运行它时,我得到以下内容:

App threw an error during load
Error: ffi_prep_cif() returned an FFI_BAD_TYPEDEF error
at CIF (/Users/matheus/dev/node/aperture/node_modules/ffi/lib/cif.js:60:19)
at Object.ForeignFunction (/Users/matheus/dev/node/aperture/node_modules/ffi/lib/foreign_function.js:33:13)
at Object.createUnwrapperFunction (/Users/matheus/dev/node/aperture/node_modules/nodobjc/lib/core.js:299:22)
at ID.module.exports.Class.msgSend (/Users/matheus/dev/node/aperture/node_modules/nodobjc/lib/class.js:186:53)
at rtn (/Users/matheus/dev/node/aperture/node_modules/nodobjc/lib/core.js:375:47)
at new Aperture (/Users/matheus/dev/node/aperture/lib/main.js:40:65)
at Object.module.exports [as main] (/Users/matheus/dev/node/aperture/lib/main.js:95:9)
at Object.<anonymous> (/Users/matheus/dev/node/focus/index.js:2:41)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)

应用程序中的其他所有内容都在工作 - 也就是说,我移植了所有其他代码行并且它正在运行。

谢谢!

0 个答案:

没有答案