Skip to content

Commit

Permalink
update to v2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ksysdkci committed Jun 22, 2017
1 parent bfb5d78 commit c48cc77
Show file tree
Hide file tree
Showing 293 changed files with 16,294 additions and 13,598 deletions.
12 changes: 12 additions & 0 deletions demo/KSYLiveDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
06FBBD671D2E17E00065ED55 /* KSYNameSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD461D2E17E00065ED55 /* KSYNameSlider.m */; };
06FBBD691D2E17E00065ED55 /* KSYUIVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD481D2E17E00065ED55 /* KSYUIVC.m */; };
06FBBD6B1D2E17E00065ED55 /* KSYUIView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD4A1D2E17E00065ED55 /* KSYUIView.m */; };
31F5D1DE1ED683A900588B8E /* KSYQRCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 31F5D1DD1ED683A900588B8E /* KSYQRCode.m */; };
3991D0F21DD5674200032EC0 /* KSYRecordVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 3991D0EF1DD5674200032EC0 /* KSYRecordVC.m */; };
5806F5A71E7FF8B100FDB488 /* KSYFloatVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 5806F5A61E7FF8B100FDB488 /* KSYFloatVC.m */; };
580C1C311E289BC800B386D5 /* KSYNetTrackerVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 580C1C301E289BC800B386D5 /* KSYNetTrackerVC.m */; };
58149AD21EF80FB200A3BC8B /* KSYSimplePlayVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 58149AD11EF80FB200A3BC8B /* KSYSimplePlayVC.m */; };
58288AEE1ED5927200F6FECD /* KSYAVWriter.m in Sources */ = {isa = PBXBuildFile; fileRef = 58288AED1ED5927200F6FECD /* KSYAVWriter.m */; };
585ABE2B1EC4614400315A5C /* KSYMonkeyTestVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 585ABE261EC4614400315A5C /* KSYMonkeyTestVC.m */; };
585ABE2C1EC4614400315A5C /* KSYPlayerCfgVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 585ABE281EC4614400315A5C /* KSYPlayerCfgVC.m */; };
Expand Down Expand Up @@ -163,12 +165,16 @@
06FBBD481D2E17E00065ED55 /* KSYUIVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYUIVC.m; sourceTree = "<group>"; };
06FBBD491D2E17E00065ED55 /* KSYUIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYUIView.h; sourceTree = "<group>"; };
06FBBD4A1D2E17E00065ED55 /* KSYUIView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYUIView.m; sourceTree = "<group>"; };
31F5D1DC1ED683A900588B8E /* KSYQRCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KSYQRCode.h; path = KSYDemoUI/KSYQRCode.h; sourceTree = "<group>"; };
31F5D1DD1ED683A900588B8E /* KSYQRCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KSYQRCode.m; path = KSYDemoUI/KSYQRCode.m; sourceTree = "<group>"; };
3991D0EE1DD5674200032EC0 /* KSYRecordVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KSYRecordVC.h; path = KSYLiveDemo/KSYPlayerDemo/KSYRecordVC.h; sourceTree = "<group>"; };
3991D0EF1DD5674200032EC0 /* KSYRecordVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KSYRecordVC.m; path = KSYLiveDemo/KSYPlayerDemo/KSYRecordVC.m; sourceTree = "<group>"; };
5806F5A51E7FF8B100FDB488 /* KSYFloatVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KSYFloatVC.h; path = KSYLiveDemo/KSYPlayerDemo/KSYFloatVC.h; sourceTree = "<group>"; };
5806F5A61E7FF8B100FDB488 /* KSYFloatVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KSYFloatVC.m; path = KSYLiveDemo/KSYPlayerDemo/KSYFloatVC.m; sourceTree = "<group>"; };
580C1C301E289BC800B386D5 /* KSYNetTrackerVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KSYNetTrackerVC.m; path = KSYLiveDemo/KSYPlayerDemo/KSYNetTrackerVC.m; sourceTree = "<group>"; };
580C1C321E289C1600B386D5 /* KSYNetTrackerVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = KSYNetTrackerVC.h; path = KSYLiveDemo/KSYPlayerDemo/KSYNetTrackerVC.h; sourceTree = "<group>"; };
58149AD11EF80FB200A3BC8B /* KSYSimplePlayVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KSYSimplePlayVC.m; path = KSYLiveDemo/KSYPlayerDemo/KSYSimplePlayVC.m; sourceTree = "<group>"; };
58149AD31EF80FFE00A3BC8B /* KSYSimplePlayVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KSYSimplePlayVC.h; path = KSYLiveDemo/KSYPlayerDemo/KSYSimplePlayVC.h; sourceTree = "<group>"; };
58288AEC1ED5927200F6FECD /* KSYAVWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KSYAVWriter.h; path = KSYLiveDemo/KSYPlayerDemo/KSYAVWriter.h; sourceTree = "<group>"; };
58288AED1ED5927200F6FECD /* KSYAVWriter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = KSYAVWriter.m; path = KSYLiveDemo/KSYPlayerDemo/KSYAVWriter.m; sourceTree = "<group>"; };
585ABE251EC4614400315A5C /* KSYMonkeyTestVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KSYMonkeyTestVC.h; path = KSYLiveDemo/KSYPlayerDemo/KSYMonkeyTestVC.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -276,6 +282,8 @@
067F7E4F1D4762AC00F54FEA /* KSYPlayerDemo */ = {
isa = PBXGroup;
children = (
58149AD31EF80FFE00A3BC8B /* KSYSimplePlayVC.h */,
58149AD11EF80FB200A3BC8B /* KSYSimplePlayVC.m */,
585ABE251EC4614400315A5C /* KSYMonkeyTestVC.h */,
58288AEC1ED5927200F6FECD /* KSYAVWriter.h */,
58288AED1ED5927200F6FECD /* KSYAVWriter.m */,
Expand Down Expand Up @@ -331,6 +339,8 @@
06B2B1A51BE8F0D900E0CC85 /* KSYLiveDemo */ = {
isa = PBXGroup;
children = (
31F5D1DC1ED683A900588B8E /* KSYQRCode.h */,
31F5D1DD1ED683A900588B8E /* KSYQRCode.m */,
E3B007371CE31547009AF074 /* KSYDBCreater.h */,
E3B007381CE31547009AF074 /* KSYDBCreater.m */,
95B4A3E91CBF6CC700CB6804 /* KSYSQLite.h */,
Expand Down Expand Up @@ -629,6 +639,7 @@
buildActionMask = 2147483647;
files = (
06A646B61D8459C800D1C620 /* KSYProgressView.m in Sources */,
58149AD21EF80FB200A3BC8B /* KSYSimplePlayVC.m in Sources */,
0530DE591E484C6100EEAD32 /* KSYBgmStreamerVC.m in Sources */,
06A646B71D8459C800D1C620 /* KSYProberVC.m in Sources */,
06A646B81D8459C800D1C620 /* KSYPlayerVC.m in Sources */,
Expand Down Expand Up @@ -662,6 +673,7 @@
C323BC1E1E794C2900D4682C /* KSYFloatStreamerVC.m in Sources */,
E33527ED1E49986400DB6DD1 /* KSYSimplestStreamerVC.m in Sources */,
06FBBD671D2E17E00065ED55 /* KSYNameSlider.m in Sources */,
31F5D1DE1ED683A900588B8E /* KSYQRCode.m in Sources */,
06B2B1A91BE8F0D900E0CC85 /* main.m in Sources */,
95B4A3EF1CBF6CC700CB6804 /* KSYSQLite.m in Sources */,
06FBBD5D1D2E17E00065ED55 /* KSYPresetCfgVC.m in Sources */,
Expand Down
9 changes: 3 additions & 6 deletions demo/KSYLiveDemo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@ @implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

[Bugly startWithAppId:@"900034350"];
BuglyConfig * cfg = [[BuglyConfig alloc] init];
cfg.channel = @"public";
[Bugly startWithAppId:@"900034350" config:cfg];

// Override point for customization after application launch.
return YES;
}





- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
Expand Down
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.3.0</string>
<string>2.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2.4.0.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
4 changes: 2 additions & 2 deletions demo/KSYLiveDemo/KSYDemoUI/KSYFloatingWindowVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@interface FloatingView : KSYUIView

@property UIButton * quitBtn;
@property GPUImageView * preView;
@property KSYGPUView * preView;
@property UILabel * text;
@property CGPoint loc_in;

Expand All @@ -25,7 +25,7 @@ - (id) init {
_text.textAlignment = NSTextAlignmentCenter;
_text.numberOfLines = 0;

_preView = [[GPUImageView alloc] init];
_preView = [[KSYGPUView alloc] init];

UIPanGestureRecognizer *panGes = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)];
[_preView addGestureRecognizer:panGes];
Expand Down
4 changes: 2 additions & 2 deletions demo/KSYLiveDemo/KSYDemoUI/KSYHorScreenStreamerVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@interface KSYHorScreenStreamerVC ()
@property UILabel *text;
@property GPUImageView *preView;
@property KSYGPUView *preView;
@end

@implementation KSYHorScreenStreamerVC
Expand All @@ -26,7 +26,7 @@ - (void)setupUI{
_text.hidden = YES;

CGFloat wdt = self.view.frame.size.width;
_preView = [[GPUImageView alloc] initWithFrame:CGRectMake(0, 75, wdt, wdt * 9 / 16)];
_preView = [[KSYGPUView alloc] initWithFrame:CGRectMake(0, 75, wdt, wdt * 9 / 16)];
[self.view addSubview:_preView];
_preView.hidden = YES;
self.profilePicker.hidden = YES;
Expand Down
2 changes: 2 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYMiscView.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
@property UIButton* btn2;
@property UIButton* btn3;
@property UIButton* btn4;
//显示拉流地址并获取二维码
@property UIButton *buttonPlayUrlAndQR;

@property UISwitch* swBypassRec; // 旁路录制
@property UILabel* lblRecDur; // 旁路录制的时长
Expand Down
3 changes: 3 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYMiscView.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ - (id)init{
_lblPerf = [self addLable:@"编码性能"];
_vEncPerfSeg = [self addSegCtrlWithItems:@[ @"低功耗", @"均衡", @"高性能"]];
_autoReconnect = [self addSliderName:@"自动重连次数" From:0.0 To:10 Init:3];
//添加一个显示拉流地址和对应二维码的按钮
_buttonPlayUrlAndQR = [self addButton:@"拉流地址及二维码"];
return self;
}

Expand All @@ -62,6 +64,7 @@ - (void)layoutUI{
[self putNarrow:_layerSeg andWide:_alphaSl];
[self putRow:@[_lblRec, _swBypassRec, _lblRecDur]];
[self putRow1:_autoReconnect];
[self putRow1:_buttonPlayUrlAndQR];
}

@synthesize liveScene = _liveScene;
Expand Down
14 changes: 14 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYQRCode.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// KSYPlayUrlAndQRCode.h
// KSYLiveDemo
//
// Created by zhengWei on 2017/5/25.
// Copyright © 2017年 qyvideo. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface KSYQRCode : UIViewController
//存放要生成为二维码的地址
@property(nonatomic,strong)NSString *url;
@end
117 changes: 117 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYQRCode.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
//
// KSYPlayUrlAndQRCode.m
// KSYLiveDemo
//
// Created by zhengWei on 2017/5/25.
// Copyright © 2017年 qyvideo. All rights reserved.
//

#import "KSYQRCode.h"

@interface KSYQRCode ()

@end

@implementation KSYQRCode{
UIButton *_buttonBack;//返回按钮
UILabel *_labelPlayUrl;//显示二维码对应的地址
}

- (void)viewDidLoad {
[super viewDidLoad];
_buttonBack = [self addButton:@"返回"];
_labelPlayUrl = [self addLabelWithText:_url textColor:[UIColor blueColor]];
self.view.backgroundColor = [UIColor whiteColor];

// 1. 实例化二维码滤镜
CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
// 2. 恢复滤镜的默认属性
[filter setDefaults];
// 3. 将字符串转换成NSData
NSString *urlStr = _url;
NSData *data = [urlStr dataUsingEncoding:NSUTF8StringEncoding];
// 4. 通过KVO设置滤镜inputMessage数据
[filter setValue:data forKey:@"inputMessage"];
// 5. 获得滤镜输出的图像
CIImage *outputImage = [filter outputImage];

UIImageView *wechatImageView = [[UIImageView alloc] initWithFrame:CGRectMake(40, 30, [UIScreen mainScreen].bounds.size.width - 80, [UIScreen mainScreen].bounds.size.width - 80)];
//重绘二维码,使其显示清晰
wechatImageView.image = [self createNonInterpolatedUIImageFormCIImage:outputImage withSize:200];
[self.view addSubview:wechatImageView];

CGFloat labelX = 0;
CGFloat labelY = CGRectGetMaxY(wechatImageView.frame);
CGFloat labelH = 30;
CGFloat labelW = [UIScreen mainScreen].bounds.size.width;
_labelPlayUrl.frame = CGRectMake(labelX, labelY, labelW, labelH);

CGFloat buttonX = labelX;
CGFloat buttonY = CGRectGetMaxY(_labelPlayUrl.frame);
CGFloat buttonH = 30;
CGFloat buttonW = [UIScreen mainScreen].bounds.size.width;
_buttonBack.frame = CGRectMake(buttonX, buttonY, buttonW, buttonH);
}
/**
* 根据CIImage生成指定大小的UIImage
*
* @param image CIImage
* @param size 图片宽度
*/
- (UIImage *)createNonInterpolatedUIImageFormCIImage:(CIImage *)image withSize:(CGFloat) size
{
CGRect extent = CGRectIntegral(image.extent);
CGFloat scale = MIN(size/CGRectGetWidth(extent), size/CGRectGetHeight(extent));
// 1.创建bitmap;
size_t width = CGRectGetWidth(extent) * scale;
size_t height = CGRectGetHeight(extent) * scale;
CGColorSpaceRef cs = CGColorSpaceCreateDeviceGray();
CGContextRef bitmapRef = CGBitmapContextCreate(nil, width, height, 8, 0, cs, (CGBitmapInfo)kCGImageAlphaNone);
CIContext *context = [CIContext contextWithOptions:nil];
CGImageRef bitmapImage = [context createCGImage:image fromRect:extent];
CGContextSetInterpolationQuality(bitmapRef, kCGInterpolationNone);
CGContextScaleCTM(bitmapRef, scale, scale);
CGContextDrawImage(bitmapRef, extent, bitmapImage);
// 2.保存bitmap到图片
CGImageRef scaledImage = CGBitmapContextCreateImage(bitmapRef);
CGContextRelease(bitmapRef);
CGImageRelease(bitmapImage);
return [UIImage imageWithCGImage:scaledImage];
}
- (UIButton*)addButton:(NSString*)title{
//添加一个按钮
UIButton * button;
button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button setTitle: title forState: UIControlStateNormal];
button.backgroundColor = [UIColor lightGrayColor];
[self.view addSubview:button];
[button addTarget:self
action:@selector(onBtn:)
forControlEvents:UIControlEventTouchUpInside];
return button;
}
//添加一个左对齐的Label
- (UILabel *)addLabelWithText:(NSString *)text textColor:(UIColor*)textColor {
UILabel *label = [[UILabel alloc] init];
label.backgroundColor = [UIColor clearColor];
label.textColor = textColor;
label.numberOfLines = -1;
label.text = text;
label.textAlignment = NSTextAlignmentLeft;
label.adjustsFontSizeToFitWidth = YES;
label.layer.masksToBounds = YES;
label.layer.borderWidth = 1;
label.layer.borderColor = [UIColor blackColor].CGColor;
label.layer.cornerRadius = 2;
[self.view addSubview:label];
return label;
}
- (IBAction)onBtn:(id)sender{
//返回按钮的动作
if (sender == _buttonBack) {
NSLog(@"返回按钮");
[self dismissViewControllerAnimated:self completion:nil];
}

}
@end
21 changes: 17 additions & 4 deletions demo/KSYLiveDemo/KSYDemoUI/KSYStateLableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ - (id) init {
self = [super init];
self.backgroundColor = [UIColor clearColor];
self.textColor = [UIColor redColor];
self.numberOfLines = 9;
self.numberOfLines = 12;
self.textAlignment = NSTextAlignmentLeft;
[self initStreamStat];
return self;
Expand Down Expand Up @@ -58,7 +58,20 @@ - (void) updateState:(KSYStreamerBase*)str {

NSString* liveTime =[KSYUIVC timeFormatted: (int)(curState.timeSecond-_startTime) ] ;
NSString *uploadDateSize = [KSYUIVC sizeFormatted:curState.uploadKByte];
NSString* stateurl = [NSString stringWithFormat:@"%@\n", [str.hostURL absoluteString]];
NSString* stateurl = [NSString stringWithFormat:@"%@", [str.hostURL absoluteString]];
//显示拉流地址
NSString *playUrl = @"http://test.hdllive.ks-cdn.com/live/";
if (![[str.hostURL scheme] isEqualToString:@"rtmp"]) {
//录制到本地
NSString *fileName = [[stateurl componentsSeparatedByString:@"/"]lastObject];
playUrl = [NSString stringWithFormat:@"\n拉流地址:%@\n",fileName];
}else{
//推流
NSString *fileName = [[stateurl componentsSeparatedByString:@"/"]lastObject];
NSString *playUrlPostfix = @".flv";
playUrl = [NSString stringWithFormat:@"%@%@%@",playUrl,fileName,playUrlPostfix];
playUrl = [NSString stringWithFormat:@"\n拉流地址:%@\n",playUrl];
}
NSString* statekbps = [NSString stringWithFormat:@"实时码率(kbps)%4.1f\tA%4.1f\tV%4.1f\n", realTKbps, [str encodeAKbps], [str encodeVKbps] ];
NSString* statefps = [NSString stringWithFormat:@"实时帧率(fps)%2.1f\t总上传:%@\n", encFps, uploadDateSize ];
NSString* videoqosinfo = [NSString stringWithFormat:@"视频缓冲 %d B %d ms %d packets \n",
Expand All @@ -69,8 +82,8 @@ - (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:statekbps ];
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 ];
Expand Down
18 changes: 18 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYStreamerVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#import "KSYBgmView.h"
#import "KSYPipView.h"
#import "KSYNameSlider.h"
#import "KSYQRCode.h"

#import <CallKit/CXCallObserver.h>
#import <CallKit/CallKit.h>
Expand Down Expand Up @@ -815,6 +816,23 @@ - (void)onMiscBtns:(id)sender {
picker.delegate = self;
[self presentViewController:picker animated:YES completion:nil];
}
//弹出拉流地址及二维码
else if(sender == _miscView.buttonPlayUrlAndQR){
KSYQRCode *playUrlQRCodeVc = [[KSYQRCode alloc] init];
if (_bRecord) {
//状态为录制视频
playUrlQRCodeVc.url = [_presetCfgView.hostUrlUI.text lastPathComponent];
}else{
//状态为直播视频
//推流地址对应的拉流地址
NSString * uuidStr =[[[UIDevice currentDevice] identifierForVendor] UUIDString];
NSString *devCode = [[uuidStr substringToIndex:3] lowercaseString];
NSString *streamPlaySrv = @"http://test.hdllive.ks-cdn.com/live";
NSString *streamPlayPostfix = @".flv";
playUrlQRCodeVc.url = [ NSString stringWithFormat:@"%@/%@%@", streamPlaySrv, devCode,streamPlayPostfix];
}
[self presentViewController:playUrlQRCodeVc animated:YES completion:nil];
}
}

- (void)onMiscSwitch:(UISwitch *)sw{
Expand Down
Loading

0 comments on commit c48cc77

Please sign in to comment.