Skip to content

Commit

Permalink
update library and headers
Browse files Browse the repository at this point in the history
  • Loading branch information
lawder committed Feb 28, 2017
1 parent 08fbeff commit b729f3f
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Pod/Library/include/Common/PLAudioCaptureConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
*/
@property (nonatomic, assign) NSUInteger channelsPerFrame;

/**
@brief 回声消除开关,默认为 NO
@discussion 普通直播用到回声消除的场景不多,当用户开启返听功能,并且使用外放时,可打开这个开关,防止产生尖锐的啸叫声。
*/
@property (nonatomic, assign) BOOL acousticEchoCancellationEnable;

/**
@brief 创建一个默认配置的 PLAudioCaptureConfiguration 实例.
Expand Down
11 changes: 11 additions & 0 deletions Pod/Library/include/Common/PLAudioStreamingConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
*/
@property (nonatomic, assign) UInt32 encodedNumberOfChannels; // default as 1

/**
@brief 编码模式,默认为 PLAACEncoderType_iOS_AAC
*/
@property (nonatomic, assign) PLAACEncoderType audioEncoderType;

/**
@brief 输入的音频流描述,默认为单路音频 @[kPLAudioChannelDefault]
Expand Down Expand Up @@ -66,4 +71,10 @@
audioBitRate:(PLStreamingAudioBitRate)audioBitRate
inputAudioChannelDescriptions:(NSArray *)inputAudioChannelDescriptions;

- (instancetype)initWithEncodedAudioSampleRate:(PLStreamingAudioSampleRate)sampleRate
encodedNumberOfChannels:(UInt32)numberOfChannels
audioEncoderType:(PLAACEncoderType)audioEncoderType
audioBitRate:(PLStreamingAudioBitRate)audioBitRate
inputAudioChannelDescriptions:(NSArray *)inputAudioChannelDescriptions;

@end
25 changes: 25 additions & 0 deletions Pod/Library/include/Common/PLTypeDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,25 @@ typedef NS_ENUM(NSUInteger, PLH264EncoderType) {
PLH264EncoderType_VideoToolbox // iOS 8 及以上系统版本可用 VideoToolbox 编码器,编码效率更优
};

/**
@brief 音频编码模式
*/
typedef NS_ENUM(NSUInteger, PLAACEncoderType) {
/**
@brief iOS AAC(硬编)
*/
PLAACEncoderType_iOS_AAC,
/**
@brief fdk-aac AAC
*/
PLAACEncoderType_fdk_AAC_LC,
/**
@brief fdk-aac HE-AAC
*/
PLAACEncoderType_fdk_AAC__HE_BSR

};

#pragma mark - Audio SampleRate

/*!
Expand Down Expand Up @@ -447,6 +466,12 @@ typedef NS_OPTIONS(NSUInteger, PLRTCConferenceType) {
PLRTCConferenceTypeAudioAndVideo
};

///连麦视频格式
typedef NS_OPTIONS(NSUInteger, PLRTCVideoFormat) {
PLRTCVideoFormatNV12 = 0,
PLRTCVideoFormatI420 = 1
};

/// 断线后是否自动重新加入房间,默认为 YES
extern const NSString *kPLRTCAutoRejoinKey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
/// @abstract userID 离开房间
- (void)mediaStreamingSession:(PLMediaStreamingSession *)session didLeaveConferenceOfUserID:(NSString *)userID;

/// @abstract 连麦时,SDK 内部不渲染连麦者(以 userID 标识)的视频,而由该接口返回相应的视频数据
/// @ warning pixelBuffer必须在用完之后手动释放,否则会引起内存泄漏
- (void)mediaStreamingSession:(PLMediaStreamingSession *)session didGetPixelBuffer:(CVPixelBufferRef)pixelBuffer ofUserID:(NSString *)userID;

/// @abstract 连麦时,对方(以 userID 标识)取消视频的数据回调
- (void)mediaStreamingSession:(PLMediaStreamingSession *)session didLostPixelBufferOfUserID:(NSString *)userID;

@end

#pragma mark - basic
Expand Down
14 changes: 14 additions & 0 deletions Pod/Library/include/PLRTCStreamingKit/PLRTCStreamingSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
/// @abstract userID 离开房间
- (void)RTCStreamingSession:(PLRTCStreamingSession *)session didLeaveConferenceOfUserID:(NSString *)userID;

/// @abstract 连麦时,SDK 内部不渲染连麦者(以 userID 标识)的视频,而由该接口返回相应的视频数据
/// @ warning pixelBuffer必须在用完之后手动释放,否则会引起内存泄漏
- (void)RTCStreamingSession:(PLRTCStreamingSession *)session didGetPixelBuffer:(CVPixelBufferRef)pixelBuffer ofUserID:(NSString *)userID;

/// @abstract 连麦时,对方(以 userID 标识)取消视频的数据回调
- (void)RTCStreamingSession:(PLRTCStreamingSession *)session didLostPixelBufferOfUserID:(NSString *)userID;

@end

@interface PLRTCStreamingSession : NSObject
Expand Down Expand Up @@ -418,6 +425,13 @@
*/
@property (nonatomic, strong) NSDictionary *rtcOption;

/**
@abstract 外部传入用于连麦的视频格式
@warning 要调用此接口请确保工程中已经引入了 PLMediaStreamingKit(RTC).a,如果没有引入该静态库,调用该接口会导致程序抛 exception
*/
@property (nonatomic, assign) PLRTCVideoFormat rtcVideoFormat;

/*!
* 开始连麦
*
Expand Down
Binary file modified Pod/Library/libPLMediaStreamingKit.a
Binary file not shown.
Binary file added Pod/Library/libfdk-aac.a
Binary file not shown.

0 comments on commit b729f3f

Please sign in to comment.