initial commit

This commit is contained in:
Caleb
2026-03-01 15:59:27 +08:00
commit a9e97d56cb
1426 changed files with 172367 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
//
// AVLiveStreamModel.m
// AVDemo
//
#import "AVLiveStreamModel.h"
@implementation AVLiveStreamModel
- (NSString *)displayName {
return self.stream.length > 0 ? self.stream : @"未知流";
}
- (NSString *)durationString {
NSInteger totalSeconds = (NSInteger)self.duration;
NSInteger hours = totalSeconds / 3600;
NSInteger minutes = (totalSeconds % 3600) / 60;
NSInteger seconds = totalSeconds % 60;
if (hours > 0) {
// 1 hh:mm:ss
return [NSString stringWithFormat:@"%02ld:%02ld:%02ld", (long)hours, (long)minutes, (long)seconds];
} else {
// 1 mm:ss
return [NSString stringWithFormat:@"%02ld:%02ld", (long)minutes, (long)seconds];
}
}
@end