Skip to content

Commit

Permalink
Merge pull request #84 from HeraShowFeng/v6.2.0-docs
Browse files Browse the repository at this point in the history
v6.2.0 release
  • Loading branch information
HeraShowFeng authored May 31, 2024
2 parents 300ffd0 + 48a842a commit 8c14df3
Show file tree
Hide file tree
Showing 69 changed files with 11,520 additions and 10,860 deletions.
4 changes: 2 additions & 2 deletions APIDiffs/api-diffs-6.1.0.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# QNRTCKit 5.2.7 to 6.0.0 API Differences
# None
# QNRTCKit 6.0.0 to 6.1.0 API Differences
# None
46 changes: 46 additions & 0 deletions APIDiffs/api-diffs-6.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# QNRTCKit 6.1.0 to 6.2.0 API Differences

## General Headers

```
QNRTC.h
```
- *Added* method `+ (QNMediaRecorder *)createMediaRecorder;`

```
QNMediaRecorder.h
```
- *Added* property `@property (nonatomic, weak) id<QNMediaRecorderDelegate> delegate;`
- *Added* method `- (int)startRecording:(QNMediaRecorderConfig *)configuration;`
- *Added* method `- (int)stopRecording;`

```
QNMediaRecorderConfig.h
```

- *Added* property `@property (nonatomic, copy, readonly) NSString * _Nullable filePath;`
- *Added* property `@property (nonatomic, strong, readonly) QNLocalAudioTrack *localAudioTrack;`
- *Added* property `@property (nonatomic, strong, readonly) QNLocalVideoTrack *localVideoTrack;`
- *Added* method `- (instancetype)initWithFilePath:(NSString *_Nullable)filePath localAudioTrack:(QNLocalAudioTrack *_Nullable)localAudioTrack localVideoTrack:(QNLocalVideoTrack *_Nullable)localVideoTrack;`

```
QNMediaRecordInfo.h
```

- *Added* property `@property(nonatomic, copy, readonly) NSString * _Nullable filePath;`
- *Added* property `@property(nonatomic, assign, readonly) int32_t fileSize;`
- *Added* property `@property(nonatomic, assign, readonly) int64_t duration;`

```
QNMediaRecorderDelegate
```

- *Added* method `- (void)mediaRecorder:(QNMediaRecorder* _Nonnull)recorder infoDidUpdated:(QNMediaRecordInfo* _Nonnull)info;`
- *Added* method `- (void)mediaRecorder:(QNMediaRecorder* _Nonnull)recorder stateDidChanged:(QNMediaRecorderState)state reason:(QNMediaRecorderReasonCode)reason;`

