Skip to content

Commit

Permalink
update to v1.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
shixuemei committed Oct 19, 2016
1 parent 0bdbf09 commit 2e86c7a
Show file tree
Hide file tree
Showing 153 changed files with 952 additions and 383 deletions.
18 changes: 6 additions & 12 deletions demo/KSYLiveDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
060AE9C51D4653010064DD65 /* KSYFileSelector.m in Sources */ = {isa = PBXBuildFile; fileRef = 060AE9C41D4653010064DD65 /* KSYFileSelector.m */; };
064980251DAFB8AB00AA5A0A /* KSYAudioCtrlView.m in Sources */ = {isa = PBXBuildFile; fileRef = 064980231DAFB8AB00AA5A0A /* KSYAudioCtrlView.m */; };
065E7CF51D66E60F00EC8D45 /* KSYReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 065E7CF31D66E60F00EC8D45 /* KSYReachability.m */; };
069E428A1C10357D00392B5E /* KSYLiveVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 069E42881C10357D00392B5E /* KSYLiveVC.m */; };
06A646591D81500000D1C620 /* KSYStateLableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06CB3A641D813EE70017378F /* KSYStateLableView.m */; };
Expand All @@ -23,14 +24,12 @@
06B2B1BA1BE8F0D900E0CC85 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 06B2B1B81BE8F0D900E0CC85 /* LaunchScreen.xib */; };
06CA4B081D9BD0E8006F3AD3 /* KSYLiveDemo-dy-framework.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 06CA4B071D9BD0E8006F3AD3 /* KSYLiveDemo-dy-framework.xcconfig */; };
06E742AC1D90FFD600C3E780 /* KSYGPUResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 06E742AB1D90FFD600C3E780 /* KSYGPUResource.bundle */; };
06FBBD4B1D2E17E00065ED55 /* KSYAudioMixerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD291D2E17E00065ED55 /* KSYAudioMixerView.m */; };
06FBBD4D1D2E17E00065ED55 /* KSYBgmView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD2B1D2E17E00065ED55 /* KSYBgmView.m */; };
06FBBD511D2E17E00065ED55 /* KSYCtrlView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD2F1D2E17E00065ED55 /* KSYCtrlView.m */; };
06FBBD531D2E17E00065ED55 /* KSYFilterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD311D2E17E00065ED55 /* KSYFilterView.m */; };
06FBBD5B1D2E17E00065ED55 /* KSYPipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD391D2E17E00065ED55 /* KSYPipView.m */; };
06FBBD5D1D2E17E00065ED55 /* KSYPresetCfgVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD3B1D2E17E00065ED55 /* KSYPresetCfgVC.m */; };
06FBBD5F1D2E17E00065ED55 /* KSYPresetCfgView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD3D1D2E17E00065ED55 /* KSYPresetCfgView.m */; };
06FBBD611D2E17E00065ED55 /* KSYReverbView.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD3F1D2E17E00065ED55 /* KSYReverbView.m */; };
06FBBD651D2E17E00065ED55 /* KSYStreamerVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD431D2E17E00065ED55 /* KSYStreamerVC.m */; };
06FBBD671D2E17E00065ED55 /* KSYNameSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD461D2E17E00065ED55 /* KSYNameSlider.m */; };
06FBBD691D2E17E00065ED55 /* KSYUIVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 06FBBD481D2E17E00065ED55 /* KSYUIVC.m */; };
Expand All @@ -47,6 +46,8 @@
/* Begin PBXFileReference section */
060AE9C31D4653010064DD65 /* KSYFileSelector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYFileSelector.h; sourceTree = "<group>"; };
060AE9C41D4653010064DD65 /* KSYFileSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYFileSelector.m; sourceTree = "<group>"; };
064980231DAFB8AB00AA5A0A /* KSYAudioCtrlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYAudioCtrlView.m; sourceTree = "<group>"; };
064980241DAFB8AB00AA5A0A /* KSYAudioCtrlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYAudioCtrlView.h; sourceTree = "<group>"; };
065E7CF31D66E60F00EC8D45 /* KSYReachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYReachability.m; sourceTree = "<group>"; };
065E7CF41D66E60F00EC8D45 /* KSYReachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYReachability.h; sourceTree = "<group>"; };
069E42881C10357D00392B5E /* KSYLiveVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYLiveVC.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -76,8 +77,6 @@
06CB3A641D813EE70017378F /* KSYStateLableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYStateLableView.m; sourceTree = "<group>"; };
06CB3A651D813EE70017378F /* KSYStateLableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYStateLableView.h; sourceTree = "<group>"; };
06E742AB1D90FFD600C3E780 /* KSYGPUResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = KSYGPUResource.bundle; path = ../resource/KSYGPUResource.bundle; sourceTree = "<group>"; };
06FBBD281D2E17E00065ED55 /* KSYAudioMixerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYAudioMixerView.h; sourceTree = "<group>"; };
06FBBD291D2E17E00065ED55 /* KSYAudioMixerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYAudioMixerView.m; sourceTree = "<group>"; };
06FBBD2A1D2E17E00065ED55 /* KSYBgmView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYBgmView.h; sourceTree = "<group>"; };
06FBBD2B1D2E17E00065ED55 /* KSYBgmView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYBgmView.m; sourceTree = "<group>"; };
06FBBD2E1D2E17E00065ED55 /* KSYCtrlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYCtrlView.h; sourceTree = "<group>"; };
Expand All @@ -90,8 +89,6 @@
06FBBD3B1D2E17E00065ED55 /* KSYPresetCfgVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYPresetCfgVC.m; sourceTree = "<group>"; };
06FBBD3C1D2E17E00065ED55 /* KSYPresetCfgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYPresetCfgView.h; sourceTree = "<group>"; };
06FBBD3D1D2E17E00065ED55 /* KSYPresetCfgView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYPresetCfgView.m; sourceTree = "<group>"; };
06FBBD3E1D2E17E00065ED55 /* KSYReverbView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYReverbView.h; sourceTree = "<group>"; };
06FBBD3F1D2E17E00065ED55 /* KSYReverbView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYReverbView.m; sourceTree = "<group>"; };
06FBBD421D2E17E00065ED55 /* KSYStreamerVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYStreamerVC.h; sourceTree = "<group>"; };
06FBBD431D2E17E00065ED55 /* KSYStreamerVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSYStreamerVC.m; sourceTree = "<group>"; };
06FBBD451D2E17E00065ED55 /* KSYNameSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSYNameSlider.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -245,6 +242,8 @@
06FBBD8E1D2E23110065ED55 /* subviews */ = {
isa = PBXGroup;
children = (
064980231DAFB8AB00AA5A0A /* KSYAudioCtrlView.m */,
064980241DAFB8AB00AA5A0A /* KSYAudioCtrlView.h */,
06CB3A651D813EE70017378F /* KSYStateLableView.h */,
06CB3A641D813EE70017378F /* KSYStateLableView.m */,
F296EBFE1D3527FF001C4120 /* KSYMiscView.h */,
Expand All @@ -253,14 +252,10 @@
06FBBD391D2E17E00065ED55 /* KSYPipView.m */,
06FBBD2E1D2E17E00065ED55 /* KSYCtrlView.h */,
06FBBD2F1D2E17E00065ED55 /* KSYCtrlView.m */,
06FBBD281D2E17E00065ED55 /* KSYAudioMixerView.h */,
06FBBD291D2E17E00065ED55 /* KSYAudioMixerView.m */,
06FBBD2A1D2E17E00065ED55 /* KSYBgmView.h */,
06FBBD2B1D2E17E00065ED55 /* KSYBgmView.m */,
06FBBD301D2E17E00065ED55 /* KSYFilterView.h */,
06FBBD311D2E17E00065ED55 /* KSYFilterView.m */,
06FBBD3E1D2E17E00065ED55 /* KSYReverbView.h */,
06FBBD3F1D2E17E00065ED55 /* KSYReverbView.m */,
);
name = subviews;
sourceTree = "<group>";
Expand Down Expand Up @@ -348,6 +343,7 @@
06B2B1AC1BE8F0D900E0CC85 /* AppDelegate.m in Sources */,
06FBBD691D2E17E00065ED55 /* KSYUIVC.m in Sources */,
069E428A1C10357D00392B5E /* KSYLiveVC.m in Sources */,
064980251DAFB8AB00AA5A0A /* KSYAudioCtrlView.m in Sources */,
06FBBD511D2E17E00065ED55 /* KSYCtrlView.m in Sources */,
95B4A3F11CBF6CC700CB6804 /* QRViewController.m in Sources */,
06FBBD531D2E17E00065ED55 /* KSYFilterView.m in Sources */,
Expand All @@ -360,8 +356,6 @@
06FBBD671D2E17E00065ED55 /* KSYNameSlider.m in Sources */,
06B2B1A91BE8F0D900E0CC85 /* main.m in Sources */,
95B4A3EF1CBF6CC700CB6804 /* KSYSQLite.m in Sources */,
06FBBD4B1D2E17E00065ED55 /* KSYAudioMixerView.m in Sources */,
06FBBD611D2E17E00065ED55 /* KSYReverbView.m in Sources */,
065E7CF51D66E60F00EC8D45 /* KSYReachability.m in Sources */,
06FBBD5D1D2E17E00065ED55 /* KSYPresetCfgVC.m in Sources */,
060AE9C51D4653010064DD65 /* KSYFileSelector.m in Sources */,
Expand Down
49 changes: 49 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYAudioCtrlView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// KSYAudioCtrlView.h
// KSYGPUStreamerDemo
//
// Created by 孙健 on 16/6/24.
// Copyright © 2016年 ksyun. All rights reserved.
//

#import "KSYUIView.h"
/**
音频控制相关
主要增加的功能如下:
1. 混音
2. 输入音频设备选择
3. 混响类型选择
4. 耳返
*/
@interface KSYAudioCtrlView : KSYUIView

/// 混音时, 麦克风的比例
@property KSYNameSlider * micVol;
/// 混音时, 背景音乐的比例
@property KSYNameSlider * bgmVol;
/// 混音时, 背景音乐是否混入
@property UISwitch * bgmMix;

/// 纯音频推流开关 ( 纯音频 == 关闭视频 )
@property UISwitch * swAudioOnly;
/// 静音推流开关 ( 发送音量为0的音频数据 )
@property UISwitch * muteStream;

/// 音频输入设备选择(话筒, 有限耳麦 或 蓝牙耳麦)
@property UISegmentedControl * micInput;
/// get value from UI ( micInput )
@property (atomic, readwrite) KSYMicType micType;

/// 初始化mic选择控件
- (void) initMicInput;

/// 混响类型选择
@property UISegmentedControl * reverbType;

/// 耳返 (本地直接播放采集到的声音) (请戴耳机之后再使用本功能)
@property UISwitch * swPlayCapture;
/// 本地播放的音量
@property KSYNameSlider * playCapVol;

@end
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
//
// KSYFilterView.m
// KSYAudioCtrlView.m
// KSYGPUStreamerDemo
//
// Created by 孙健 on 16/6/24.
// Copyright © 2016年 ksyun. All rights reserved.
//

#import <GPUImage/GPUImage.h>

#if USING_DYNAMIC_FRAMEWORK
#import <libksygpuliveDy/libksygpuimage.h>
#else
#import <libksygpulive/libksygpuimage.h>
#endif

#import "KSYAudioMixerView.h"
#import "KSYPresetCfgView.h"
#import "KSYAudioCtrlView.h"
#import "KSYNameSlider.h"
@interface KSYAudioCtrlView() {

}

@implementation KSYAudioMixerView
@property UILabel * lblPlayCapture;
@property UILabel * lblAudioOnly;
@property UILabel * lblMuteSt;
@property UILabel * lblReverb;
@end
@implementation KSYAudioCtrlView

- (id)init{
self = [super init];
//_lblTitle = [self addLable:@"混音相关设置"];; // 标题
//_lblTitle.textAlignment = NSTextAlignmentCenter;
// 混音音量
_micVol = [self addSliderName:@"麦克风音量" From:0.0 To:1.0 Init:1.0];
_bgmVol = [self addSliderName:@"背景乐音量" From:0.0 To:1.0 Init:0.5];

_bgmMix = [self addSwitch:YES];

_micInput = [self addSegCtrlWithItems:@[ @"内置mic", @"耳麦", @"蓝牙mic"]];
[self initMicInput];

_lblAudioOnly = [self addLable:@"纯音频推流"]; // 关闭视频
_swAudioOnly = [self addSwitch:NO]; // 关闭视频
_lblMuteSt = [self addLable:@"静音推流"];
_muteStream = [self addSwitch:NO];

_lblReverb = [self addLable:@"混响"];
_reverbType = [self addSegCtrlWithItems:@[@"关闭", @"录影棚",
@"演唱会",@"KTV",@"小舞台"]];
_lblPlayCapture = [self addLable:@"耳返"];
_swPlayCapture = [self addSwitch:NO];
_playCapVol= [self addSliderName:@"耳返音量" From:0.0 To:1.0 Init:0.5];
return self;
}
- (void)layoutUI{
Expand All @@ -41,10 +51,13 @@ - (void)layoutUI{
[self putRow1:_micVol];
[self putSlider:_bgmVol
andSwitch:_bgmMix];

[self putRow1:_micInput];
[self putRow:@[_lblAudioOnly,_swAudioOnly,
_lblMuteSt,_muteStream] ];
[self putLable:_lblReverb andView:_reverbType];
id nu = [NSNull null];
[self putRow:@[nu,nu, _lblMuteSt,_muteStream] ];
[self putRow:@[nu,nu,_lblPlayCapture,_swPlayCapture]];
[self putRow1:_playCapVol];
}
- (void) initMicInput {
BOOL bHS = [KSYAVAudioSession isHeadsetInputAvaible];
Expand Down
28 changes: 0 additions & 28 deletions demo/KSYLiveDemo/KSYDemoUI/KSYAudioMixerView.h

This file was deleted.

2 changes: 0 additions & 2 deletions demo/KSYLiveDemo/KSYDemoUI/KSYBgmView.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#import "KSYNameSlider.h"
#import "KSYFileSelector.h"



@interface KSYBgmView(){
UILabel * _bgmTitle;
KSYFileSelector *_bgmSel;
Expand Down
11 changes: 5 additions & 6 deletions demo/KSYLiveDemo/KSYDemoUI/KSYCtrlView.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@
#pragma mark - menu buttons
//背景音乐
@property UIButton *bgmBtn;
//美颜
//图像和美颜相关
@property UIButton *filterBtn;
//声音相关: 混音 / 混响 / 耳返等
@property UIButton *mixBtn;
//其他功能: 比如截屏
@property UIButton *miscBtn;
//混音
@property UIButton *mixBtn;
//混响
@property UIButton *reverbBtn;
//返回
//返回菜单页面
@property UIButton *backBtn;


- (void) showSubMenuView: (UIView*) view;

@end
23 changes: 9 additions & 14 deletions demo/KSYLiveDemo/KSYDemoUI/KSYCtrlView.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ - (id) init {

// add menu
_bgmBtn = [self addButton:@"背景音乐"];
_filterBtn = [self addButton:@"滤镜/美颜"];
_filterBtn = [self addButton:@"图像/美颜"];
_mixBtn = [self addButton:@"声音"];
_miscBtn = [self addButton:@"其他"];
_mixBtn = [self addButton:@"混音"];
_reverbBtn = [self addButton:@"混响"];
_backBtn = [self addButton:@"返回菜单"
_backBtn = [self addButton:@"菜单"
action:@selector(onBack:)];
_backBtn.hidden = YES;
_curSubMenuView = nil;
Expand All @@ -48,20 +47,17 @@ - (void) layoutUI {
if ( self.width <self.height ){
self.yPos =self.gap*5; // skip status bar
}
[self putRow3: _btnFlash
and:_btnCameraToggle
and: _btnQuit];
[self putRow: @[_backBtn, _btnFlash, _btnCameraToggle,_btnQuit] ];

[self putRow: @[_bgmBtn, _reverbBtn, _mixBtn,_backBtn] ];
[self putRow: @[_filterBtn, _miscBtn, [NSNull null], [NSNull null] ] ];
[self putRow: @[_bgmBtn, _filterBtn, _mixBtn,_miscBtn ] ];
[self hideMenuBtn:!_backBtn.hidden];

CGFloat normalBtnH = self.btnH;
self.btnH = self.height - self.yPos - self.btnH - self.gap;
[self putRow1:_lblStat];
self.yPos -= self.btnH;
CGFloat freeHgt = self.height - self.yPos - self.btnH - self.gap;
_lblStat.frame = CGRectMake( self.gap, self.yPos, self.winWdt - self.gap*2, freeHgt);
self.yPos += freeHgt;

// put at bottom
self.btnH = normalBtnH;
[self putRow3:_btnCapture
and:_lblNetwork
and:_btnStream];
Expand All @@ -74,7 +70,6 @@ - (void)hideMenuBtn: (BOOL) bHide {
_filterBtn.hidden = bHide;
_miscBtn.hidden = bHide;
_mixBtn.hidden = bHide;
_reverbBtn.hidden = bHide;
}

- (IBAction)onBack:(id)sender {
Expand Down
5 changes: 5 additions & 0 deletions demo/KSYLiveDemo/KSYDemoUI/KSYFilterView.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@
// 镜像翻转按钮
@property (nonatomic) UISwitch * swPrevewFlip;
@property (nonatomic) UISwitch * swStreamFlip;

// 界面旋转 和推流画面动态旋转
@property (nonatomic) UISwitch * swUiRotate; // 只在iphone上能锁定
@property (nonatomic) UISwitch * swStrRotate;

@end
Loading

0 comments on commit 2e86c7a

Please sign in to comment.