Mac 下AppRTCDemo xcode 工程搭建和webrtc源码下载

来源:互联网 发布:网络加速的原理 编辑:程序博客网 时间:2024/06/06 02:45
提示(若不想自己下载源码或是编译,可到我的网盘提取: https://yunpan.cn/cYCbp5zIAAUqq  访问密码 ff5a

一、

(1) git clone https://github.com/pristineio/webrtc-build-scripts.git
(2)打开xcode工程,切换到WebRTC Dance,运行,则开始下载并编译代码(必须可以翻墙)


(3)切换到AppRTCDemo,运行


参考网址:

http://tech.pristine.io/build-ios-apprtc/


二、运行AppRTCDemo,可能会 遇到以下错误:

1. 

Undefined symbols for architecture armv7:

  "_kVTProfileLevel_H264_Baseline_AutoLevel", referenced from:

      webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession() in libWebRTC.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.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_kVTCompressionPropertyKey_RealTime", referenced from:

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

  "_kVTCompressionPropertyKey_ProfileLevel", referenced from:

      webrtc::H264VideoToolboxEncoder::ConfigureCompressionSession() in libWebRTC.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.a(webrtc_h264_video_toolbox.h264_video_toolbox_encoder.o)

  "_VTCompressionSessionInvalidate", referenced from:

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

  "_kVTDecompressionPropertyKey_RealTime", referenced from:


解决:如下图,添加VideoToolbox.framework








2.  如下图错误:

.

解决:
到下面目录添加:ARDUtilities.h/m文件





3. demo起来后,iphone手机端没有视频

WebRtc VoiceEngine codecs:

opus/48000/2 (111)

ISAC/16000/1 (103)

G722/8000/1 (9)

ILBC/8000/1 (102)

PCMU/8000/1 (0)

PCMA/8000/1 (8)

CN/32000/1 (106)

CN/16000/1 (105)

CN/8000/1 (13)

red/8000/1 (127)

telephone-event/8000/1 (126)

WebRtcVoiceEngine::Init Done!

WebRtcVideoEngine2::Init

Applying audio options: AudioOptions {aec: false, agc: false, ns: true, hf: true, swap: false, audio_jitter_buffer_max_packets: 50, audio_jitter_buffer_fast_accelerate: false, typing: false, conference: false, agc_delta: 0, experimental_agc: false, extended_filter_aec: false, delay_agnostic_aec: false, experimental_ns: false, aec_dump: false, }

webrtc: Built-in AEC not supported on this platform

High pass filter enabled? 1

Stereo swapping enabled? 0

NetEq capacity is 50

NetEq fast mode? 0

Typing detection is enabled? 0

webrtc: (voe_audio_processing_impl.cc:1007): virtual int webrtc::VoEAudioProcessingImpl::SetTypingDetectionStatus(bool): not supported

SetTypingDetectionStatus(0) failed, err=8003

Adjust agc delta is 0

Adjusting AGC level from default -3dB to -3dB

Aec dump is enabled? 0

Delay agnostic aec is enabled? 0

Extended filter aec is enabled? 0

Experimental ns is enabled? 0

Making key pair

2015-07-08 16:25:08.366 AppRTCDemo[1419:60b] Client connecting.

2015-07-08 16:25:08.379 AppRTCDemo[1419:60b] Joining room:551667448 on room server.

Returning key pair

Making certificate for WebRTC

Returning certificate



iphone手机端没有视频,是因为手机不能翻墙,

/src/talk/examples/objc/AppRTCDemo目录下替换ARDAppEngineClient.m和ARDCEODTURNClient.m两个文件 ,主要是将https://apprtc.appspot.com/  替换成 http://apprtc.diveinedu.com:8080(无需翻墙)


ARDAppEngineClient.mARDCEODTURNClient.m

0 0
原创粉丝点击