Skip to content

Commit

Permalink
添加video日志开关
Browse files Browse the repository at this point in the history
Change-Id: Iebf5a059bb2adb39543fbbc2ae0b261d2280f62c
  • Loading branch information
tonychanchen committed Sep 9, 2021
1 parent efed56e commit 86f66e2
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 27 deletions.
6 changes: 3 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ target 'LinkApp' do
pod 'Tencent-MapSDK', '4.3.9'
pod 'lottie-ios', '3.1.8'
pod 'CocoaAsyncSocket', '7.6.5'
pod 'TIoTLinkThirdPartyKit/TPNS-iOS', '2.2.1'
pod 'TIoTLinkThirdPartyKit/WechatOpenSDK_NoPay', '2.2.1'
pod 'TIoTLinkKit_TPNS', '1.0.1'
pod 'TIoTLinkKit_WechatOpenSDK', '1.0.1'
end


Expand All @@ -42,5 +42,5 @@ target 'LinkSDKDemo' do
pod 'TIoTLinkKit/LinkRTC', :path => './'

pod 'TIoTLinkVideo', :path => './'
pod 'TIoTLinkKit_IJKPlayer', '2.0.5'
pod 'TIoTLinkKit_IJKPlayer', '1.0.2'
end
32 changes: 19 additions & 13 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ PODS:
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (6.7.2):
- GoogleUtilities/Logger
- GTMSessionFetcher/Core (1.6.1)
- GTMSessionFetcher/Core (1.7.0)
- IQKeyboardManager (6.1.1)
- KeychainAccess (4.2.0)
- lottie-ios (3.1.8)
Expand Down Expand Up @@ -132,14 +132,14 @@ PODS:
- TIoTLinkKit/LinkCore
- TXLiteAVSDK_TRTC (= 8.0.9644)
- YYModel (= 1.0.4)
- TIoTLinkKit_IJKPlayer (2.0.5)
- TIoTLinkThirdPartyKit/Faac-iOS (2.2.1)
- TIoTLinkThirdPartyKit/TPNS-iOS (2.2.1)
- TIoTLinkThirdPartyKit/WechatOpenSDK_NoPay (2.2.1)
- TIoTLinkKit_Faac (2.0.5)
- TIoTLinkKit_IJKPlayer (1.0.2)
- TIoTLinkKit_TPNS (1.0.1)
- TIoTLinkKit_WechatOpenSDK (1.0.1)
- TIoTLinkThirdPartyKit/XP2P-iOS (2.2.1)
- TIoTLinkVideo (1.0.0):
- CocoaLumberjack (= 3.7.2)
- TIoTLinkThirdPartyKit/Faac-iOS (= 2.2.1)
- TIoTLinkKit_Faac (= 2.0.5)
- TIoTLinkThirdPartyKit/XP2P-iOS (= 2.2.1)
- TrueTime (5.0.3)
- TXLiteAVSDK_TRTC (8.0.9644)
Expand All @@ -166,9 +166,9 @@ DEPENDENCIES:
- Tencent-MapSDK (= 4.3.9)
- TIoTLinkKit (from `./`)
- TIoTLinkKit/LinkRTC (from `./`)
- TIoTLinkKit_IJKPlayer
- TIoTLinkThirdPartyKit/TPNS-iOS (= 2.2.1)
- TIoTLinkThirdPartyKit/WechatOpenSDK_NoPay (= 2.2.1)
- TIoTLinkKit_IJKPlayer (= 1.0.2)
- TIoTLinkKit_TPNS (= 1.0.1)
- TIoTLinkKit_WechatOpenSDK (= 1.0.1)
- TIoTLinkVideo (from `./`)
- TrueTime (= 5.0.3)
- TZImagePickerController (= 3.2.1)
Expand Down Expand Up @@ -208,7 +208,10 @@ SPEC REPOS:
- SDWebImage
- SocketRocket
- Tencent-MapSDK
- TIoTLinkKit_Faac
- TIoTLinkKit_IJKPlayer
- TIoTLinkKit_TPNS
- TIoTLinkKit_WechatOpenSDK
- TIoTLinkThirdPartyKit
- TrueTime
- TXLiteAVSDK_TRTC
Expand Down Expand Up @@ -238,7 +241,7 @@ SPEC CHECKSUMS:
GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
GoogleToolboxForMac: 8bef7c7c5cf7291c687cf5354f39f9db6399ad34
GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
GTMSessionFetcher: 36689134877faeb055b27dfa4ccc9ceaa42e029e
GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
IQKeyboardManager: 79c57795f5c2408d259d37b9da2ed07efcbb5225
KeychainAccess: 3f760109aa99b05d0f231e28b22642da7153e38a
lottie-ios: 48fac6be217c76937e36e340e2d09cf7b10b7f5f
Expand All @@ -255,14 +258,17 @@ SPEC CHECKSUMS:
SocketRocket: d57c7159b83c3c6655745cd15302aa24b6bae531
Tencent-MapSDK: 6dfbee53b46131deb4c4bb02b3edc5ce7fb630dc
TIoTLinkKit: 0386fb583c61765a02ad5cca810c7661d5a0bc53
TIoTLinkKit_IJKPlayer: 59e845b7129204684747b3c36c89b1fdccad388a
TIoTLinkKit_Faac: 9295b2ff5e8d978cbcaf9ff062db2728a333f4cb
TIoTLinkKit_IJKPlayer: e47c3fed6b204e7544f84a24310cab7a372854d1
TIoTLinkKit_TPNS: 7cea4fc1d20ef6c4c11c4f0b66bbb10ecf4ed968
TIoTLinkKit_WechatOpenSDK: 7822d68cc5c46edf3f6020422202e7b65ea87614
TIoTLinkThirdPartyKit: 097ce7631d6bb13bcb90a0319d4ac5ca360ee012
TIoTLinkVideo: 2dd2842755d0bf1112e42cf16b63687292df9a9b
TIoTLinkVideo: e17a950ec65815269b5695f239e7f245fb27b375
TrueTime: b49551ffafb28a9dee04e51b226f42a416010842
TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d
TZImagePickerController: bf4c57b98d8707fce41ea6be872414a71c7a8c9d
YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30

