From 8669217f790efedda650289f8374d55c6e27fb9a Mon Sep 17 00:00:00 2001 From: eagleychen Date: Wed, 22 May 2024 20:23:18 +0800 Subject: [PATCH] report userlist --- Podfile | 9 +++++++++ Podfile.lock | 10 +++++----- .../Controller/TIoTDemoLocalRecordVC.m | 2 +- .../Video/PlayBack/TIoTDemoPlaybackVC.m | 2 +- Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm | 15 ++++++++++++--- TIoTLinkVideo.podspec | 2 +- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/Podfile b/Podfile index 8c9d42ee..2f321614 100644 --- a/Podfile +++ b/Podfile @@ -44,3 +44,12 @@ target 'LinkSDKDemo' do pod 'TIoTLinkVideo', :path => './' pod 'TIoTLinkKit_IJKPlayer', '2.0.14' end + +#older OS versions does not contain 'libarclite', at least iOS 11 +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = "11.0" + end + end +end diff --git a/Podfile.lock b/Podfile.lock index abe6b2ec..caa90fc8 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -35,13 +35,13 @@ PODS: - TIoTLinkKit_SoundTouch (1.0.0) - TIoTLinkKit_TPNS (1.0.1) - TIoTLinkKit_WechatOpenSDK (1.0.1) - - TIoTLinkKit_XP2P (2.4.49-beta.202405140951) + - TIoTLinkKit_XP2P (2.4.49-beta.202405221203) - TIoTLinkVideo (1.0.0): - CocoaAsyncSocket (= 7.6.5) - TIoTLinkKit_FLV (= 2.2.3) - TIoTLinkKit_GVoiceSE (>= 1.0.7) - TIoTLinkKit_SoundTouch (= 1.0.0) - - TIoTLinkKit_XP2P (= 2.4.49-beta.202405140951) + - TIoTLinkKit_XP2P (= 2.4.49-beta.202405221203) - TPCircularBuffer (= 1.6.1) - TPCircularBuffer (1.6.1) - TrueTime (5.0.3) @@ -133,14 +133,14 @@ SPEC CHECKSUMS: TIoTLinkKit_SoundTouch: cf79ae182b6c2349ff65bac7a338974bc538fa77 TIoTLinkKit_TPNS: 7cea4fc1d20ef6c4c11c4f0b66bbb10ecf4ed968 TIoTLinkKit_WechatOpenSDK: 7822d68cc5c46edf3f6020422202e7b65ea87614 - TIoTLinkKit_XP2P: c99d4c39788069c8c469c836ded075da5cf316ab - TIoTLinkVideo: 1ddb809a95a2b788db4d5ceb297cb6d817f1f948 + TIoTLinkKit_XP2P: e32c680e361253852f0f4e00f02f871285d888ed + TIoTLinkVideo: db03c08d1a8e66498ec664db9547545a2d06c21e TPCircularBuffer: c13243556527551c4d320709c7b14a6d20cdc30a TrueTime: b49551ffafb28a9dee04e51b226f42a416010842 TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d TZImagePickerController: bf4c57b98d8707fce41ea6be872414a71c7a8c9d YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30 -PODFILE CHECKSUM: 626dd89913a512999812eb0559c238bfca855903 +PODFILE CHECKSUM: 3a411a84fe009500559c4cc786c5b18ff80b92e9 COCOAPODS: 1.14.3 diff --git a/Source/LinkSDKDemo/Video/PlayBack/LocalPlayBack/Controller/TIoTDemoLocalRecordVC.m b/Source/LinkSDKDemo/Video/PlayBack/LocalPlayBack/Controller/TIoTDemoLocalRecordVC.m index be550820..a012c4e4 100644 --- a/Source/LinkSDKDemo/Video/PlayBack/LocalPlayBack/Controller/TIoTDemoLocalRecordVC.m +++ b/Source/LinkSDKDemo/Video/PlayBack/LocalPlayBack/Controller/TIoTDemoLocalRecordVC.m @@ -749,7 +749,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath - (void)downLoadResWithModel:(TIoTDemoLocalFileModel *)model { self.downLoading = YES; - [TIoTCoreXP2PBridge sharedInstance].logEnable = NO; + [TIoTCoreXP2PBridge sharedInstance].logEnable = YES; [MBProgressHUD showLodingNoneEnabledInView:self.view withMessage:@"下载资源中"]; NSString *logFile = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:model.file_name]; diff --git a/Source/LinkSDKDemo/Video/PlayBack/TIoTDemoPlaybackVC.m b/Source/LinkSDKDemo/Video/PlayBack/TIoTDemoPlaybackVC.m index 1482bb0d..1a67e58b 100644 --- a/Source/LinkSDKDemo/Video/PlayBack/TIoTDemoPlaybackVC.m +++ b/Source/LinkSDKDemo/Video/PlayBack/TIoTDemoPlaybackVC.m @@ -26,7 +26,7 @@ - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. [self initSubViews]; - + [TIoTCoreXP2PBridge sharedInstance].logEnable = YES; [self requestXp2pInfo]; } diff --git a/Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm b/Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm index d86ddb12..39c5eb7c 100644 --- a/Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm +++ b/Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm @@ -24,6 +24,7 @@ @interface TIoTCoreXP2PBridge () @property (nonatomic, strong) AVCaptureSessionPreset resolution; @property (nonatomic, strong) NSTimer *getBufTimer; @property (nonatomic, assign) NSInteger startTime; +@property (nonatomic, assign) NSInteger startVoiceTime; @property (nonatomic, strong) TIoTCoreLogger *logger; - (void)cancelTimer; - (void)doTick:(data_report_t)data_buf; @@ -286,8 +287,6 @@ - (XP2PErrCode)setXp2pInfo:(NSString *)dev_name sec_id:(NSString *)sec_id sec_ke } int ret = setDeviceXp2pInfo(dev_name.UTF8String, xp2pinfo.UTF8String); - - self.startTime = [[TIoTCoreXP2PBridge getNowTimeTimestamp] integerValue]; return (XP2PErrCode)ret; } @@ -643,12 +642,22 @@ - (void)reportUserList:(data_report_t)report { NSString *reqid = [NSString stringWithCString:(const char *)report.uniqueId encoding:NSASCIIStringEncoding];//@"8f3d545eabe165ed52247f1c89ad5acd";//[[NSUUID UUID] UUIDString]; NSString *status = [NSString stringWithCString:(const char *)report.status encoding:NSASCIIStringEncoding]; NSString *dataaction = [NSString stringWithCString:(const char *)report.data_action encoding:NSASCIIStringEncoding]; + + if ([status isEqualToString:@"start"]) { + if ([dataaction isEqualToString:@"voice"]) { + self.startVoiceTime = [[TIoTCoreXP2PBridge getNowTimeTimestamp] integerValue]; + }else { + self.startTime = [[TIoTCoreXP2PBridge getNowTimeTimestamp] integerValue]; + } + } + + NSInteger startTime = [dataaction isEqualToString:@"voice"]? self.startVoiceTime:self.startTime; NSMutableDictionary *accessParam = [NSMutableDictionary dictionary]; [accessParam setValue:@"P2PReport" forKey:@"Action"]; [accessParam setValue:status forKey:@"Status"]; [accessParam setValue:dataaction forKey:@"DataAction"]; [accessParam setValue:reqid forKey:@"UniqueId"]; - [accessParam setValue:@(self.startTime) forKey:@"StartTime"]; + [accessParam setValue:@(startTime) forKey:@"StartTime"]; [accessParam setValue:@([[TIoTCoreXP2PBridge getNowTimeTimestamp] integerValue]) forKey:@"Time"]; [accessParam setValue:@"ios" forKey:@"System"]; [accessParam setValue:@"app" forKey:@"Platform"]; diff --git a/TIoTLinkVideo.podspec b/TIoTLinkVideo.podspec index 03423c21..313d7a1f 100644 --- a/TIoTLinkVideo.podspec +++ b/TIoTLinkVideo.podspec @@ -19,7 +19,7 @@ Pod::Spec.new do |s| s.source_files = 'Source/SDK/LinkVideo/**/*.{h,m,c,mm}' s.resource = 'Source/SDK/LinkVideo/FLV/asset/GvoiceSE_v1_239-119-oneref-e.nn' - s.dependency 'TIoTLinkKit_XP2P', '2.4.49-beta.202405140951' + s.dependency 'TIoTLinkKit_XP2P', '2.4.49-beta.202405221203' s.dependency 'TIoTLinkKit_FLV', '2.2.3' s.dependency 'CocoaAsyncSocket', '7.6.5' s.dependency 'TIoTLinkKit_SoundTouch', '1.0.0'