You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
711 B
Objective-C
23 lines
711 B
Objective-C
//
|
|
// SPVideoFrameDescription.m
|
|
// SuperPlayer
|
|
//
|
|
// Created by cui on 2019/12/25.
|
|
// Copyright © 2019 annidy. All rights reserved.
|
|
//
|
|
|
|
#import "SPVideoFrameDescription.h"
|
|
#import "J2Obj.h"
|
|
|
|
@implementation SPVideoFrameDescription
|
|
+ (instancetype)instanceFromDictionary:(NSDictionary *)keyFrameDesc {
|
|
if (![keyFrameDesc isKindOfClass:[NSDictionary class]]) {
|
|
return nil;
|
|
}
|
|
SPVideoFrameDescription *ret = [[SPVideoFrameDescription alloc] init];
|
|
ret.time = [J2Num([keyFrameDesc valueForKeyPath:@"timeOffset"]) intValue]/1000.0;
|
|
ret.text = [J2Str([keyFrameDesc valueForKeyPath:@"content"]) stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
|
return ret;
|
|
}
|
|
@end
|