Skip to content

Commit 2a077d3

Browse files
author
eagleychen
committed
区分每次stop的uni,防止前一次stop影响后一次start
1 parent 5117af9 commit 2a077d3

File tree

5 files changed

+27
-14
lines changed

5 files changed

+27
-14
lines changed

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ PODS:
3535
- TIoTLinkKit_SoundTouch (1.0.0)
3636
- TIoTLinkKit_TPNS (1.0.1)
3737
- TIoTLinkKit_WechatOpenSDK (1.0.1)
38-
- TIoTLinkKit_XP2P (2.4.49-beta.202405221203)
38+
- TIoTLinkKit_XP2P (2.4.49)
3939
- TIoTLinkVideo (1.0.0):
4040
- CocoaAsyncSocket (= 7.6.5)
4141
- TIoTLinkKit_FLV (= 2.2.3)
4242
- TIoTLinkKit_GVoiceSE (>= 1.0.7)
4343
- TIoTLinkKit_SoundTouch (= 1.0.0)
44-
- TIoTLinkKit_XP2P (= 2.4.49-beta.202405221203)
44+
- TIoTLinkKit_XP2P (= 2.4.49)
4545
- TPCircularBuffer (= 1.6.1)
4646
- TPCircularBuffer (1.6.1)
4747
- TrueTime (5.0.3)
@@ -133,8 +133,8 @@ SPEC CHECKSUMS:
133133
TIoTLinkKit_SoundTouch: cf79ae182b6c2349ff65bac7a338974bc538fa77
134134
TIoTLinkKit_TPNS: 7cea4fc1d20ef6c4c11c4f0b66bbb10ecf4ed968
135135
TIoTLinkKit_WechatOpenSDK: 7822d68cc5c46edf3f6020422202e7b65ea87614
136-
TIoTLinkKit_XP2P: e32c680e361253852f0f4e00f02f871285d888ed
137-
TIoTLinkVideo: db03c08d1a8e66498ec664db9547545a2d06c21e
136+
TIoTLinkKit_XP2P: 0250d1a8f0561f015bb9ab09aed59c0a617e49aa
137+
TIoTLinkVideo: 938a736bd9da2ce61edd16d8637ae929aa4b593b
138138
TPCircularBuffer: c13243556527551c4d320709c7b14a6d20cdc30a
139139
TrueTime: b49551ffafb28a9dee04e51b226f42a416010842
140140
TXLiteAVSDK_TRTC: e3383a81565e8bb2aaaaab4bd099ad5239cd5b2d

