Switch to FourCC instead of NSStrings for media type and formats.
This commit is contained in:
1 parent
71ea7afd67
commit
1c562a65ea
32 files changed
+374
-409
No files matched your search
+6
-11
@@ -11,7 +11,8 @@
|
||||
#import "MP42HtmlParser.h"
|
||||
|
||||
@implementation SBSubSerializer
|
||||
-(id)init
|
||||
|
||||
-(instancetype)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
lines = [[NSMutableArray alloc] init];
|
||||
@@ -41,15 +42,6 @@ static CFComparisonResult CompareLinesByBeginTime(const void *a, const void *b,
|
||||
return kCFCompareEqualTo;
|
||||
}
|
||||
|
||||
/*static int cmp_uint(const void *a, const void *b)
|
||||
{
|
||||
unsigned av = *(unsigned*)a, bv = *(unsigned*)b;
|
||||
|
||||
if (av > bv) return 1;
|
||||
if (av < bv) return -1;
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
-(void)addLine:(SBSubLine *)line
|
||||
{
|
||||
if (line->begin_time >= line->end_time) {
|
||||
@@ -198,10 +190,12 @@ canOutput:
|
||||
{
|
||||
return [NSString stringWithFormat:@"lines left: %lu finished inputting: %d",(unsigned long)[lines count],finished];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation SBSubLine
|
||||
-(id)initWithLine:(NSString*)l start:(unsigned)s end:(unsigned)e
|
||||
|
||||
-(instancetype)initWithLine:(NSString*)l start:(unsigned)s end:(unsigned)e
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
if ([l characterAtIndex:[l length]-1] != '\n') l = [l stringByAppendingString:@"\n"];
|
||||
@@ -234,6 +228,7 @@ canOutput:
|
||||
{
|
||||
return [NSString stringWithFormat:@"\"%@\", from %d s to %d s",[line substringToIndex:[line length]-1],begin_time,end_time];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
unsigned ParseSubTime(const char *time, unsigned secondScale, BOOL hasSign)
|
||||
|
||||
Reference in new issue
Block a user