Skip to content

Commit

Permalink
update to v2.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ksysdkci committed Sep 21, 2017
1 parent 27ee7f6 commit ec58b13
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions demo/KSYLiveDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.7.0</string>
<string>2.7.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.7.0.1</string>
<string>2.7.1.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
5 changes: 1 addition & 4 deletions demo/KSYLiveDemo/KSYDemoUI/KSYQRCode.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,8 @@ - (UILabel *)addLabelWithText:(NSString *)text textColor:(UIColor*)textColor {
return label;
}
- (IBAction)onBtn:(id)sender{
//返回按钮的动作
if (sender == _buttonBack) {
NSLog(@"返回按钮");
[self dismissViewControllerAnimated:self completion:nil];
[self dismissViewControllerAnimated:YES completion:nil];
}

}
@end
3 changes: 3 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYStateLableView.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ typedef struct _StreamState {
@property int fpsDropCnt;
// 采集的帧数
@property int capFrames;
// hide (NO)
@property BOOL hideText;

// 将推流状态信息清0
- (void) initStreamStat;

// 更新数据(需要每秒被调用一次)
- (void) updateState:(KSYStreamerBase*)str;

@end
17 changes: 9 additions & 8 deletions demo/KSYLiveDemo/KSYDemoUI/KSYStateLableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ - (id) init {
self.textColor = [UIColor redColor];
self.numberOfLines = 12;
self.textAlignment = NSTextAlignmentLeft;
self.hideText = NO;
[self initStreamStat];
return self;
}
Expand Down Expand Up @@ -54,12 +55,17 @@ - (void) updateState:(KSYStreamerBase*)str {
deltaS.capFrames = curState.capFrames -_lastStD.capFrames;

_lastStD = curState;
if (self.hideText) {
self.text = nil;
return;
}

double realTKbps = deltaS.uploadKByte*8 / deltaS.timeSecond;
double encFps = deltaS.encodedFrames / deltaS.timeSecond;
double capFps = deltaS.capFrames / deltaS.timeSecond;
double dropPercent = deltaS.droppedVFrames * 100.0 /MAX(curState.encodedFrames, 1);


NSString* liveTime =[KSYUIVC timeFormatted: (int)(curState.timeSecond-_startTime) ] ;
NSString *uploadDateSize = [KSYUIVC sizeFormatted:curState.uploadKByte];
NSString* stateurl = [NSString stringWithFormat:@"%@\n", [str.hostURL absoluteString]];
Expand All @@ -86,14 +92,9 @@ - (void) updateState:(KSYStreamerBase*)str {
NSString* netEvent = [NSString stringWithFormat:@"网络事件计数 %d bad\n\tbw %d Raise %d drop\t fps %d Raise %d drop\n",
_notGoodCnt, _bwRaiseCnt, _bwDropCnt, _fpsRaiseCnt, _fpsDropCnt];
NSString *cpu_use = [NSString stringWithFormat:@"%@ \tcpu: %.2f mem: %.1fMB",liveTime, [KSYUIVC cpu_usage], [KSYUIVC memory_usage] ];
self.text = [ stateurl stringByAppendingString:playUrl ];
self.text = [ self.text stringByAppendingString:statekbps ];
self.text = [ self.text stringByAppendingString:statefps ];
self.text = [ self.text stringByAppendingString:videoqosinfo ];
self.text = [ self.text stringByAppendingString:audioqosinfo ];
self.text = [ self.text stringByAppendingString:statedrop ];
self.text = [ self.text stringByAppendingString:netEvent ];
self.text = [ self.text stringByAppendingString:cpu_use ];
NSArray *texts = @[stateurl, playUrl, statekbps, statefps, videoqosinfo, audioqosinfo, statedrop, netEvent, cpu_use ];
self.text = [texts componentsJoinedByString:@""];


}

Expand Down
5 changes: 4 additions & 1 deletion demo/KSYLiveDemo/KSYDemoUI/KSYStreamerVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,14 @@ - (void)swipeController:(UISwipeGestureRecognizer *)swipGestRec{
}
if (swipGestRec == _swipeGest){
CGRect rect = self.view.frame;
_ctrlView.lblStat.hideText = NO;
if ( CGRectEqualToRect(rect, _ctrlView.frame)){
rect.origin.x = rect.size.width; // hide
_ctrlView.lblStat.hideText = YES;
}
weakObj(self);
[UIView animateWithDuration:0.1 animations:^{
_ctrlView.frame = rect;
selfWeak.ctrlView.frame = rect;
}];
}
}
Expand Down
10 changes: 7 additions & 3 deletions demo/KSYLiveDemo/KSYLiveVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
#import "KSYPlayerVC.h"
#import "KSYProberVC.h"
#import "KSYMonkeyTestVC.h"
#import "KSYNetTrackerVC.h"
#import "KSYVideoListVC.h"
#ifndef KSYPlayer_Demo
#import "KSYPresetCfgVC.h"
#import "KSYRecordVC.h"
#import "KSYNetTrackerVC.h"
#import "KSYSimplestStreamerVC.h"
#import "KSYHorScreenStreamerVC.h"
#import "KSYBrushStreamerVC.h"
#import "KSYBgpStreamerVC.h"
#import "KSYVideoListVC.h"
#endif

typedef NS_ENUM(NSInteger, KSYDemoMenuType){
KSYDemoMenuType_PLAY = 0, //播放
Expand Down Expand Up @@ -287,9 +289,10 @@ - (void)initVariable{
_controllers = [[NSMutableArray alloc] init];
[self addMenu:@"播放demo" withBlk:^(NSURL* url){return [[KSYPlayerCfgVC alloc]initWithURL:url fileList:nil];} ];
[self addMenu:@"视频列表" withBlk:^(NSURL* url){return [[KSYVideoListVC alloc] initWithUrl:url];} ];
[self addMenu:@"录制播放短视频" withBlk:^(NSURL* url){return [[KSYRecordVC alloc]initWithURL:url];} ];
[self addMenu:@"文件格式探测" withBlk:^(NSURL* url){return [[KSYProberVC alloc]initWithURL:url];} ];
[self addMenu:@"播放自动化测试" withBlk:^(NSURL* url){return [[KSYMonkeyTestVC alloc] init];} ];
#ifndef KSYPlayer_Demo
[self addMenu:@"录制播放短视频" withBlk:^(NSURL* url){return [[KSYRecordVC alloc]initWithURL:url];} ];
[self addMenu:@"推流demo" withBlk:^(NSURL* url){return [[KSYPresetCfgVC alloc]initWithURL:url];} ];
[self addMenu:@"极简推流" withBlk:^(NSURL* url){return [[KSYSimplestStreamerVC alloc] initWithUrl:url];} ];
[self addMenu:@"半屏推流" withBlk:^(NSURL* url){return [[KSYHorScreenStreamerVC alloc] initWithUrl:url];} ];
Expand All @@ -301,6 +304,7 @@ - (void)initVariable{
preVC.cfgView.btn1.enabled = NO;
preVC.cfgView.btn3.enabled = NO;
return preVC;}];
#endif
[self addMenu: @"网络探测" withBlk:^(NSURL* url){return [[KSYNetTrackerVC alloc]init];}];
}

Expand Down
2 changes: 1 addition & 1 deletion demo/KSYVideoListVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "KSYVideoListVC.h"
#import <libksygpulive/libksygpulive.h>
#import <libksygpulive/KSYMoviePlayerController.h>

#pragma mark - KSYVideoListCell

Expand Down
2 changes: 1 addition & 1 deletion doc/docset-installed.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Documentation set was installed to Xcode!

Path: /Users/ksyci/Library/Developer/Shared/Documentation/DocSets/com.ksyun.KSYLive_iOS.docset
Time: 2017-09-13 11:29:25 +0000
Time: 2017-09-21 09:51:33 +0000
Binary file modified doc/docset/Contents/Resources/docSet.dsidx
Binary file not shown.
Binary file modified doc/docset/Contents/Resources/docSet.dsidx-shm
Binary file not shown.
Binary file modified doc/docset/Contents/Resources/docSet.dsidx-wal
Binary file not shown.
Binary file modified doc/docset/Contents/Resources/docSet.skidx
Binary file not shown.
Binary file modified doc/docset/Contents/Resources/docSet.toc
Binary file not shown.
Binary file modified doc/docset/Contents/Resources/docSet.tokencache
Binary file not shown.
2 changes: 1 addition & 1 deletion libksygpulive.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'libksygpulive'
s.version = '2.7.0'
s.version = '2.7.1'
s.license = {
:type => 'Proprietary',
:text => <<-LICENSE
Expand Down
4 changes: 2 additions & 2 deletions prebuilt/include/KSYStreamer/libksystreamerbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
#import "KSYMessage.h"
#import "KSYTranscoder.h"

#define KSYSTREAMERBASE_VER 2.7.0
#define KSYSTREAMERBASE_ID 62c4d2d9c698b2c84cb8a0c97e9e38dc9d5ec75b
#define KSYSTREAMERBASE_VER 2.7.1
#define KSYSTREAMERBASE_ID 4ea976bfb4ad2d1af4c7b75a395d843f841079eb

0 comments on commit ec58b13

Please sign in to comment.