PODFILE CHECKSUM: 8b67744ace0642e89260bb9d643f6a5c98ee3d9c
PODFILE CHECKSUM: 7c89461b8ea2f9c9c6711a04e6c39be4e141b7c9

COCOAPODS: 1.9.3
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.

// [[TIoTCoreXP2PBridge sharedInstance] startAppWith:[TIoTCoreAppEnvironment shareEnvironment].cloudSecretId
// sec_key:[TIoTCoreAppEnvironment shareEnvironment].cloudSecretKey
// pro_id:[TIoTCoreAppEnvironment shareEnvironment].cloudProductId
// dev_name:self.deviceNameNVR?:@""];
//关闭日志
// [TIoTCoreXP2PBridge sharedInstance].logEnable = NO;

self.qualityString = quality_super;

self.qualityString = quality_standard;
self.screenRect = [UIApplication sharedApplication].delegate.window.frame;

if (self.isNVR == NO) {
Expand Down Expand Up @@ -1162,6 +1161,7 @@ - (void)configVideo {

self.view.autoresizesSubviews = YES;
[self.imageView addSubview:self.player.view];
[self.player resetHubFrame:self.player.view.frame];

// [self.player setOptionIntValue:10 * 1000 forKey:@"analyzeduration" ofCategory:kIJKFFOptionCategoryFormat];
[self.player setOptionIntValue:25 * 1024 forKey:@"probesize" ofCategory:kIJKFFOptionCategoryFormat];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,7 @@ - (void)configVideo {

self.view.autoresizesSubviews = YES;
[self.imageView addSubview:self.player.view];

[self.player resetHubFrame:self.player.view.frame];
// [self.player setOptionIntValue:10 * 1000 forKey:@"analyzeduration" ofCategory:kIJKFFOptionCategoryFormat];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,8 @@ - (void)configVideo {

self.view.autoresizesSubviews = YES;
[self.imageView addSubview:self.player.view];

[self.player resetHubFrame:self.player.view.frame];

[self.player setOptionIntValue:10 * 1000 forKey:@"analyzeduration" ofCategory:kIJKFFOptionCategoryFormat];
[self.player setOptionIntValue:10 * 1024 forKey:@"probesize" ofCategory:kIJKFFOptionCategoryFormat];
[self.player setOptionIntValue:0 forKey:@"packet-buffering" ofCategory:kIJKFFOptionCategoryPlayer];
Expand Down
1 change: 1 addition & 0 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface TIoTCoreXP2PBridge : NSObject
@property (nonatomic, weak)id<TIoTCoreXP2PBridgeDelegate> delegate;
@property (nonatomic, assign)BOOL writeFile; //是否将数据帧写入文档
@property (nonatomic, assign)BOOL logEnable; //log 开关,默认打开

+ (NSString *)getSDKVersion;
+ (instancetype)sharedInstance ;
Expand Down
10 changes: 7 additions & 3 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
}

if (type == XP2PTypeLog) {

NSString *nsFormat = [NSString stringWithUTF8String:msg];
DDLogInfo(@"%@", nsFormat);
BOOL logEnable = [TIoTCoreXP2PBridge sharedInstance].logEnable;
if (logEnable) {
NSString *nsFormat = [NSString stringWithUTF8String:msg];
DDLogInfo(@"%@", nsFormat);
}
}else if (type == XP2PTypeSaveFileOn) {

BOOL isWriteFile = [TIoTCoreXP2PBridge sharedInstance].writeFile;
Expand Down Expand Up @@ -95,6 +97,8 @@ - (instancetype)init {
#ifndef DEBUG
[TIoTCoreXP2PBridge redirectNSLog];
#endif
//默认打开log开关
_logEnable = YES;
}
return self;
}
Expand Down
2 changes: 1 addition & 1 deletion TIoTLinkVideo.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Pod::Spec.new do |s|

s.source_files = 'Source/SDK/LinkVideo/**/*.{h,m,c,mm}'
s.dependency 'TIoTLinkThirdPartyKit/XP2P-iOS', '2.2.1'
s.dependency 'TIoTLinkThirdPartyKit/Faac-iOS', '2.2.1'
s.dependency 'TIoTLinkKit_Faac', '2.0.5'
s.dependency 'CocoaLumberjack', '3.7.2'
s.pod_target_xcconfig = {
'VALID_ARCHS' => 'arm64'
Expand Down

0 comments on commit 86f66e2

Please sign in to comment.