Commit b3c3a7c4 by ludi

Merge branch 'feature/UI修改版本' of http://git.yabolive.net:88/pidan/FuSiLive into feature/UI修改版本

parents 3fb98513 3b5e57c3
Showing with 34 additions and 95 deletions
......@@ -687,9 +687,9 @@ static dispatch_queue_t get_status_queue() {
kLivePushConfigCodeModeKey:@"0",
kLivePushConfigFPSKey:@"18",
kLivePushConfigBeautyEnableKey:@"1",
kLivePushConfigMaxBitrateKey:@"1500",
kLivePushConfigMinBitrateKey:@"500",
kLivePushConfigTargetBitrateKey:@"1000",
kLivePushConfigMaxBitrateKey:@"4000",
kLivePushConfigMinBitrateKey:@"1000",
kLivePushConfigTargetBitrateKey:@"2000",
kLivePushConfigResolutionKey:@"2",
} forKey:LIVE_PUSH_CONFIG];
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "live_room_card_invite_mic_btn@2x.png",
"filename" : "上麦@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_room_card_invite_mic_btn@3x.png",
"filename" : "上麦@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "live_room_card_invite_mic_btn_pressed@2x.png",
"filename" : "上麦@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_room_card_invite_mic_btn_pressed@3x.png",
"filename" : "上麦@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
......
......@@ -396,6 +396,8 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
_richImageView.centerX = _faceImageView.centerX;
_richImageView.centerY = _faceImageView.bottom;
// _richWearImageView.center = _faceImageView.center;
[_bgView addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(16, 16)];
}
- (void)fus_initBgView {
......@@ -775,7 +777,7 @@ if (@available(iOS 11.0, *)) {height = 80 + UIView.fus_SafeBottom;}\
- (void)pd_setupRoomControlView {
_roomControlView = [[UIView alloc] initWithFrame:CGRectMake(0, _buttomBtnBgView.bottom, _bgView.width, ROOM_CONTROL_VIEW_HEIGHT())];
_roomControlView.backgroundColor = [UIColor colorWithHex:@"#242A36"];
_roomControlView.backgroundColor = [UIColor colorWithHex:@"#F1F0F0"];
[_bgView addSubview:_roomControlView];
CGFloat bottonHeight = _roomControlView.height;
if (@available(iOS 11.0, *)) {
......
......@@ -50,9 +50,6 @@
@end
@implementation FUSByteStreamCaptureHelper
{
long long captureTimeCount;
}
#pragma mark - Init
......@@ -295,6 +292,10 @@
{
videoSize = CGSizeMake(720, 1280);
}
case 4:// 1080P
{
videoSize = CGSizeMake(1080, 1920);
}
break;
default:// 默认 540
videoSize = CGSizeMake(540, 960);
......@@ -341,9 +342,9 @@
// 视频帧率
_liveConfig.videoFPS = fps;
// 视频码率
_liveConfig.bitrate = targetBitrate;
_liveConfig.minBitrate = minBitrate;
_liveConfig.maxBitrate = maxBitrate;
_liveConfig.bitrate = targetBitrate * 1000;;
_liveConfig.minBitrate = minBitrate * 1000;;
_liveConfig.maxBitrate = maxBitrate * 1000;;
_liveConfig.outputSize = videoSize;
......@@ -427,13 +428,10 @@
if (![FUSBeautyHelper shareInstance].beautyEngineEnable) {
// 没有美颜正在运行或者当前开关处于关闭状态
// 声网采集协议正在运行
if (self.agoraVideoSourceRuning) {
captureTimeCount += 1;
// 声网采集协议正在运行
if (self.videoFrameCallBackHandler) {
self.videoFrameCallBackHandler(buffer, pts, 0);
}
}
[_capture pushVideoBuffer:buffer andCMTime:pts];
return;
......@@ -441,18 +439,11 @@
CVPixelBufferRef targetPixelBuffer = [[FUSBeautyHelper shareInstance] renderBeautyWithPixelBuffer:buffer timeStamp:(pts.value / pts.timescale)];
// 声网采集协议正在运行
if (self.agoraVideoSourceRuning) {
captureTimeCount++;
//CMTimeMake(captureTimeCount, 600)
// 声网采集协议正在运行
if (self.videoFrameCallBackHandler) {
self.videoFrameCallBackHandler(buffer, pts, 0);
}
}
[_capture pushVideoBuffer:targetPixelBuffer andCMTime:pts];
}
......@@ -542,8 +533,6 @@
/**
重新开始推理,不停止原来的推流
@param completion 完成回调
*/
- (void)fus_reloadPush
{
......
......@@ -57,9 +57,6 @@ typedef NS_ENUM(NSInteger, FUSStreamSessionState)
CMTime pts,
int rotation);
// 声网自定义视频源是否正在运行中
@property (nonatomic, assign) BOOL agoraVideoSourceRuning;
+ (FUSStreamCaptureHelper *)fus_captureHepler;
#pragma mark - Public Method
......
......@@ -790,6 +790,23 @@ NSString * const kStreamRTCDidOfflineNotification = @"kStreamRTCDidOfflineNotifi
FUSLogVerbose(@"%s",__func__);
}
- (void)rtcEngine:(AgoraRtcEngineKit *)engine firstRemoteVideoDecodedOfUid:(NSUInteger)uid size:(CGSize)size elapsed:(NSInteger)elapsed {
FUSLogVerbose(@"FUSStreamPushView:%lu加入", uid);
// TODO:FUSStreamPushView:%lu加入
// [_captureHelper fus_stopStreamPush];
// [_captureHelper fus_loadlowStreamConfig];
// 创建对方图像视图
AgoraRtcVideoCanvas *otherCanvas = [[AgoraRtcVideoCanvas alloc] init];
otherCanvas.uid = uid;
otherCanvas.view = _agoraOtherPreview;
otherCanvas.renderMode = AgoraVideoRenderModeHidden;
[_agoraEngine setupRemoteVideo:otherCanvas];
_agoraOtherCanvas = otherCanvas;
}
/** The user/host has joined the channel. Same as [userJoinedBlock]([AgoraRtcEngineKit userJoinedBlock:]).
- Communication mode: This callback function notifies the application that another user has joined the channel. If there are other users in the channel when that user joins, the SDK also reports to the application on the existing users who are already in the channel.
......@@ -807,19 +824,6 @@ NSString * const kStreamRTCDidOfflineNotification = @"kStreamRTCDidOfflineNotifi
*/
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didJoinedOfUid:(NSUInteger)uid elapsed:(NSInteger)elapsed
{
FUSLogVerbose(@"FUSStreamPushView:%lu加入", uid);
// TODO:FUSStreamPushView:%lu加入
// [_captureHelper fus_stopStreamPush];
// [_captureHelper fus_loadlowStreamConfig];
// 创建对方图像视图
AgoraRtcVideoCanvas *otherCanvas = [[AgoraRtcVideoCanvas alloc] init];
otherCanvas.uid = uid;
otherCanvas.view = _agoraOtherPreview;
otherCanvas.renderMode = AgoraVideoRenderModeHidden;
[_agoraEngine setupRemoteVideo:otherCanvas];
_agoraOtherCanvas = otherCanvas;
FUSLogVerbose(@"%s",__func__);
}
......@@ -919,18 +923,6 @@ NSString * const kStreamRTCDidOfflineNotification = @"kStreamRTCDidOfflineNotifi
FUSLogVerbose(@"%s",__func__);
}
/** The first frame of the remote user has been decoded successfully. Same as [firstRemoteVideoDecodedBlock]([AgoraRtcEngineKit firstRemoteVideoDecodedBlock:]).
@param engine AgoraRtcEngineKit object.
@param uid Remote user ID.
@param size Size of the video (width and height).
@param elapsed Time elapsed (ms) from the remote user calling [joinChannelByToken]([AgoraRtcEngineKit joinChannelByToken:channelId:info:uid:joinSuccess:]) until this callback function is triggered.
*/
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine firstRemoteVideoDecodedOfUid:(NSUInteger)uid size:(CGSize)size elapsed:(NSInteger)elapsed
{
FUSLogVerbose(@"FUSStreamPushView:第一帧解析完了");
}
/** The first remote video frame has been received and rendered. Same as [firstRemoteVideoFrameBlock]([AgoraRtcEngineKit firstRemoteVideoFrameBlock:]).
@param engine AgoraRtcEngineKit object.
......@@ -963,35 +955,6 @@ NSString * const kStreamRTCDidOfflineNotification = @"kStreamRTCDidOfflineNotifi
FUSLogVerbose(@"%s",__func__);
}
/** Enables/disables the local video function of a specified user.
This method is only applicable to the scenario when the specified user only wants to watch the remote video without sending any video stream to the other user.
@param engine AgoraRtcEngineKit object.
@param enabled Enable or disable the local video function of a specified user:
* YES: Enabled. Other users in the channel can see the video of the specified user.
* NO: Disabled. Other users in the channel do not receive the video stream from the specified user, while the specified user can still receive the video streams from other users.
@param uid ID of the specified user.
*/
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didLocalVideoEnabled:(BOOL)enabled byUid:(NSUInteger)uid
{
FUSLogVerbose(@"%s",__func__);
}
/** The video size or rotation of a specified remote user has changed.
@param engine AgoraRtcEngineKit object
@param uid User ID of the remote user or local user (0) whose video size or rotation has changed
@param size New video size
@param rotation New rotation of the video (0 to 360)
*/
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine videoSizeChangedOfUid:(NSUInteger)uid size:(CGSize)size rotation:(NSInteger)rotation
{
FUSLogVerbose(@"%s",__func__);
}
/** The remote video stream state has changed.
@param engine AgoraRtcEngineKit object
......@@ -1047,18 +1010,6 @@ NSString * const kStreamRTCDidOfflineNotification = @"kStreamRTCDidOfflineNotifi
FUSLogVerbose(@"%s",__func__);
}
/** The statistics of the uploading local video streams.
Same as [localVideoStatBlock]([AgoraRtcEngineKit localVideoStatBlock:]). This method reports the statistics of the local video streams once every two seconds.
@param engine AgoraRtcEngineKit object.
@param stats Statistics of the uploading local video streams: AgoraRtcLocalVideoStats
*/
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine localVideoStats:(AgoraRtcLocalVideoStats * _Nonnull)stats
{
FUSLogVerbose(@"%s",__func__);
}
/** The statistics of the receiving remote video streams.
The SDK updates the application on the statistics of receiving remote video streams for each user/host once every 2 seconds.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment