Skip to content

Commit

Permalink
更新 p2p core sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed Feb 26, 2024
1 parent f570216 commit f3e20d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 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.45)
- TIoTLinkKit_XP2P (2.4.46-beta.202402260751)
- TIoTLinkVideo (1.0.0):
- CocoaAsyncSocket (= 7.6.5)
- TIoTLinkKit_FLV (= 2.2.3)
- TIoTLinkKit_GVoiceSE (= 1.0.4)
- TIoTLinkKit_SoundTouch (= 1.0.0)
- TIoTLinkKit_XP2P (= 2.4.45)
- TIoTLinkKit_XP2P (= 2.4.46-beta.202402260751)
- 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: d9e422a3dbb19485e68206442e49f0e2c2fdb09d
TIoTLinkVideo: 8d8aecccdaed68c2a9655b2413e3a7641d3e5894
TIoTLinkKit_XP2P: a80b13ebad4a195c831db563718eb3b88b11ad83
TIoTLinkVideo: 739c461db7f41ddfed8fd9255348a5c650be04ca
TPCircularBuffer: c13243556527551c4d320709c7b14a6d20cdc30a
TrueTime: b49551ffafb28a9dee04e51b226f42a416010842
TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d
Expand Down
10 changes: 6 additions & 4 deletions Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,17 @@ - (void)cancelTimer;
@end

const char* XP2PMsgHandle(const char *idd, XP2PType type, const char* msg) {
if (idd == nullptr) {
return nullptr;
}

BOOL logEnable = [TIoTCoreXP2PBridge sharedInstance].logEnable;
if (logEnable) {
printf("XP2P log: %s\n", msg);
printf("XP2P log: %s", msg);
}

if (type == XP2PTypeLog) {
if (logEnable) {
fwrite(msg, 1, strlen(msg)>300?300:strlen(msg), p2pOutLogFile);
}
return nullptr;
}else if (type == XP2PTypeSaveFileOn) {

BOOL isWriteFile = [TIoTCoreXP2PBridge sharedInstance].writeFile;
Expand Down Expand Up @@ -211,6 +209,8 @@ - (XP2PErrCode)startAppWith:(NSString *)sec_id sec_key:(NSString *)sec_key pro_i
return [self startAppWith:sec_id sec_key:sec_key pro_id:pro_id dev_name:dev_name xp2pinfo:@""];
}
- (XP2PErrCode)startAppWith:(NSString *)sec_id sec_key:(NSString *)sec_key pro_id:(NSString *)pro_id dev_name:(NSString *)dev_name xp2pinfo:(NSString *)xp2pinfo {
// setLogEnable(false, false);

NSString *fileName = @"stun.txt";
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = paths.firstObject;
Expand All @@ -233,6 +233,8 @@ - (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name {
}
- (XP2PErrCode)startAppWith:(NSString *)pro_id dev_name:(NSString *)dev_name type:(XP2PProtocolType)type{
// setStunServerToXp2p("11.11.11.11", 111);
// setLogEnable(false, false);

NSString *fileName = @"stun.txt";
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentDirectory = paths.firstObject;
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.45'
s.dependency 'TIoTLinkKit_XP2P', '2.4.46-beta.202402260751'
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 f3e20d9

Please sign in to comment.