How to use the static libraries generated when build AppRtcDemo for iOS?

956 views
Skip to first unread message

胡海

unread,
Sep 11, 2015, 2:06:01 AM9/11/15
to discuss-webrtc
I built AppRtcDemo for iOS as demontrated on https://sites.google.com/site/webrtc/native-code/ios.I want to build my own webrtc demo application, so I copied all static libraries under "out_ios/Debug-iphoneos"  and all headers under "/talk/app/webrtc/objc/public/" to my iOS application project.The build process can be finished without an error, however, when application runs on my iPhone it crashed when 'RTCPeerConnectionFactory' initializing.My code is like:

[RTCPeerConnectionFactory initializeSSL];

_factory = [[RTCPeerConnectionFactory alloc] init];


I do the same things on an earlier version webrtc checkout(current version is updated yesterday, earlier version was checked out about 3 month ago), all things goes well!

I don't know why!

胡海

unread,
Sep 11, 2015, 3:27:35 AM9/11/15
to discuss-webrtc
I create a new xcode project and import all the static libraries and headers to it, it built failed,error info is:

Undefined symbols for architecture armv7:

  "_kVTProfileLevel_H264_Baseline_AutoLevel", referenced from:

      webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_kVTEncodeFrameOptionKey_ForceKeyFrame", referenced from:

      webrtc::H264VideoToolboxEncoder::Encode(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*, std::__1::vector<webrtc::VideoFrameType, std::__1::allocator<webrtc::VideoFrameType> > const*) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_kVTCompressionPropertyKey_RealTime", referenced from:

      webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_kVTCompressionPropertyKey_ProfileLevel", referenced from:

      webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_VTCompressionSessionGetPixelBufferPool", referenced from:

      webrtc::H264VideoToolboxEncoder::Encode(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*, std::__1::vector<webrtc::VideoFrameType, std::__1::allocator<webrtc::VideoFrameType> > const*) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_VTCompressionSessionInvalidate", referenced from:

      webrtc::H264VideoToolboxEncoder::DestroyCompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_kVTDecompressionPropertyKey_RealTime", referenced from:

      webrtc::H264VideoToolboxDecoder::ConfigureDecompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_decoder.o)

  "_VTCompressionSessionCreate", referenced from:

      webrtc::H264VideoToolboxEncoder::ResetCompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_VTCompressionSessionEncodeFrame", referenced from:

      webrtc::H264VideoToolboxEncoder::Encode(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*, std::__1::vector<webrtc::VideoFrameType, std::__1::allocator<webrtc::VideoFrameType> > const*) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_VTSessionSetProperty", referenced from:

      webrtc::H264VideoToolboxDecoder::ConfigureDecompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_decoder.o)

      internal::SetVTSessionProperty(void const*, __CFString const*, int) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

      internal::SetVTSessionProperty(void const*, __CFString const*, bool) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

      internal::SetVTSessionProperty(void const*, __CFString const*, __CFString const*) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_kVTCompressionPropertyKey_AverageBitRate", referenced from:

      webrtc::H264VideoToolboxEncoder::SetRates(unsigned int, unsigned int) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

      webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_VTDecompressionSessionCreate", referenced from:

      webrtc::H264VideoToolboxDecoder::ResetDecompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_decoder.o)

  "_kVTCompressionPropertyKey_AllowFrameReordering", referenced from:

      webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_VTDecompressionSessionDecodeFrame", referenced from:

      webrtc::H264VideoToolboxDecoder::Decode(webrtc::EncodedImage const&, bool, webrtc::RTPFragmentationHeader const*, webrtc::CodecSpecificInfo const*, long long) in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_decoder.o)

  "_VTDecompressionSessionInvalidate", referenced from:

      webrtc::H264VideoToolboxDecoder::DestroyDecompressionSession() in libwebrtc_h264_video_toolbox.a(webrtc_h264_video_toolbox.h264_video_toolbox_decoder.o)

ld: symbol(s) not found for architecture armv7

clang: error: linker command failed with exit code 1 (use -v to see invocation)


在 2015年9月11日星期五 UTC+8下午2:06:01,胡海写道:

胡海

unread,
Sep 11, 2015, 5:04:56 AM9/11/15
to discuss-webrtc
I fixed it!The build errors is because of lack of "VideoToolbox.framework"!After I added it to my second project all thing goes well!


在 2015年9月11日星期五 UTC+8下午2:06:01,胡海写道:
I built AppRtcDemo for iOS as demontrated on https://sites.google.com/site/webrtc/native-code/ios.I want to build my own webrtc demo application, so I copied all static libraries under "out_ios/Debug-iphoneos"  and all headers under "/talk/app/webrtc/objc/public/" to my iOS application project.The build process can be finished without an error, however, when application runs on my iPhone it crashed when 'RTCPeerConnectionFactory' initializing.My code is like:
Reply all
Reply to author
Forward
0 new messages