```
QNTypeDefines
```
- *Added* `QNMediaRecorderState`
- *Added* `QNMediaRecorderReasonCode`
```
Binary file modified Pod/iphoneos/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion Pod/iphoneos/QNRTCKit.framework.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>6.1.0</string>
<string>6.2.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
Expand Down
Binary file not shown.

Large diffs are not rendered by default.

Binary file modified Pod/iphoneos/QNRTCKit.framework/.DS_Store
Binary file not shown.
41 changes: 41 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNMediaRecordInfo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// QNMediaRecordInfo.h
// QNRTCKit
//
// Created by 冯文秀 on 2024/4/7.
// Copyright © 2024 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QNTypeDefines.h"

NS_ASSUME_NONNULL_BEGIN

@interface QNMediaRecordInfo : NSObject

/*!
* @abstract 录制文件的存储路径
*
* @discussion 支持 wav、aac、h264、mp4 格式
*
* @since v6.2.0
*/
@property(nonatomic, copy, readonly) NSString * _Nullable filePath;

/*!
* @abstract 录制文件的大小,单位为字节
*
* @since v6.2.0
*/
@property(nonatomic, assign, readonly) int32_t fileSize;

/*!
* @abstract 录制文件的时长,单位毫秒
*
* @since v6.2.0
*/
@property(nonatomic, assign, readonly) int64_t duration;

@end

NS_ASSUME_NONNULL_END
78 changes: 78 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNMediaRecorder.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
//
// QNMediaRecorder.h
// QNRTCKit
//
// Created by 冯文秀 on 2024/4/3.
// Copyright © 2024 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QNTypeDefines.h"
#import "QNMediaRecordInfo.h"
#import "QNMediaRecorderConfig.h"

NS_ASSUME_NONNULL_BEGIN

@class QNMediaRecorder;

@protocol QNMediaRecorderDelegate <NSObject>

/*!
* @abstract 录制信息更新回调
*
* @param recorder 音视频录制实例
*
* @param info 音视频录制完成的信息
*
* @since v6.2.0
*/
- (void)mediaRecorder:(QNMediaRecorder* _Nonnull)recorder infoDidUpdated:(QNMediaRecordInfo* _Nonnull)info;

/*!
* @abstract 录制状态发生变化回调
*
* @warning 出现错误状态时,会自动停止录制并回调错误信息
*
* @param recorder 音视频录制实例
*
* @param state 录制状态
*
* @param reason 录制错误信息
*
* @since v6.2.0
*/
- (void)mediaRecorder:(QNMediaRecorder* _Nonnull)recorder stateDidChanged:(QNMediaRecorderState)state reason:(QNMediaRecorderReasonCode)reason;

@end

@interface QNMediaRecorder : NSObject

- (instancetype)init NS_UNAVAILABLE;

/*!
* @abstract 录制信息回调代理
*
* @since v6.2.0
*/
@property (nonatomic, weak) id<QNMediaRecorderDelegate> delegate;

/*!
* @abstract 开始音视频录制
*
* @return 返回 0 成功,其他失败
*
* @since v6.2.0
*/
- (int)startRecording:(QNMediaRecorderConfig *)configuration;

/*!
* @abstract 停止音视频录制
*
* @return 返回 0 成功,其他失败
*
* @since v6.2.0
*/
- (int)stopRecording;
@end

NS_ASSUME_NONNULL_END
64 changes: 64 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNMediaRecorderConfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// QNMediaRecorderConfig.h
// QNRTCKit
//
// Created by 冯文秀 on 2024/4/3.
// Copyright © 2024 Pili Engineering, Qiniu Inc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QNTypeDefines.h"
#import "QNTrack.h"

NS_ASSUME_NONNULL_BEGIN

@interface QNMediaRecorderConfig : NSObject
/*!
* @abstract 文件路径
*
* @warning 自定义传入的路径,请确保路径完整精确到文件名和类型,存在有效且可读可写
* 传空则默认存储在 App Container/Library/Caches/Pili/RecordFile
*
* @discussion 支持 aac、wav、h264、mp4
*
* @since v6.2.0
*/
@property (nonatomic, copy, readonly) NSString * _Nullable filePath;

/*!
* @abstract 本地音频,支持麦克风或自定义音频
*
* @discussion 仅支持一路音频轨的设置,重复设置会被覆盖
*
* @since v6.2.0
*/
@property (nonatomic, strong, readonly) QNLocalAudioTrack *localAudioTrack;

/*!
* @abstract 本地视频,支持摄像头或自定义视频
*
* @discussion 仅支持一路视频轨的设置,重复设置会被覆盖
*
* @since v6.2.0
*/
@property (nonatomic, strong, readonly) QNLocalVideoTrack *localVideoTrack;

/*!
* @abstract 初始化指定文件路径、本地音频录制 Track。
*
* @param filePath 文件路径,传空默认存储在 App Container/Library/Caches/Pili/RecordFile
*
* @param localAudioTrack 本地音频 Track
*
* @param localVideoTrack 本地视频 Track
*
* @return 音视频录制配置实例
*
* @since v6.2.0
*/
- (instancetype)initWithFilePath:(NSString *_Nullable)filePath
localAudioTrack:(QNLocalAudioTrack *_Nullable)localAudioTrack
localVideoTrack:(QNLocalVideoTrack *_Nullable)localVideoTrack;
@end

NS_ASSUME_NONNULL_END
8 changes: 8 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNRTC.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#import "QNTrack.h"
#import "QNRTCLogConfiguration.h"
#import "QNCDNStreamingClient.h"
#import "QNMediaRecorder.h"

@class QNRTC;
@class QNRTCConfiguration;
Expand Down Expand Up @@ -164,6 +165,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
+ (QNCustomVideoTrack *)createCustomVideoTrackWithConfig:(QNCustomVideoTrackConfig *)configuration;

/*!
* @abstract 创建音视频录制对象
*
* @since v6.2.0
*/
+ (QNMediaRecorder *)createMediaRecorder;

/*!
* @abstract 创建背景音乐混音对象实例
*
Expand Down
4 changes: 4 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNRTCKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ FOUNDATION_EXPORT const unsigned char QNRTCKitVersionString[];
#import <QNRTCKit/QNAudioSourceMixer.h>
#import <QNRTCKit/QNAudioVolumeInfo.h>
#import <QNRTCKit/QNCDNStreamingClient.h>
#import <QNRTCKit/QNMediaRecorder.h>
#import <QNRTCKit/QNMediaRecordInfo.h>
#import <QNRTCKit/QNMediaRecorderConfig.h>




71 changes: 71 additions & 0 deletions Pod/iphoneos/QNRTCKit.framework/Headers/QNTypeDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ extern NSString *QNMediaRelayErrorDomain;

extern NSString *QNAudioMixErrorDomain;

extern NSString *QNMediaRecorderErrorDomain;

#pragma mark - RTC Log Level

/*!
Expand Down Expand Up @@ -976,6 +978,75 @@ typedef NS_ENUM(NSUInteger, QNVideoFormatPreset) {
QNVideoFormatPresetNone = 0XFF,
};

/*!
* @abstract 音视频录制状态
*/
typedef NS_ENUM(NSUInteger, QNMediaRecorderState) {
/*!
* @abstract 停止录制
*/
QNMediaRecorderStateStopped = 0,

/*!
* @abstract 录制中
*/
QNMediaRecorderStateRecording,


/*!
* @abstract 发生错误
*/
QNMediaRecorderStateError,
};

#pragma mark - Media Recorder Error Code
typedef NS_ENUM(NSInteger, QNMediaRecorderReasonCode) {
/*!
* @abstract No error 一切正常
*/
QNMediaRecorderReasonCodeNoError = 0,

/*!
* @abstract Format failed 封装格式操作失败
*/
QNMediaRecorderReasonCodeFormatFailed = 40001,

/*!
* @abstract Stream failed 流信息操作失败
*/
QNMediaRecorderReasonCodeStreamFailed = 40002,

/*!
* @abstract Write failed 录制过程中写入失败
*/
QNMediaRecorderReasonCodeWriteFailed = 40003,

/*!
* @abstract Resample failed 录制过程中重采样操作失败
*/
QNMediaRecorderReasonCodeResampleFailed = 40004,

/*!
* @abstract No track 没有可录制的流(采集中断或远端取消发布中断超过 5s)
*/
QNMediaRecorderReasonCodeNoTrack = 40005,

/*!
* @abstract Config changed 录制源配置被改变
*/
QNMediaRecorderReasonCodeConfigChanged = 40006,

/*!
* @abstract Out of memory 存储空间不足
*/
QNMediaRecorderReasonCodeOutOfMemory = 40007,

/*!
* @abstract Scale failed 录制过程中缩放操作失败
*/
QNMediaRecorderReasonCodeScaleFailed = 40008,
};

#pragma mark - callback define

/*!
Expand Down
Binary file modified Pod/iphoneos/QNRTCKit.framework/Info.plist
Binary file not shown.
Binary file modified Pod/iphoneos/QNRTCKit.framework/QNRTCKit
Binary file not shown.
Loading

0 comments on commit 8c14df3

Please sign in to comment.