Skip to content

Commit

Permalink
report userlist
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed May 22, 2024
1 parent 1e12637 commit 8669217
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 11 deletions.
9 changes: 9 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 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.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)
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Source/LinkSDKDemo/Video/PlayBack/TIoTDemoPlaybackVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self initSubViews];

[TIoTCoreXP2PBridge sharedInstance].logEnable = YES;
[self requestXp2pInfo];
}

Expand Down
15 changes: 12 additions & 3 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ @interface TIoTCoreXP2PBridge ()<TIoTAVCaptionFLVDelegate>
@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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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"];
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.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'
Expand Down

0 comments on commit 8669217

Please sign in to comment.