Skip to content

Commit

Permalink
add ops data
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed Nov 21, 2024
1 parent 38e057b commit 4bdc1ea
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ PODS:
- TIoTLinkKit_SoundTouch (1.0.0)
- TIoTLinkKit_TPNS (1.0.1)
- TIoTLinkKit_WechatOpenSDK (1.0.1)
- TIoTLinkKit_XP2P (2.4.52-beta.202410310732)
- TIoTLinkKit_XP2P (2.4.52-beta.202411210852)
- TIoTLinkVideo (1.0.0):
- CocoaAsyncSocket (= 7.6.5)
- TIoTLinkKit_FLV (= 2.2.3)
- TIoTLinkKit_GVoiceSE (>= 1.0.9)
- TIoTLinkKit_SoundTouch (= 1.0.0)
- TIoTLinkKit_XP2P (= 2.4.52-beta.202410310732)
- TIoTLinkKit_XP2P (= 2.4.52-beta.202411210852)
- TPCircularBuffer (= 1.6.1)
- TPCircularBuffer (1.6.1)
- TrueTime (5.0.3)
Expand Down Expand Up @@ -133,8 +133,8 @@ SPEC CHECKSUMS:
TIoTLinkKit_SoundTouch: cf79ae182b6c2349ff65bac7a338974bc538fa77
TIoTLinkKit_TPNS: 7cea4fc1d20ef6c4c11c4f0b66bbb10ecf4ed968
TIoTLinkKit_WechatOpenSDK: 7822d68cc5c46edf3f6020422202e7b65ea87614
TIoTLinkKit_XP2P: 6aa0681277844c2abbb5e79c20f7015fd5d77548
TIoTLinkVideo: a6707e1a88577f0f7804935cd1c66be22351b801
TIoTLinkKit_XP2P: b9b93f181f69c34f5f8312e51d7399de064f6910
TIoTLinkVideo: ca710b0373b3f40ae78b58818e54127e21155f93
TPCircularBuffer: c13243556527551c4d320709c7b14a6d20cdc30a
TrueTime: b49551ffafb28a9dee04e51b226f42a416010842
TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d
Expand Down
22 changes: 19 additions & 3 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -769,14 +769,30 @@ - (void)reportUserList:(data_report_t)report {
[accessParam setValue:@([[TIoTCoreXP2PBridge getNowTimeTimestamp] integerValue]) forKey:@"Time"];
[accessParam setValue:@"ios" forKey:@"System"];
[accessParam setValue:@"app" forKey:@"Platform"];
[accessParam setValue:appPeerName forKey:@"AppPeerName"];
[accessParam setValue:deviceP2PInfo forKey:@"DeviceP2PInfo"];
[accessParam setValue:[self getAppUUID] forKey:@"Uuid"];
[accessParam setValue:[self getAppUUID] forKey:@"UserId"];
[accessParam setValue:self.pro_id forKey:@"ProductId"];
[accessParam setValue:self.dev_name forKey:@"DeviceName"];
[accessParam setValue:@(report.live_size) forKey:@"ByteCount"];
[accessParam setValue:@(0) forKey:@"Channel"];
[accessParam setValue:appPeerName forKey:@"AppPeerNameFromApp"];
[accessParam setValue:deviceP2PInfo forKey:@"DeviceP2PInfoFromApp"];
[accessParam setValue:@(report.appUpByte) forKey:@"AppUpByte"];
[accessParam setValue:@(report.appDownByte) forKey:@"AppDownByte"];
[accessParam setValue:[TIoTCoreXP2PBridge getSDKVersion] forKey:@"AppVersion"];
if ([status isEqualToString:@"fail"]) {
[accessParam setValue:@"err" forKey:@"AppResult"];
[accessParam setValue:@(report.errorcode) forKey:@"AppFailMsg"];

}else {
[accessParam setValue:@"succ" forKey:@"AppResult"];
}
NSString *appConnectIp = @"";
if (report.appConnectIp != NULL) {
appConnectIp = [NSString stringWithCString:(const char *)report.appConnectIp encoding:NSASCIIStringEncoding];
}
[accessParam setValue:appConnectIp forKey:@"AppConnectIp"];

NSURL *url = [NSURL URLWithString:@"https://applog.iotcloud.tencentiotcloud.com/api/xp2p_ops/applog"];
NSMutableURLRequest *reqlog = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:5];
[reqlog setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
Expand All @@ -791,7 +807,7 @@ - (void)reportUserList:(data_report_t)report {
}];
[tasklog resume];

if ([status isEqualToString:@"end"]) {
if ([status isEqualToString:@"end"] || [status isEqualToString:@"fail"]) {
[self.uniReqStartTime removeObjectForKey:reqid];
}
}
Expand Down
2 changes: 1 addition & 1 deletion TIoTLinkVideo.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.52-beta.202410310732'
s.dependency 'TIoTLinkKit_XP2P', '2.4.52-beta.202411210852'
s.dependency 'TIoTLinkKit_FLV', '2.2.3'
s.dependency 'CocoaAsyncSocket', '7.6.5'
s.dependency 'TIoTLinkKit_SoundTouch', '1.0.0'
Expand Down

0 comments on commit 4bdc1ea

Please sign in to comment.