Compare commits

...

4 Commits

Author SHA1 Message Date
chenliming 0e7b2475d7 update 2016-07-15 14:52:14 +08:00
chenliming 531c92df51 update read 2016-07-15 14:36:43 +08:00
chenliming 91e72e2211 update 1.7.3 2016-07-15 14:32:55 +08:00
chenliming 5cc50b6d47 修改pod spec 2016-07-15 14:13:35 +08:00
9 changed files with 53 additions and 51 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
Pod::Spec.new do |s|
s.name = "LFLiveKit"
s.version = "1.7.2"
s.version = "1.8.0"
s.summary = "LaiFeng ios Live. LFLiveKit."
s.homepage = "https://github.com/chenliming777"
s.license = { :type => "MIT", :file => "LICENSE" }
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.platform = :ios, "8.0"
s.ios.deployment_target = "8.0"
s.source = { :git => "https://github.com/LaiFengiOS/LFLiveKit.git", :tag => "#{s.version}" }
s.source_files = "LFLiveKit/**/*.{*.h,*.m}"
s.source_files = "LFLiveKit/**/*.{h,m}"
s.public_header_files = "LFLiveKit/**/*.h"
s.frameworks = "VideoToolbox", "AudioToolbox","AVFoundation","Foundation","UIKit"
+1 -1
View File
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.7.2</string>
<string>1.8.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
-2
View File
@@ -15,8 +15,6 @@
#import "LFLiveVideoConfiguration.h"
#import "LFLiveDebug.h"
typedef void (^ LFRequestComplete)(_Nullable id info,NSError *_Nullable errorMsg);
@class LFLiveSession;
@protocol LFLiveSessionDelegate <NSObject>
@@ -195,7 +195,6 @@
_videoMinFrameRate = videoMinFrameRate;
}
#pragma mark -- Custom Method
- (LFLiveVideoSessionPreset)supportSessionPreset:(LFLiveVideoSessionPreset)sessionPreset{
NSString *avSessionPreset = [self avSessionPreset];
+1 -1
View File
@@ -26,7 +26,7 @@ static dispatch_queue_t YYRtmpSendQueue() {
#define SAVC(x) static const AVal av_##x = AVC(#x)
static const AVal av_setDataFrame = AVC("@setDataFrame");
static const AVal av_SDKVersion = AVC("LFLiveKit 1.6");
static const AVal av_SDKVersion = AVC("LFLiveKit 1.7.3");
SAVC(onMetaData);
SAVC(duration);
SAVC(width);
+18 -12
View File
@@ -59,9 +59,9 @@
}
case AVAuthorizationStatusAuthorized:{
// 已经开启授权,可继续
dispatch_async(dispatch_get_main_queue(), ^{
//dispatch_async(dispatch_get_main_queue(), ^{
[_self.session setRunning:YES];
});
//});
break;
}
case AVAuthorizationStatusDenied:
@@ -132,9 +132,16 @@
#pragma mark -- Getter Setter
- (LFLiveSession*)session{
if(!_session){
/** 发现大家有不会用横屏的请注意啦,横屏需要在ViewController supportedInterfaceOrientations修改方向 默认竖屏 ****/
/** 发现大家有不会用横屏的请注意啦,横屏需要在ViewController supportedInterfaceOrientations修改方向 默认竖屏 ****/
/** 发现大家有不会用横屏的请注意啦,横屏需要在ViewController supportedInterfaceOrientations修改方向 默认竖屏 ****/
/***  默认分辨率368 640 音频:44.1 iphone6以上48 双声道 方向竖屏 ***/
_session = [[LFLiveSession alloc] initWithAudioConfiguration:[LFLiveAudioConfiguration defaultConfiguration] videoConfiguration:[LFLiveVideoConfiguration defaultConfigurationForQuality:LFLiveVideoQuality_Medium2] liveType:LFLiveRTMP];
_session.delegate = self;
//_session = [[LFLiveSession alloc] initWithAudioConfiguration:[LFLiveAudioConfiguration defaultConfiguration] videoConfiguration:[LFLiveVideoConfiguration defaultConfigurationForQuality:LFLiveVideoQuality_Medium2 landscape:NO]];
/**   自己定制单声道 */
/*
@@ -142,7 +149,7 @@
audioConfiguration.numberOfChannels = 1;
audioConfiguration.audioBitrate = LFLiveAudioBitRate_64Kbps;
audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz;
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration] liveType:LFLiveRTMP];
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration]];
*/
/**   自己定制高质量音频96K */
@@ -151,7 +158,7 @@
audioConfiguration.numberOfChannels = 2;
audioConfiguration.audioBitrate = LFLiveAudioBitRate_96Kbps;
audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz;
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration] liveType:LFLiveRTMP];
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration]];
*/
/**   自己定制高质量音频96K 分辨率设置为540*960 方向竖屏 */
@@ -172,7 +179,7 @@
videoConfiguration.orientation = UIInterfaceOrientationPortrait;
videoConfiguration.sessionPreset = LFCaptureSessionPreset540x960;
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration liveType:LFLiveRTMP];
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration];
*/
@@ -194,13 +201,13 @@
videoConfiguration.orientation = UIInterfaceOrientationPortrait;
videoConfiguration.sessionPreset = LFCaptureSessionPreset720x1280;
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration liveType:LFLiveRTMP];
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration];
*/
/**   自己定制高质量音频128K 分辨率设置为720*1280 方向横屏 */
/*
LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new];
audioConfiguration.numberOfChannels = 2;
audioConfiguration.audioBitrate = LFLiveAudioBitRate_128Kbps;
@@ -213,11 +220,10 @@
videoConfiguration.videoMinBitRate = 500*1024;
videoConfiguration.videoFrameRate = 15;
videoConfiguration.videoMaxKeyframeInterval = 30;
videoConfiguration.orientation = UIInterfaceOrientationLandscapeLeft;
videoConfiguration.landscape = YES;
videoConfiguration.sessionPreset = LFCaptureSessionPreset720x1280;
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration liveType:LFLiveRTMP];
*/
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration];
_session.delegate = self;
+1 -1
View File
@@ -28,7 +28,7 @@
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
+1 -2
View File
@@ -3,7 +3,6 @@ platform :ios,'8.0'
target "LFLiveKitDemo" do
pod 'LFLiveKit', '~> 1.7.1'
pod 'YYDispatchQueuePool'
pod 'LFLiveKit', '~> 1.7.3'
end
+29 -29
View File
@@ -8,7 +8,7 @@
LFLiveKit
LFLiveKit IOS mobile phone push codeDefault format support RTMP and FLVAt the same time, the structure is very easy to extend.
LFLiveKit IOS mobile phone push codeDefault format support RTMPAt the same time, the structure is very easy to extend.
Podfile
To integrate LFLiveKit into your Xcode project using CocoaPods, specify it in your Podfile:
@@ -43,41 +43,41 @@ Architecture
capture: LFAudioCapture and LFVideoCapture
encode: LFHardwareAudioEncoder and LFHardwareVideoEncoder
publish: LFStreamRtmpSocket LFStreamTcpSocket
publish: LFStreamRtmpSocket
Usage
- (LFLiveSession*)session{
if(!_session){
_session = [[LFLiveSession alloc] initWithAudioConfiguration:[LFLiveAudioConfiguration defaultConfiguration] videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration] liveType:LFLiveRTMP];
_session.running = YES;
_session.preView = self;
}
return _session;
if(!_session){
_session = [[LFLiveSession alloc] initWithAudioConfiguration:[LFLiveAudioConfiguration defaultConfiguration] videoConfiguration:[LFLiveVideoConfiguration defaultConfiguration]];
_session.preView = self;
_session.delegate = self;
}
return _session;
}
- (LFLiveSession*)session{
if(!_session){
LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new];
audioConfiguration.numberOfChannels = 2;
audioConfiguration.audioBitrate = LFLiveAudioBitRate_128Kbps;
audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz;
LFLiveVideoConfiguration *videoConfiguration = [LFLiveVideoConfiguration new];
videoConfiguration.videoSize = CGSizeMake(1280, 720);
videoConfiguration.videoBitRate = 800*1024;
videoConfiguration.videoMaxBitRate = 1000*1024;
videoConfiguration.videoMinBitRate = 500*1024;
videoConfiguration.videoFrameRate = 15;
videoConfiguration.videoMaxKeyframeInterval = 30;
videoConfiguration.orientation = UIInterfaceOrientationLandscapeLeft;
videoConfiguration.sessionPreset = LFCaptureSessionPreset720x1280;
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration liveType:LFLiveRTMP];
_session.running = YES;
_session.preView = self;
}
return _session;
if(!_session){
LFLiveAudioConfiguration *audioConfiguration = [LFLiveAudioConfiguration new];
audioConfiguration.numberOfChannels = 2;
audioConfiguration.audioBitrate = LFLiveAudioBitRate_128Kbps;
audioConfiguration.audioSampleRate = LFLiveAudioSampleRate_44100Hz;
LFLiveVideoConfiguration *videoConfiguration = [LFLiveVideoConfiguration new];
videoConfiguration.videoSize = CGSizeMake(1280, 720);
videoConfiguration.videoBitRate = 800*1024;
videoConfiguration.videoMaxBitRate = 1000*1024;
videoConfiguration.videoMinBitRate = 500*1024;
videoConfiguration.videoFrameRate = 15;
videoConfiguration.videoMaxKeyframeInterval = 30;
videoConfiguration.landscape = YES;
videoConfiguration.sessionPreset = LFCaptureSessionPreset720x1280;
_session = [[LFLiveSession alloc] initWithAudioConfiguration:audioConfiguration videoConfiguration:videoConfiguration];
_session.running = YES;
_session.preView = self;
}
return _session;
}
LFLiveStreamInfo *streamInfo = [LFLiveStreamInfo new];