VideoCore
c++ 編寫(xiě)的推流器疤剑,還有 filter 提供
boost
編譯 & 運(yùn)行遇到的問(wèn)題
1站叼、pod install: Could not automatically select an Xcode workspace. Specify one in your Podfile like so:
配置 podfile 修改如下:
source 'https://github.com/CocoaPods/Specs.git'
target 'SampleBroadcaster' do
#use_frameworks!
#platform :ios, '8.0'
# See: http://guides.cocoapods.org/making/making-a-cocoapod.html#release
# Once the pod has been released, use a version number here instead of a path.
#pod 'VideoCore', '~>0.3.2'
pod 'VideoCore', path: '../..'
end
2始苇、VideoCore之'type_half.inl' file not found
修改引用 header
Pod -> Target -> VideoCore -> Build Settings -> Header Search Paths
-> "${PODS_ROOT}/Headers/Public/glm" -> recursive
3绰上、Unknown type name 'PermissionBlock'
添加定義
typedef void(^PermissionBlock)(BOOL granted);
4退腥、Undefined symbol: videocore::Apple::H264Encode
Undefined symbol: videocore::Apple::H264Encode::~H264Encode()
Undefined symbol: videocore::Apple::H264Encode::H264Encode(int, int, int, int, bool, int)
修改
VCSimpleSession.mm
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
->
if (!TARGET_OS_IPHONE && SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0"))
5城瞎、權(quán)限
SampleBroadcaster-Info.plist
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
6拳魁、Main Thread Checker: UI API called on a background thread: -[UIApplication statusBarOrientation]
多處 [UIApplication statusBarOrientation] 調(diào)用都是在子線(xiàn)程里乘客,Xcode 也有提示狐血,需要一一修改,下面修改針對(duì)啟動(dòng)易核,修改方向部分也有這個(gè)問(wèn)題匈织。但這個(gè)不崩潰,只是會(huì)警告和嚴(yán)重影響啟動(dòng)速度
VCSimpleSession.mm
// dispatch_async(_graphManagementQueue, ^{
[bSelf setupGraph];
// });