Commit 6146c745 authored by 乔金柱's avatar 乔金柱

Merge branch 'lym/test' into 'master'

Lym/test

See merge request !7
parents 4ec62e94 0e15d112
......@@ -11,7 +11,7 @@ source 'git@git.wanmeizhensuo.com:gengmeiios/GMSpecs.git'
target 'GMAILab_Example' do
pod 'GMAILab', :path => '../'
# pod 'GMBase', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMBase.git', :commit => 'f3b40c7'
pod 'GMPhobos', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git', :commit => '960bbb8'
pod 'GMPhobos', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git', :commit => 'ed24e93'
# pod 'GMBaseWeb', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git', :commit => '0752677'
#9e91ae1
pod 'GMBase', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMBase.git', :commit => '9e91ae1'
......
......@@ -41,8 +41,6 @@ PODS:
- PLMediaStreamingKit
- PLPlayerKit
- Qiniu
- TTTPlayerKit_iOS
- TTTRtcEngineKit_iOS
- YYText
- GMAlbum (4.1.3):
- GMBase
......@@ -84,47 +82,48 @@ PODS:
- GMCache (1.0.1):
- TMCache (= 2.1.0)
- GMFoundation (1.0.8)
- GMHud (1.0.3):
- GMHud (1.0.7):
- lottie-ios (= 2.5.2)
- MBProgressHUD (= 0.9.2)
- GMJSONModel (1.7.4)
- GMKit (1.2.6):
- GMKit/Category (= 1.2.6)
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/FDFullscreenPopGesture (= 1.2.6)
- GMKit/Kit (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- GMKit (1.2.7):
- GMKit/Category (= 1.2.7)
- GMKit/Color (= 1.2.7)
- GMKit/Constant (= 1.2.7)
- GMKit/FDFullscreenPopGesture (= 1.2.7)
- GMKit/Kit (= 1.2.7)
- GMKit/Protocol (= 1.2.7)
- Masonry
- SDWebImage
- SnapKit
- GMKit/Category (1.2.6):
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- GMKit/Category (1.2.7):
- GMKit/Color (= 1.2.7)
- GMKit/Constant (= 1.2.7)
- GMKit/Protocol (= 1.2.7)
- Masonry
- SDWebImage
- SnapKit
- GMKit/Color (1.2.6):
- GMKit/Color (1.2.7):
- Masonry
- SDWebImage
- SnapKit
- GMKit/Constant (1.2.6):
- GMKit/Constant (1.2.7):
- Masonry
- SDWebImage
- SnapKit
- GMKit/FDFullscreenPopGesture (1.2.6):
- GMKit/FDFullscreenPopGesture (1.2.7):
- Masonry
- SDWebImage
- SnapKit
- GMKit/Kit (1.2.6):
- GMKit/Category (= 1.2.6)
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- GMKit/Kit (1.2.7):
- GMKit/Category (= 1.2.7)
- GMKit/Color (= 1.2.7)
- GMKit/Constant (= 1.2.7)
- GMKit/Protocol (= 1.2.7)
- Masonry
- SDWebImage
- SnapKit
- GMKit/Protocol (1.2.6):
- GMKit/Protocol (1.2.7):
- Masonry
- SDWebImage
- SnapKit
......@@ -132,14 +131,14 @@ PODS:
- AFNetworking (= 3.1.0)
- GMNetworking (4.0.7):
- Alamofire (= 4.7.0)
- GMPhobos (2.0.4):
- GMPhobos (2.0.5):
- GMCache
- MagicalRecord
- MJExtension
- GMRefresh (1.0.4):
- GMRefresh (1.0.10):
- GMPhobos
- MJRefresh
- GMRouter (0.1.6):
- GMRouter (0.1.7):
- GMPhobos
- MJExtension
- GMShareSDK (0.2.1):
......@@ -175,8 +174,6 @@ PODS:
- SDWebImage/Core (5.8.0)
- SnapKit (4.2.0)
- TMCache (2.1.0)
- TTTPlayerKit_iOS (1.7.0)
- TTTRtcEngineKit_iOS (2.9.2)
- "UITableView+FDTemplateLayoutCell (1.4)"
- WechatOpenSDK (1.8.6.2)
- Weibo_SDK (3.2.7)
......@@ -188,7 +185,7 @@ DEPENDENCIES:
- "GMBase (from `git@git.wanmeizhensuo.com:gengmeiios/GMBase.git`, commit `9e91ae1`)"
- "GMBaseSwift (from `git@git.wanmeizhensuo.com:gengmeiios/GMBaseSwift.git`, commit `b54da90`)"
- "GMBaseWeb (from `git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git`, commit `c3ca876`)"
- "GMPhobos (from `git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git`, commit `960bbb8`)"
- "GMPhobos (from `git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git`, commit `ed24e93`)"
- Qiniu (= 7.2.6)
SPEC REPOS:
......@@ -226,8 +223,6 @@ SPEC REPOS:
- SDWebImage
- SnapKit
- TMCache
- TTTPlayerKit_iOS
- TTTRtcEngineKit_iOS
- "UITableView+FDTemplateLayoutCell"
- WechatOpenSDK
- Weibo_SDK
......@@ -249,7 +244,7 @@ EXTERNAL SOURCES:
:commit: c3ca876
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git"
GMPhobos:
:commit: 960bbb8
:commit: ed24e93
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git"
CHECKOUT OPTIONS:
......@@ -266,7 +261,7 @@ CHECKOUT OPTIONS:
:commit: c3ca876
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMBaseWeb.git"
GMPhobos:
:commit: 960bbb8
:commit: ed24e93
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git"
SPEC CHECKSUMS:
......@@ -277,21 +272,21 @@ SPEC CHECKSUMS:
DouyinOpenSDK: 5ba83de22963ba7a3ba70c8ff11dfcb2885ecc2b
EVReflection: 1abc1a81927ab0d30170238cf9b79bff489e9728
GM-Swift-Observable: 756d8fc13638b9faa68cb10266b2ffb47a911595
GMAILab: 959b642bc718d21706ed5fb1b3a6ede16cb3ffd2
GMAILab: 6074b3e64a9198fa20d7d0e413d03877f5a53677
GMAlbum: d667396a6dab574a45af71dfebd1a75257c80192
GMBase: 358e72062cb0f64a57ff34ec181b20ad9973d79b
GMBaseSwift: 8f327883b33ac24d0dcdb648ac3f9d6c57949ad5
GMBaseWeb: 4b374ec5a7afc59368eea5dc480f0e98129a9c69
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMFoundation: e9f7fd9c6e5f133e09009b0ee5de4fce60ac5682
GMHud: 18d41f4900a204f27be14e9504fcee2060ae3b2c
GMHud: feca48b3eda4f3a6f617f4bbaa3657316a245c1f
GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be
GMKit: ff2a77a9b85e13b4de333ec5eeb10b1ffef09756
GMKit: 410f4a2da98698ffe2e1e97043ea8f97ab8adb17
GMNetService: 7c69e7981b4fac29657fad5fc86a0c453196b862
GMNetworking: 592b9b71f2a7d92203483276158ce3139ac789d2
GMPhobos: fd6f7e453e71fb7f51d8c5601e605c110ddfda92
GMRefresh: c01ff8de5ada92e1362602fb6991f99124b7dbe3
GMRouter: 5c7ec79be351255beed2b2069bded624e3b729c4
GMPhobos: abab7c666c8a75549adea937e40e101d4d341b0d
GMRefresh: 11497a660eb14b1fda443bfe682910e0cc6031f4
GMRouter: 6f2c630e6d9f03d117ac39e5cdb1b522acf6ad65
GMShareSDK: a0725e2848d043aec84e787f6d233ac1546c1661
GMUtil: 194a8831e4311762c4b1ac1278281b456157f4ec
GPUImage: 733a5f0fab92df9de1c37ba9df520a833ccb406d
......@@ -308,13 +303,11 @@ SPEC CHECKSUMS:
SDWebImage: 84000f962cbfa70c07f19d2234cbfcf5d779b5dc
SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
TTTPlayerKit_iOS: e97074d0254e7cb26d88b6be1ec161f621a0a438
TTTRtcEngineKit_iOS: 3d4039c17d2c10537ff1ded31eaf6619f7b9e658
"UITableView+FDTemplateLayoutCell": 234e1582bcc4e18461af91155123bb96538ed030
WechatOpenSDK: 8b3ba4239193d1112205c139c94e21934e8f369a
Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
PODFILE CHECKSUM: 5bd3c38ad72ec5aec199900007bdf7eaf1e1397c
PODFILE CHECKSUM: 800885c0f1101f82303285bc0062a63798f4782f
COCOAPODS: 1.9.1
COCOAPODS: 1.9.3
......@@ -64,7 +64,7 @@ TODO: Add long description of the pod here.
# s.frameworks = 'UIKit', 'MapKit'
# s.dependency 'AFNetworking', '~> 2.3'
# s.sta
s.vendored_frameworks = 'GMAILab/Frameworks/*.framework'
s.vendored_frameworks = 'GMAILab/Frameworks/*.framework'
s.dependency 'GMBase'
s.dependency 'GMKit'
......@@ -89,16 +89,16 @@ s.vendored_frameworks = 'GMAILab/Frameworks/*.framework'
s.dependency 'Qiniu'
# s.libraries = "z", "c++", "xml2", "sqlite3"
# s.frameworks = 'ReplayKit', 'CoreTelephony', 'SystemConfiguration'
# s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => '' }
s.libraries = "z", "c++", "xml2", "sqlite3"
s.frameworks = 'ReplayKit', 'CoreTelephony', 'SystemConfiguration'
s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => '' }
s.dependency 'TTTRtcEngineKit_iOS'
s.dependency 'TTTPlayerKit_iOS'
# s.dependency 'TTTRtcEngineKit_iOS'
# s.dependency 'TTTPlayerKit_iOS'
s.static_framework = true
# s.pod_target_xcconfig = { 'VALID_ARCHS' => 'armv7' }
s.pod_target_xcconfig = { 'VALID_ARCHS' => 'armv7' }
end
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "TTTPlayerOptions.h"
/**
TTTPlayer 的播放状态
*/
typedef NS_ENUM(NSInteger, TTTPlayerStatus) {
/**
未知状态,只会作为 init 后的初始状态,开始播放之后任何情况下都不会再回到此状态。
*/
TTTPlayerStatusUnknow = 0,
/**
正在准备播放所需组件,在调用 play 方法时出现。
*/
TTTPlayerStatusPreparing,
/**
播放组件准备完成,准备开始播放,在调用 play 方法时出现。
*/
TTTPlayerStatusReady,
/**
TTTPlayer 缓存数据为空状态
*/
TTTPlayerStatusCaching,
/**
正在播放状态
*/
TTTPlayerStatusPlaying,
/**
暂停状态
*/
TTTPlayerStatusPaused,
/**
停止状态
该状态仅会在回放时播放结束出现,RTMP 直播结束并不会出现此状态
*/
TTTPlayerStatusStopped,
/**
错误状态,播放出现错误时会出现此状态。
*/
TTTPlayerStatusError
};
/**
TTTPlayer 的统计信息类
*/
@interface TTTPlayerStatsInfo : NSObject
@property (nonatomic, assign) int frameRate; // 帧率(fps)
@property (nonatomic, assign) int videoBitrate; // 视频的码率(kbps)
@property (nonatomic, assign) int audioBitrate; // 音频的码率(kbps)
@property (nonatomic, assign) int width; // 视频宽
@property (nonatomic, assign) int height; // 视频高
@property (nonatomic, assign) int audioDelay; // 音频延迟(ms)
@property (nonatomic, assign) int videoDelay; // 视频延迟(ms)
@end
@protocol TTTPlayerDelegate;
/**
TTTPlayer 是 TTTPlayerKit 中负责播放控制的核心类
*/
@interface TTTPlayer : NSObject
/**
代理对象,用于告知播放器状态改变或其他行为,对象需实现 TTTPlayerDelegate 协议
*/
@property (nonatomic, weak) id<TTTPlayerDelegate> delegate;
/**
TTTPlayer 的 options 对象
*/
@property (nonatomic, strong, readonly) TTTPlayerOptions *options;
/**
TTTPlayer 的画面输出到该 UIView 对象
*/
@property (nonatomic, strong, readonly) UIView *playerView;
/**
TTTPlayer 的播放状态
*/
@property (nonatomic, assign, readonly) TTTPlayerStatus status;
/**
指示当前 TTTPlayer 是否处于正在播放状态
*/
@property (nonatomic, assign, readonly, getter=isPlaying) BOOL playing;
/**
TTTPlayer 的当前播放时间
*/
@property (nonatomic, assign, readonly) NSTimeInterval currentTime;
/**
TTTPlayer 的总播放时间
*/
@property (nonatomic, assign, readonly) NSTimeInterval totalDuration;
/** 旋转视频只支持0、90、180、270*/
@property (nonatomic) int rotateDegress;
/**
使用 URL 和 options 生成一个 TTTPlayer 对象
@param URL 需要播放的 URL
@param options 播放器初始化选项,传入 nil 值将按照默认选项进行初始化
@return 生成的 TTTPlayer 对象
*/
+ (instancetype)playerWithURL:(NSURL *)URL options:(TTTPlayerOptions *)options;
/**
使用 url 和 option 初始化一个 TTTPlayer 对象
@param URL 需要播放的 URL
@param options 播放器初始化选项,传入 nil 值将按照默认选项进行初始化
@return 初始化后的 TTTPlayer 对象
*/
- (instancetype)initWithURL:(NSURL *)URL options:(TTTPlayerOptions *)options;
/**
开始播放
*/
- (void)play;
/**
当播放器处于暂停状态时调用该方法可以使播放器继续播放
*/
- (void)resume;
/**
当播放器处于 playing 或 caching 状态时调用该方法可以暂停播放器
*/
- (void)pause;
/**
停止播放
*/
- (void)stop;
/**
快速定位到指定播放时间点,该方法仅在回放时起作用,直播场景下该方法直接返回
*/
- (void)seekTo:(NSTimeInterval)time;
/**
调节播放音量
@param volume 0-100
*/
- (void)setPlaybackVolume:(int)volume;
- (UIImage *)thumbnailImageAtCurrentTime;
#pragma mark - KTV
/**
KTV场景再play之前调用该接口
*/
- (void)prepareForKTV;
/**
调节KTV播放音量
@param volume 0-100
*/
- (void)adjustKTVVolume:(int)volume;
/**
* 拉取KTV音频数据
*
* @param data 数据地址
* @param size 数据长度
* @param sampleRate 采样率
* @param channels 声道数
*/
- (void)pullKTVAudioData:(char *)data size:(int)size sampleRate:(int)sampleRate channels:(int)channels;
+ (NSString *)getVersion;
@end
/**
TTTPlayer 的代理协议
*/
@protocol TTTPlayerDelegate <NSObject>
@optional;
/**
告知代理对象播放器状态变更
@param player 调用该方法的 TTTPlayer 对象
@param playerStatus 变更之后的 TTTPlayer 状态
*/
- (void)player:(TTTPlayer *)player statusDidChange:(TTTPlayerStatus)playerStatus;
/**
告知代理对象播放器因错误停止播放
@param player 调用该方法的 TTTPlayer 对象
@param error 携带播放器停止播放错误信息的 NSError 对象
*/
- (void)player:(TTTPlayer *)player stoppedWithError:(NSError *)error;
/**
告知代理对象播放器统计信息(每2秒触发一次)
@param player 调用该方法的 TTTPlayer 对象
@param statsInfo 统计信息
*/
- (void)player:(TTTPlayer *)player statsInfo:(TTTPlayerStatsInfo *)statsInfo;
/**
告知代理对象播放器H264SEI
@param player 调用该方法的 TTTPlayer 对象
@param sei H264SEI
*/
- (void)player:(TTTPlayer *)player playbackH264SEI:(NSString *)sei;
/**
告知代理对象播放器H264SEI中的音量信息
@param player 调用该方法的 TTTPlayer 对象
@param volInfo 音量信息
*/
- (void)player:(TTTPlayer *)player playbackVolInfo:(NSArray<NSDictionary *> *)volInfo;
/**
* 视频第一帧解码成功
*/
- (void)playerVideoDecoderOpen:(TTTPlayer *)player;
- (void)playerVideoFrameRenderedStart:(TTTPlayer *)player;
- (void)playerRenderOverlay:(TTTPlayer *)player;
#pragma mark - KTV
/**
回调KTV视频数据信息
@param player 调用该方法的 TTTPlayer 对象
@param data 420P数据
@param width 视频宽
@param height 视频高
*/
- (void)player:(TTTPlayer *)player videoData:(NSData *)data width:(int)width height:(int)height;
/**
回调KTV音频数据信息
@param player 调用该方法的 TTTPlayer 对象
@param data 音频数据
*/
- (void)player:(TTTPlayer *)player audioData:(NSData *)data;
@end
#import <UIKit/UIKit.h>
//! Project version number for TTTPlayerKit.
FOUNDATION_EXPORT double TTTPlayerKitVersionNumber;
//! Project version string for TTTPlayerKit.
FOUNDATION_EXPORT const unsigned char TTTPlayerKitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <TTTPlayerKit/PublicHeader.h>
#import "TTTPlayer.h"
#import <Foundation/Foundation.h>
#import <MediaPlayer/MediaPlayer.h>
typedef NS_ENUM(NSUInteger, TTTPlayerMovieScalingMode) {
TTTPlayerMovieScalingModeNone, // No scaling
TTTPlayerMovieScalingModeAspectFit, // Uniform scale until one dimension fits
TTTPlayerMovieScalingModeAspectFill, // Uniform scale until the movie fills the visible bounds. One dimension may have clipped contents
TTTPlayerMovieScalingModeFill // Non-uniform scale. Both render dimensions will exactly match the visible bounds
};
/**
TTTPlayer 的可选配置类,在初始化 TTTPlayer 对象的时候传入其实例进行 TTTPlayer 的可选项配置
*/
@interface TTTPlayerOptions : NSObject
@property (nonatomic, assign) TTTPlayerMovieScalingMode movieScalingMode;
/**
使用默认配置生成一个 TTTPlayerOption 对象
*/
+ (nonnull TTTPlayerOptions *)defaultOptions;
@end
framework module TTTPlayerKit {
umbrella header "TTTPlayerKit.h"
export *
module * { export * }
}
framework module TTTRtcEngineKit {
umbrella header "TTTRtcEngineKit.h"
export *
module * { export * }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment