hyzp_ybqx-Commit001:代码刚转换好,编译通过

This commit is contained in:
WinUser01
2021-12-09 20:24:36 +08:00
commit 8c74b14e5c
800 changed files with 66912 additions and 0 deletions
@@ -0,0 +1,18 @@
//
// AdaptiveStream.h
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface AdaptiveStream : NSObject
@property NSString *url;
@property NSString *drmType;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,13 @@
//
// AdaptiveStream.m
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import "AdaptiveStream.h"
@implementation AdaptiveStream
@end
@@ -0,0 +1,69 @@
//
// SPPlayCGIParseResult.h
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import <Foundation/Foundation.h>
//#import "SPResolutionDefination.h"
#import "SPSubStreamInfo.h"
#import "AdaptiveStream.h"
#import "SuperPlayerSprite.h"
#import "SPVideoFrameDescription.h"
#import "SuperPlayerUrl.h"
@class TXImageSprite;
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, SPDrmType) {
SPDrmTypeNone,
SPDrmTypeSimpleAES
};
@interface SPPlayCGIParseResult : NSObject
/// 视频播放url
@property (strong, nonatomic) NSString *url;
/// 视频名称
@property (strong, nonatomic) NSString *name;
/// 雪略图对象
@property (strong, nonatomic) TXImageSprite *imageSprite;
/// 雪略图打点帧信息
@property (strong, nonatomic) NSArray<SPVideoFrameDescription *> *keyFrameDescList;
/// 字流画质信息
@property (strong, nonatomic) NSArray<SPSubStreamInfo *> *resolutionArray;
/// 原视频时长
@property (assign, nonatomic) NSTimeInterval originalDuration;
/// 预留字段,暂不使用
@property (strong, nonatomic) NSArray<AdaptiveStream *> *adaptiveStreamArray;
/// V2协议的多码率URL列表
@property (strong, nonatomic) NSArray<SuperPlayerUrl *> *multiVideoURLs;
/// 加密类型,用于 Drm
@property (assign, nonatomic) SPDrmType drmType;
/// 加密令牌,用于 Drm
@property (copy, nonatomic) NSString *drmToken;
+ (SPDrmType)drmTypeFromString:(NSString *)typeString;
/**
* 获取画质信息
*
* @return 画质信息数组
List<TCVideoQuality> getVideoQualityList();
* 获取默认画质信息
*
* @return 默认画质信息对象
TCVideoQuality getDefaultVideoQuality();
*/
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,20 @@
//
// SPPlayCGIParseResult.m
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import "SPPlayCGIParseResult.h"
#import "TXImageSprite.h"
@implementation SPPlayCGIParseResult
+ (SPDrmType)drmTypeFromString:(NSString *)typeString {
BOOL isSimpleAES = [typeString caseInsensitiveCompare:@"SimpleAES"] == NSOrderedSame;
if (isSimpleAES) {
return SPDrmTypeSimpleAES;
}
return SPDrmTypeNone;
}
@end
@@ -0,0 +1,22 @@
//
// SPSubStreamInfo.h
// SuperPlayer
//
// Created by Steven Choi on 2020/2/11.
// Copyright © 2020 annidy. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
NS_ASSUME_NONNULL_BEGIN
/// 自适应码流子流信息
@interface SPSubStreamInfo : NSObject
@property (assign, nonatomic) CGSize size;
@property (copy, nonatomic) NSString *resolutionName;
@property (copy, nonatomic) NSString *type;
+ (instancetype)infoWithDictionary:(NSDictionary *)dict;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,21 @@
//
// SPSubStreamInfo.m
// SuperPlayer
//
// Created by Steven Choi on 2020/2/11.
// Copyright © 2020 annidy. All rights reserved.
//
#import "SPSubStreamInfo.h"
#import "J2Obj.h"
@implementation SPSubStreamInfo
+ (instancetype)infoWithDictionary:(NSDictionary *)dict {
SPSubStreamInfo *info = [[SPSubStreamInfo alloc] init];
double width = [J2Num(dict[@"width"]) doubleValue];
double height = [J2Num(dict[@"height"]) doubleValue];
info.size = CGSizeMake(width, height);
info.resolutionName = J2Str(dict[@"name"]);
info.type = J2Str(dict[@"type"]);
return info;
}
@end
@@ -0,0 +1,21 @@
//
// SPVideoFrameDescription.h
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface SPVideoFrameDescription : NSObject
// updates in SuperPlayerView
@property double where;
@property NSString *text;
@property double time;
+ (instancetype)instanceFromDictionary:(NSDictionary *)dict;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,22 @@
//
// SPVideoFrameDescription.m
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import "SPVideoFrameDescription.h"
#import "J2Obj.h"
@implementation SPVideoFrameDescription
+ (instancetype)instanceFromDictionary:(NSDictionary *)keyFrameDesc {
if (![keyFrameDesc isKindOfClass:[NSDictionary class]]) {
return nil;
}
SPVideoFrameDescription *ret = [[SPVideoFrameDescription alloc] init];
ret.time = [J2Num([keyFrameDesc valueForKeyPath:@"timeOffset"]) intValue]/1000.0;
ret.text = [J2Str([keyFrameDesc valueForKeyPath:@"content"]) stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
return ret;
}
@end
@@ -0,0 +1,18 @@
//
// SuperPlayerSprite.h
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface SuperPlayerSprite : NSObject
@property (strong, nonatomic) NSArray<NSString *> *imageURLs;
@property (strong, nonatomic) NSString *webVttURL;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,13 @@
//
// SuperPlayerSprite.m
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import "SuperPlayerSprite.h"
@implementation SuperPlayerSprite
@end
@@ -0,0 +1,23 @@
//
// SuperPlayerUrl.h
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
/**
* 多码率地址
* 用于有多个播放地址的多清晰度视频的播放
*/
@interface SuperPlayerUrl : NSObject
/// 播放器展示的对应标题,如“高清”、“低清”等
@property NSString *title;
/// 播放地址
@property NSString *url;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,13 @@
//
// SuperPlayerUrl.m
// SuperPlayer
//
// Created by cui on 2019/12/25.
// Copyright © 2019 annidy. All rights reserved.
//
#import "SuperPlayerUrl.h"
@implementation SuperPlayerUrl
@end