GStreamer 中架构 arm64 的未定义符号

Undefined symbols for architecture arm64 in GStreamer

我已将 GStreamer 添加到我的 iOS 项目中,我收到的一些错误如下:

Undefined symbols for architecture arm64:
  "_kVTCompressionPropertyKey_Quality", referenced from:
      _gst_vtenc_set_quality in GStreamer(libgstapplemedia_a_arm64_-libgstapplemedia_la-vtenc.o)
  "_VTCompressionSessionInvalidate", referenced from:
      _gst_vtenc_destroy_session in GStreamer(libgstapplemedia_a_arm64_-libgstapplemedia_la-vtenc.o)
  "_kVTCompressionPropertyKey_NumberOfPendingFrames", referenced from:
      _gst_vtenc_handle_frame in GStreamer(libgstapplemedia_a_arm64_-libgstapplemedia_la-vtenc.o)
  "_VTSessionCopyProperty", referenced from:
      _gst_vtenc_handle_frame in GStreamer(libgstapplemedia_a_arm64_-libgstapplemedia_la-vtenc.o)
      _gst_vtenc_session_dump_property in GStreamer(libgstapplemedia_a_arm64_-libgstapplemedia_la-vtenc.o)
  "_kVTCompressionPropertyKey_ExpectedFrameRate", referenced from:
      _gst_vtenc_set_format in GStreamer(libgstapplemedia_a_arm64_-libgstapplemedia_la-vtenc.o)
  "_VTCompressionSessionCompleteFrames", referenced from:
      _gst_vtenc_finish in GStreamer(libgstapplemedia_a_arm64_-libgstapplemedia_la-vtenc.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我在构建阶段库中包含了例如:

GStreamer.framework
libiconv.tbd
libresolv.tbd
libstdc++.6.0.9.tbd

但我还是明白了。有什么建议吗?

您需要 link 您的项目 VideoToolbox.framework,因为其中定义了来自错误(VTCompressionSessionInvalidateVTCompressionPropertyKey_Quality)的符号。