VideoCore 项目的编译 & 运行

VideoCore


c++ 编写的推流器,还有 filter 提供

  • jgh-/VideoCore-Inactive: No longer in development Please see https://github.com/unpause-live/SwiftVideo

boost

  • Boost库
  • C++ boost库介绍以及开发环境搭建

编译 & 运行遇到的问题

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、权限

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] 调用都是在子线程里,Xcode 也有提示,需要一一修改,下面修改针对启动,修改方向部分也有这个问题。但这个不崩溃,只是会警告和严重影响启动速度

VCSimpleSession.mm

// dispatch_async(_graphManagementQueue, ^{
    [bSelf setupGraph];
// });

你可能感兴趣的:(VideoCore 项目的编译 & 运行)