Skip to content

Commit b7f76c6

Browse files
author
chenliming
committed
submit code...
1 parent 6513fa4 commit b7f76c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+4710
-0
lines changed

.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: objective-c
2+
osx_image: xcode7
3+
xcode_workspace: LFLiveKit.xcworkspace
4+
xcode_scheme: LFLiveKit
5+
6+
script:
7+
- xctool -workspace LFLiveKit.xcworkspace -scheme 'LFLiveKit' -configuration Release -sdk iphonesimulator -arch i386 build

LFLiveKit.podspec

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Pod::Spec.new do |s|
3+
4+
s.name = "LFLiveKit"
5+
s.version = "1.4"
6+
s.summary = "objectc ios Live. LFLiveKit."
7+
s.homepage = "https://github.com/chenliming777"
8+
s.license = { :type => "MIT", :file => "FILE_LICENSE" }
9+
s.author = { "chenliming" => "chenliming777@qq.com" }
10+
s.platform = :ios, "8.0"
11+
s.ios.deployment_target = "8.0"
12+
s.source = { :git => "https://github.com/chenliming777/LFLiveKit", :tag => "#{s.version}" }
13+
s.source_files = "LFLiveKit/**/*.{h,m}"
14+
s.public_header_files = "LFLiveKit/**/*.h"
15+
16+
s.frameworks = "VideoToolbox", "AudioToolbox","AVFoundation","Foundation","UIKit"
17+
s.library = "z"
18+
19+
s.requires_arc = true
20+
21+
s.dependency "CocoaAsyncSocket", "~> 7.4.1"
22+
s.dependency 'LMGPUImage', '~> 0.1.9'
23+
s.dependency "librtmp-iOS", "~> 1.1.0"
24+
25+
end

LFLiveKit.xcodeproj/project.pbxproj

+644
Large diffs are not rendered by default.

LFLiveKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "48F687CDE9990BD471D7883061F7E5D4"
18+
BuildableName = "libCocoaAsyncSocket.a"
19+
BlueprintName = "CocoaAsyncSocket"
20+
ReferencedContainer = "container:Pods/Pods.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "YES"
27+
buildForArchiving = "YES"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "6610362E50A6DE8BACCA1F2885CD9157"
32+
BuildableName = "libGPUImage.a"
33+
BlueprintName = "GPUImage"
34+
ReferencedContainer = "container:Pods/Pods.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
<BuildActionEntry
38+
buildForTesting = "YES"
39+
buildForRunning = "YES"
40+
buildForProfiling = "YES"
41+
buildForArchiving = "YES"
42+
buildForAnalyzing = "YES">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "5CFA1E6A87A325722DE7DCED3A58CCA1"
46+
BuildableName = "libPods-LFLiveKit.a"
47+
BlueprintName = "Pods-LFLiveKit"
48+
ReferencedContainer = "container:Pods/Pods.xcodeproj">
49+
</BuildableReference>
50+
</BuildActionEntry>
51+
<BuildActionEntry
52+
buildForTesting = "YES"
53+
buildForRunning = "YES"
54+
buildForProfiling = "YES"
55+
buildForArchiving = "YES"
56+
buildForAnalyzing = "YES">
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "84001F891D0015D10026C63F"
60+
BuildableName = "LFLiveKit.framework"
61+
BlueprintName = "LFLiveKit"
62+
ReferencedContainer = "container:LFLiveKit.xcodeproj">
63+
</BuildableReference>
64+
</BuildActionEntry>
65+
<BuildActionEntry
66+
buildForTesting = "YES"
67+
buildForRunning = "YES"
68+
buildForProfiling = "YES"
69+
buildForArchiving = "NO"
70+
buildForAnalyzing = "YES">
71+
<BuildableReference
72+
BuildableIdentifier = "primary"
73+
BlueprintIdentifier = "84001F931D0015D10026C63F"
74+
BuildableName = "LFLiveKitTests.xctest"
75+
BlueprintName = "LFLiveKitTests"
76+
ReferencedContainer = "container:LFLiveKit.xcodeproj">
77+
</BuildableReference>
78+
</BuildActionEntry>
79+
</BuildActionEntries>
80+
</BuildAction>
81+
<TestAction
82+
buildConfiguration = "Debug"
83+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
84+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
85+
shouldUseLaunchSchemeArgsEnv = "YES">
86+
<Testables>
87+
<TestableReference
88+
skipped = "NO">
89+
<BuildableReference
90+
BuildableIdentifier = "primary"
91+
BlueprintIdentifier = "84001F931D0015D10026C63F"
92+
BuildableName = "LFLiveKitTests.xctest"
93+
BlueprintName = "LFLiveKitTests"
94+
ReferencedContainer = "container:LFLiveKit.xcodeproj">
95+
</BuildableReference>
96+
</TestableReference>
97+
</Testables>
98+
<MacroExpansion>
99+
<BuildableReference
100+
BuildableIdentifier = "primary"
101+
BlueprintIdentifier = "84001F891D0015D10026C63F"
102+
BuildableName = "LFLiveKit.framework"
103+
BlueprintName = "LFLiveKit"
104+
ReferencedContainer = "container:LFLiveKit.xcodeproj">
105+
</BuildableReference>
106+
</MacroExpansion>
107+
<AdditionalOptions>
108+
</AdditionalOptions>
109+
</TestAction>
110+
<LaunchAction
111+
buildConfiguration = "Debug"
112+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
113+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
114+
launchStyle = "0"
115+
useCustomWorkingDirectory = "NO"
116+
ignoresPersistentStateOnLaunch = "NO"
117+
debugDocumentVersioning = "YES"
118+
debugServiceExtension = "internal"
119+
allowLocationSimulation = "YES">
120+
<MacroExpansion>
121+
<BuildableReference
122+
BuildableIdentifier = "primary"
123+
BlueprintIdentifier = "84001F891D0015D10026C63F"
124+
BuildableName = "LFLiveKit.framework"
125+
BlueprintName = "LFLiveKit"
126+
ReferencedContainer = "container:LFLiveKit.xcodeproj">
127+
</BuildableReference>
128+
</MacroExpansion>
129+
<AdditionalOptions>
130+
</AdditionalOptions>
131+
</LaunchAction>
132+
<ProfileAction
133+
buildConfiguration = "Release"
134+
shouldUseLaunchSchemeArgsEnv = "YES"
135+
savedToolIdentifier = ""
136+
useCustomWorkingDirectory = "NO"
137+
debugDocumentVersioning = "YES">
138+
<MacroExpansion>
139+
<BuildableReference
140+
BuildableIdentifier = "primary"
141+
BlueprintIdentifier = "84001F891D0015D10026C63F"
142+
BuildableName = "LFLiveKit.framework"
143+
BlueprintName = "LFLiveKit"
144+
ReferencedContainer = "container:LFLiveKit.xcodeproj">
145+
</BuildableReference>
146+
</MacroExpansion>
147+
</ProfileAction>
148+
<AnalyzeAction
149+
buildConfiguration = "Debug">
150+
</AnalyzeAction>
151+
<ArchiveAction
152+
buildConfiguration = "Release"
153+
revealArchiveInOrganizer = "YES">
154+
</ArchiveAction>
155+
</Scheme>

LFLiveKit.xcworkspace/contents.xcworkspacedata

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LFLiveKit/Info.plist

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.4.1</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
23+
<key>NSPrincipalClass</key>
24+
<string></string>
25+
</dict>
26+
</plist>

LFLiveKit/LFLiveKit.h

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// LFLiveKit.h
3+
// LFLiveKit
4+
//
5+
// Created by admin on 16/5/24.
6+
// Copyright © 2016年 admin. All rights reserved.
7+
//
8+
9+
#import "LFLiveSession.h"
10+
#import "LFLiveAudioConfiguration.h"
11+
#import "LFLiveVideoConfiguration.h"
12+
#import "LFAudioFrame.h"
13+
#import "LFFrame.h"
14+
#import "LFLiveStreamInfo.h"
15+
#import "LFVideoFrame.h"