Source/LinkSDKDemo/Video/P2P/Controller/TIoTDemoVideoCallVC.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@ - (void)loadStateDidChange:(NSNotification*)notification {
378378

379379

380380
- (void)moviePlayBackStateDidChange:(NSNotification*)notification {
381+
NSString *seicontent = [notification.userInfo objectForKey:@"FFP_MSG_VIDEO_SEI_CONTENT"];
382+
if (seicontent) {
383+
return;
384+
}
385+
381386
switch (_player.playbackState)
382387
{
383388
case IJKMPMoviePlaybackStateStopped: {

Source/LinkSDKDemo/Video/PlayBack/LocalPlayBack/Controller/TIoTDemoLocalRecordVC.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,6 +1476,9 @@ - (void)startPlayLocalVideoWithStartTime:(NSInteger )startTime endTime:(NSIntege
14761476
NSInteger durationValue = self.videoTimeModel.EndTime.integerValue - self.videoTimeModel.StartTime.integerValue;
14771477
NSInteger minuteValue = durationValue / 60;
14781478
NSInteger secondValue = durationValue % 60;
1479+
if (durationValue == 0) {
1480+
return;
1481+
}
14791482

14801483
self.slider.minimumValue = 0;
14811484
self.slider.maximumValue = durationValue;

Source/SDK/LinkVideo/TIoTCoreXP2PBridge.mm

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ @interface TIoTCoreXP2PBridge ()<TIoTAVCaptionFLVDelegate>
2323
@property (nonatomic, assign) BOOL isSending;
2424
@property (nonatomic, strong) AVCaptureSessionPreset resolution;
2525
@property (nonatomic, strong) NSTimer *getBufTimer;
26-
@property (nonatomic, assign) NSInteger startTime;
27-
@property (nonatomic, assign) NSInteger startVoiceTime;
26+
@property (nonatomic, strong) NSMutableDictionary *uniReqStartTime;
2827
@property (nonatomic, strong) TIoTCoreLogger *logger;
2928
- (void)cancelTimer;
3029
- (void)doTick:(data_report_t)data_buf;
@@ -216,6 +215,8 @@ - (instancetype)init {
216215
[[NSFileManager defaultManager] removeItemAtPath:logFile error:nil];
217216
[[NSFileManager defaultManager] createFileAtPath:logFile contents:nil attributes:nil];
218217
p2pOutLogFile = fopen(logFile.UTF8String, "wb");
218+
219+
_uniReqStartTime = [NSMutableDictionary dictionary];
219220
}
220221
return self;
221222
}
@@ -622,7 +623,7 @@ - (void)doTick:(data_report_t)data_buf {
622623
}
623624

624625
NSData *body = [NSData dataWithBytes:data_buf.report_buf length:data_buf.report_size];
625-
NSURL *urlString = [NSURL URLWithString:@"http://log.qvb.qcloud.com/reporter/vlive"];
626+
NSURL *urlString = [NSURL URLWithString:@"https://log.qvb.qcloud.com/reporter/vlive"];
626627
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:urlString cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:5];
627628
[request setValue:@"application/octet-stream" forHTTPHeaderField:@"Content-Type"];
628629
request.HTTPMethod = @"POST";
@@ -644,14 +645,14 @@ - (void)reportUserList:(data_report_t)report {
644645
NSString *dataaction = [NSString stringWithCString:(const char *)report.data_action encoding:NSASCIIStringEncoding];
645646

646647
if ([status isEqualToString:@"start"]) {
647-
if ([dataaction isEqualToString:@"voice"]) {
648-
self.startVoiceTime = [[TIoTCoreXP2PBridge getNowTimeTimestamp] integerValue];
649-
}else {
650-
self.startTime = [[TIoTCoreXP2PBridge getNowTimeTimestamp] integerValue];
651-
}
648+
[self.uniReqStartTime setObject:[TIoTCoreXP2PBridge getNowTimeTimestamp] forKey:reqid];
649+
}
650+
651+
NSInteger startTime = [[self.uniReqStartTime objectForKey:reqid] integerValue];
652+
if (startTime == 0) {
653+
return;
652654
}
653655

654-
NSInteger startTime = [dataaction isEqualToString:@"voice"]? self.startVoiceTime:self.startTime;
655656
NSMutableDictionary *accessParam = [NSMutableDictionary dictionary];
656657
[accessParam setValue:@"P2PReport" forKey:@"Action"];
657658
[accessParam setValue:status forKey:@"Status"];
@@ -680,6 +681,10 @@ - (void)reportUserList:(data_report_t)report {
680681
}
681682
}];
682683
[tasklog resume];
684+
685+
if ([status isEqualToString:@"end"]) {
686+
[self.uniReqStartTime removeObjectForKey:reqid];
687+
}
683688
}
684689

685690
+ (NSString *)getSDKVersion {

TIoTLinkVideo.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
1919
s.source_files = 'Source/SDK/LinkVideo/**/*.{h,m,c,mm}'
2020
s.resource = 'Source/SDK/LinkVideo/FLV/asset/GvoiceSE_v1_239-119-oneref-e.nn'
2121

22-
s.dependency 'TIoTLinkKit_XP2P', '2.4.49-beta.202405221203'
22+
s.dependency 'TIoTLinkKit_XP2P', '2.4.49'
2323
s.dependency 'TIoTLinkKit_FLV', '2.2.3'
2424
s.dependency 'CocoaAsyncSocket', '7.6.5'
2525
s.dependency 'TIoTLinkKit_SoundTouch', '1.0.0'

0 commit comments

Comments
 (0)