LFLiveKit/LFLiveSession.h

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
//
2+
// LFLiveSession.h
3+
// LFLiveKit
4+
//
5+
// Created by 倾慕 on 16/5/2.
6+
// Copyright © 2016年 倾慕. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import <AVFoundation/AVFoundation.h>
11+
#import "LFLiveStreamInfo.h"
12+
#import "LFAudioFrame.h"
13+
#import "LFVideoFrame.h"
14+
#import "LFLiveAudioConfiguration.h"
15+
#import "LFLiveVideoConfiguration.h"
16+
#import "LFLiveDebug.h"
17+
18+
typedef void (^ LFRequestComplete)(_Nullable id info,NSError *_Nullable errorMsg);
19+
20+
21+
@class LFLiveSession;
22+
@protocol LFLiveSessionDelegate <NSObject>
23+
24+
@optional
25+
/** live status changed will callback */
26+
- (void)liveSession:(nullable LFLiveSession *)session liveStateDidChange:(LFLiveState)state;
27+
/** live debug info callback */
28+
- (void)liveSession:(nullable LFLiveSession *)session debugInfo:(nullable LFLiveDebug*)debugInfo;
29+
/** callback socket errorcode */
30+
- (void)liveSession:(nullable LFLiveSession*)session errorCode:(LFLiveSocketErrorCode)errorCode;
31+
@end
32+
33+
@class LFLiveStreamInfo;
34+
35+
@interface LFLiveSession : NSObject
36+
37+
#pragma mark - Attribute
38+
///=============================================================================
39+
/// @name Attribute
40+
///=============================================================================
41+
/** The delegate of the capture. captureData callback */
42+
@property (nullable,nonatomic, weak) id<LFLiveSessionDelegate> delegate;
43+
44+
/** The running control start capture or stop capture*/
45+
@property (nonatomic, assign) BOOL running;
46+
47+
/** The preView will show OpenGL ES view*/
48+
@property (nonatomic, strong,null_resettable) UIView *preView;
49+
50+
/** The captureDevicePosition control camraPosition ,default front*/
51+
@property (nonatomic, assign) AVCaptureDevicePosition captureDevicePosition;
52+
53+
/** The beautyFace control capture shader filter empty or beautiy */
54+
@property (nonatomic, assign) BOOL beautyFace;
55+
56+
/** The muted control callbackAudioData,muted will memset 0.*/
57+
@property (nonatomic,assign) BOOL muted;
58+
59+
/** The stream control upload and package*/
60+
@property (nullable,nonatomic, strong,readonly) LFLiveStreamInfo * streamInfo;
61+
62+
/** The status of the stream .*/
63+
@property (nonatomic,assign,readonly) LFLiveState state;
64+
65+
/** The showDebugInfo control streamInfo and uploadInfo(1s) *.*/
66+
@property (nonatomic,assign) BOOL showDebugInfo;
67+
68+
/** The reconnectInterval control reconnect timeInterval(重连间隔) *.*/
69+
@property (nonatomic,assign) NSUInteger reconnectInterval;
70+
71+
/** The reconnectCount control reconnect count (重连次数) *.*/
72+
@property (nonatomic,assign) NSUInteger reconnectCount;
73+
74+
#pragma mark - Initializer
75+
///=============================================================================
76+
/// @name Initializer
77+
///=============================================================================
78+
- (nullable instancetype)init UNAVAILABLE_ATTRIBUTE;
79+
+ (nullable instancetype)new UNAVAILABLE_ATTRIBUTE;
80+
81+
/**
82+
The designated initializer. Multiple instances with the same configuration will make the
83+
capture unstable.
84+
*/
85+
- (nullable instancetype)initWithAudioConfiguration:(nullable LFLiveAudioConfiguration*)audioConfiguration videoConfiguration:(nullable LFLiveVideoConfiguration*)videoConfiguration NS_DESIGNATED_INITIALIZER;
86+
87+
/** The start stream .*/
88+
- (void)startLive:(nonnull LFLiveStreamInfo*)streamInfo;
89+
90+
/** The stop stream .*/
91+
- (void)stopLive;
92+
93+
94+
@end
95+

0 commit comments

Comments
 (0)