Changeset 1036
- Timestamp:
- 03/29/09 00:40:09 (17 months ago)
- Location:
- trunk
- Files:
-
- 11 modified
-
Codecprintf.c (modified) (1 diff)
-
FFusionCodec.c (modified) (1 diff)
-
Perian.xcodeproj/project.pbxproj (modified) (1 diff)
-
Subtitles/SubATSUIRenderer.m (modified) (13 diffs)
-
Subtitles/SubContext.m (modified) (1 diff)
-
Subtitles/SubImport.h (modified) (3 diffs)
-
Subtitles/SubImport.mm (modified) (5 diffs)
-
Subtitles/SubParsing.h (modified) (1 diff)
-
Subtitles/SubParsing.m.rl (modified) (5 diffs)
-
Subtitles/SubRenderer.h (modified) (3 diffs)
-
createStaticLibs.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Codecprintf.c
r1035 r1036 13 13 #include "log.h" 14 14 15 #define CODEC_HEADER "Perian Codec: "15 #define CODEC_HEADER "Perian: " 16 16 17 17 static int Codecvprintf(FILE *fileLog, const char *format, va_list va, int print_header) -
trunk/FFusionCodec.c
r1031 r1036 1018 1018 1019 1019 if (!glob->avContext) { 1020 fprintf(stderr, "Perian Codec: QT tried to call BeginBand without preflighting!\n");1020 fprintf(stderr, "Perian: QT tried to call BeginBand without preflighting!\n"); 1021 1021 return internalComponentErr; 1022 1022 } -
trunk/Perian.xcodeproj/project.pbxproj
r1031 r1036 275 275 "$(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE).dot", 276 276 ); 277 script = "RAGEL=${PROJECT_DIR}/Subtitles/ragel\nRLCODEGEN=${PROJECT_DIR}/Subtitles/rlgen-cd\n ${RAGEL} ${INPUT_FILE_PATH} | ${RLCODEGEN} -T0 -o ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}\n";277 script = "RAGEL=${PROJECT_DIR}/Subtitles/ragel\nRLCODEGEN=${PROJECT_DIR}/Subtitles/rlgen-cd\n[ ${INPUT_FILE_PATH} -nt ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE} ] || exit 0\n${RAGEL} ${INPUT_FILE_PATH} | ${RLCODEGEN} -T0 -o ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}\n"; 278 278 }; 279 279 /* End PBXBuildRule section */ -
trunk/Subtitles/SubATSUIRenderer.m
r1027 r1036 119 119 ret->fontVertical = fontVertical; 120 120 121 return [ret autorelease]; 121 return ret; 122 } 123 124 -(NSString*)description 125 { 126 return [NSString stringWithFormat:@"SpanEx with alpha %f/%f", primaryAlpha, outlineAlpha]; 122 127 } 123 128 @end … … 416 421 -(void*)spanExtraFromRenderDiv:(SubRenderDiv*)div 417 422 { 418 return [[ [SubATSUISpanEx alloc] initWithStyle:(ATSUStyle)div->styleLine->ex subStyle:div->styleLine colorSpace:srgbCSpace] autorelease];423 return [[SubATSUISpanEx alloc] initWithStyle:(ATSUStyle)div->styleLine->ex subStyle:div->styleLine colorSpace:srgbCSpace]; 419 424 } 420 425 … … 424 429 } 425 430 426 -(void) disposeSpanExtra:(void*)ex431 -(void)releaseSpanExtra:(void*)ex 427 432 { 428 433 SubATSUISpanEx *spanEx = ex; 429 434 [spanEx release]; 435 } 436 437 -(NSString*)describeSpanEx:(void*)ex 438 { 439 SubATSUISpanEx *spanEx = ex; 440 return [spanEx description]; 430 441 } 431 442 … … 840 851 UniCharArrayOffset *breaks; 841 852 ItemCount breakCount; 842 unsignedlStart, lEnd;853 int lStart, lEnd; 843 854 SInt8 direction; 844 855 } BreakContext; … … 870 881 if_different(outlineAlpha) { 871 882 if (endLayer) CGContextEndTransparencyLayer(c); 872 873 883 CGContextSetAlpha(c, spanEx->outlineAlpha); 874 884 if (spanEx->outlineAlpha != 1.) { … … 906 916 if (!lineLen) return; 907 917 } 908 918 909 919 if (textType == kTextLayerOutline && div->styleLine->borderStyle == kSubBorderStyleBox) { 910 920 ATSUTextMeasurement lineWidth, lineHeight, lineX, lineY; … … 944 954 extraHeight = div->styleLine->outlineRadius; 945 955 } else { 946 int j, spans = [div->spans count];956 int j, nspans = [div->spans count]; 947 957 948 958 //linear search for the next span to draw 949 for (j = 0; j < spans; j++) { 959 //XXX not at all sure how this works or if it's correct 960 for (j = 0; j < nspans; j++) { 950 961 SubRenderSpan *span = [div->spans objectAtIndex:j]; 951 962 SubATSUISpanEx *spanEx = span->ex; 952 963 UniCharArrayOffset spanLen, drawStart, drawLen; 953 964 954 if (j < spans-1) {965 if (j < nspans-1) { 955 966 SubRenderSpan *nextSpan = [div->spans objectAtIndex:j+1]; 956 967 spanLen = nextSpan->offset - span->offset; 957 968 } else spanLen = [div->text length] - span->offset; 958 959 if (spanLen == 0) continue;960 if ((span->offset + spanLen) < thisBreak) continue; // too early961 if (span->offset >= nextBreak) break; // too far ahead962 969 963 970 if (span->offset < thisBreak) { // text spans a newline … … 966 973 } else { 967 974 drawStart = span->offset; 968 drawLen = spanLen;975 drawLen = MIN(spanLen, nextBreak - span->offset); 969 976 } 977 978 if (spanLen == 0 || drawLen == 0) continue; 979 if ((span->offset + spanLen) < thisBreak) continue; // too early 980 if (span->offset >= nextBreak) break; // too far ahead 970 981 971 982 endLayer = SetupCGForSpan(c, spanEx, lastSpanEx, div, textType, endLayer); … … 980 991 penY += breakc.direction * (GetLineHeight(layout, thisBreak) + FloatToFixed(extraHeight)); 981 992 } 982 993 983 994 if (endLayer) CGContextEndTransparencyLayer(c); 984 995 … … 1041 1052 lastLayer = div->layer; 1042 1053 } 1043 1054 1044 1055 NSRect marginRect = NSMakeRect(div->marginL, div->marginV, context->resX - div->marginL - div->marginR, context->resY - div->marginV - div->marginV); 1045 1056 … … 1174 1185 SubtitleRendererPtr s = headerLen ? SubInitForSSA(header, headerLen, 640, 480) 1175 1186 : SubInitNonSSA(640, 480); 1176 1177 1187 /* 1178 1188 CGColorSpaceRef csp = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); … … 1181 1191 1182 1192 if (!headerLen) { 1183 SubRenderPacket(s, c, (CFStringRef)@" to Be continued", 640, 480);1193 SubRenderPacket(s, c, (CFStringRef)@"Abcde .", 640, 480); 1184 1194 } else { 1185 1195 NSArray *styles = [s->context->styles allValues]; … … 1188 1198 for (i = 0; i < nstyles; i++) { 1189 1199 SubStyle *sty = [styles objectAtIndex:i]; 1190 NSString *line = [NSString stringWithFormat:@"0,0,%@,,0,0,0,, {\fs1}If you are seeing this message, your player doesn't fully support the formatted subtitle track. It is recommended you switch to the unformatted track.", sty->name];1200 NSString *line = [NSString stringWithFormat:@"0,0,%@,,0,0,0,,Abcde .", sty->name]; 1191 1201 SubRenderPacket(s, c, (CFStringRef)line, 640, 480); 1192 1202 } -
trunk/Subtitles/SubContext.m
r1027 r1036 303 303 -(void)releaseSpanExtra:(void*)ex {} 304 304 -(float)aspectRatio {return 4./3.;} 305 -(NSString*)describeSpanEx:(void*)ex {return @"";} 305 306 @end -
trunk/Subtitles/SubImport.h
r982 r1036 41 41 NSString *line; 42 42 unsigned begin_time, end_time; 43 unsigned no; // line number, used only by SubSerializer 43 44 } 44 45 -(id)initWithLine:(NSString*)l start:(unsigned)s end:(unsigned)e; … … 47 48 @interface SubSerializer : NSObject 48 49 { 49 NSMutableArray *lines, *outpackets; 50 BOOL finished, write_gap; 51 unsigned last_time; 52 SubLine *toReturn; 50 // input lines, sorted by 1. beginning time 2. original insertion order 51 NSMutableArray *lines; 52 BOOL finished; 53 54 unsigned last_begin_time, last_end_time; 55 unsigned linesInput; 53 56 } 54 57 -(void)addLine:(SubLine *)sline; … … 66 69 67 70 - (id)initWithTime:(long)time offset:(long)offset; 68 69 71 @end 70 72 -
trunk/Subtitles/SubImport.mm
r1034 r1036 1188 1188 if (self = [super init]) { 1189 1189 lines = [[NSMutableArray alloc] init]; 1190 outpackets = [[NSMutableArray alloc] init];1191 1190 finished = NO; 1192 write_gap = NO; 1193 toReturn = nil; 1194 last_time = 0; 1191 last_begin_time = last_end_time = 0; 1192 linesInput = 0; 1195 1193 } 1196 1194 … … 1200 1198 -(void)dealloc 1201 1199 { 1202 [outpackets release];1203 1200 [lines release]; 1204 1201 [super dealloc]; 1205 1202 } 1206 1203 1207 -(void)addLine:(SubLine *)sline 1208 { 1209 if (sline->begin_time < sline->end_time) 1210 [lines addObject:sline]; 1211 } 1212 1213 static int cmp_line(id a, id b, void* unused) 1214 { 1215 SubLine *av = (SubLine*)a, *bv = (SubLine*)b; 1216 1217 if (av->begin_time > bv->begin_time) return NSOrderedDescending; 1218 if (av->begin_time < bv->begin_time) return NSOrderedAscending; 1219 return NSOrderedSame; 1204 static CFComparisonResult CompareLinesByBeginTime(const void *a, const void *b, void *unused) 1205 { 1206 SubLine *al = (SubLine*)a, *bl = (SubLine*)b; 1207 1208 if (al->begin_time > bl->begin_time) return kCFCompareGreaterThan; 1209 if (al->begin_time < bl->begin_time) return kCFCompareLessThan; 1210 1211 if (al->no > bl->no) return kCFCompareGreaterThan; 1212 if (al->no < bl->no) return kCFCompareLessThan; 1213 return kCFCompareEqualTo; 1220 1214 } 1221 1215 … … 1229 1223 } 1230 1224 1231 static bool isinrange(unsigned base, unsigned test_s, unsigned test_e) 1232 { 1233 return (base >= test_s) && (base < test_e); 1234 } 1235 1236 -(void)refill 1237 { 1238 unsigned num = [lines count]; 1239 unsigned min_allowed = finished ? 1 : 2; 1240 if (num < min_allowed) return; 1241 unsigned times[num*2], last_last_end = 0; 1242 SubLine *slines[num], *last=nil; 1243 bool last_has_invalid_end = false; 1244 1245 [lines sortUsingFunction:cmp_line context:nil]; 1246 [lines getObjects:slines]; 1247 #ifdef SS_DEBUG 1248 NSLog(@"pre - %@",lines); 1249 #endif 1250 //leave early if all subtitle lines overlap 1225 -(void)addLine:(SubLine *)line 1226 { 1227 if (line->begin_time >= line->end_time) { 1228 if (line->begin_time) 1229 Codecprintf(NULL, "Invalid times (%d and %d) for line \"%s\"", line->begin_time, line->end_time, [line->line UTF8String]); 1230 return; 1231 } 1232 1233 line->no = linesInput++; 1234 1235 int nlines = [lines count]; 1236 1237 if (!nlines || line->begin_time > ((SubLine*)[lines objectAtIndex:nlines-1])->begin_time) { 1238 [lines addObject:line]; 1239 } else { 1240 CFIndex i = CFArrayBSearchValues((CFArrayRef)lines, CFRangeMake(0, nlines), line, CompareLinesByBeginTime, NULL); 1241 1242 if (i >= nlines) 1243 [lines addObject:line]; 1244 else 1245 [lines insertObject:line atIndex:i]; 1246 } 1247 1248 } 1249 1250 -(SubLine*)getNextRealSerializedPacket 1251 { 1252 int nlines = [lines count]; 1253 SubLine *first = [lines objectAtIndex:0]; 1254 int i; 1255 1251 1256 if (!finished) { 1252 bool all_overlap = true; 1253 int i; 1254 1255 for (i=0;i < num-1;i++) { 1256 SubLine *c = slines[i], *n = slines[i+1]; 1257 if (c->end_time <= n->begin_time) {all_overlap = false; break;} 1258 } 1259 1260 if (all_overlap) return; 1261 1262 for (i=0;i < num-1;i++) { 1263 if (isinrange(slines[num-1]->begin_time, slines[i]->begin_time, slines[i]->end_time)) { 1264 num = i + 1; break; 1257 if (nlines > 1) { 1258 unsigned maxEndTime = first->end_time; 1259 1260 for (i = 1; i < nlines; i++) { 1261 SubLine *l = [lines objectAtIndex:i]; 1262 1263 if (l->begin_time >= maxEndTime) { 1264 goto canOutput; 1265 } 1266 1267 maxEndTime = MAX(maxEndTime, l->end_time); 1265 1268 } 1266 1269 } 1267 } 1268 1269 for (int i=0;i < num;i++) { 1270 times[i*2] = slines[i]->begin_time; 1271 times[i*2+1] = slines[i]->end_time; 1272 } 1273 1274 qsort(times, num*2, sizeof(unsigned), cmp_uint); 1275 1276 for (int i=0;i < num*2; i++) { 1277 if (i > 0 && times[i-1] == times[i]) continue; 1278 NSMutableString *accum = nil; 1279 unsigned start = times[i], last_end = start, next_start=times[num*2-1], end = start; 1280 bool finishedOutput = false, is_last_line = false; 1281 1282 // Add on packets until we find one that marks it ending (by starting later) 1283 // ...except if we know this is the last input packet from the stream, then we have to explicitly flush it 1284 if (finished && (times[i] == slines[num-1]->begin_time || times[i] == slines[num-1]->end_time)) finishedOutput = is_last_line = true; 1285 1286 for (int j=0; j < num; j++) { 1287 if (isinrange(times[i], slines[j]->begin_time, slines[j]->end_time)) { 1288 1289 // find the next line that starts after this one 1290 if (j != num-1) { 1291 unsigned ns = slines[j]->end_time; 1292 for (int h = j; h < num; h++) if (slines[h]->begin_time != slines[j]->begin_time) {ns = slines[h]->begin_time; break;} 1293 next_start = MIN(next_start, ns); 1294 } else next_start = slines[j]->end_time; 1295 1296 last_end = MAX(slines[j]->end_time, last_end); 1297 if (accum) [accum appendString:slines[j]->line]; else accum = [[slines[j]->line mutableCopy] autorelease]; 1298 } else if (j == num-1) finishedOutput = true; 1270 1271 return nil; 1272 } 1273 1274 canOutput: 1275 NSMutableString *str = [NSMutableString stringWithString:first->line]; 1276 unsigned begin_time = last_end_time, end_time = first->end_time; 1277 int deleted = 0; 1278 1279 for (i = 1; i < nlines; i++) { 1280 SubLine *l = [lines objectAtIndex:i]; 1281 if (l->begin_time >= end_time) break; 1282 1283 //shorten packet end time if another shorter time (begin or end) is found 1284 //as long as it isn't the begin time 1285 end_time = MIN(end_time, l->end_time); 1286 if (l->begin_time > begin_time) 1287 end_time = MIN(end_time, l->begin_time); 1288 1289 if (l->begin_time <= begin_time) 1290 [str appendString:l->line]; 1291 } 1292 1293 for (i = 0; i < nlines; i++) { 1294 SubLine *l = [lines objectAtIndex:i - deleted]; 1295 1296 if (l->end_time == end_time) { 1297 [lines removeObjectAtIndex:i - deleted]; 1298 deleted++; 1299 1299 } 1300 1301 if (accum && finishedOutput) { 1302 [accum deleteCharactersInRange:NSMakeRange([accum length] - 1, 1)]; // delete last newline 1303 #ifdef SS_DEBUG 1304 NSLog(@"%d - %d %d",start,last_end,next_start); 1305 #endif 1306 if (last_has_invalid_end) { 1307 if (last_end < next_start) { 1308 int j, set; 1309 for (j=i; j >= 0; j--) if (times[j] == last->begin_time) break; 1310 set = times[j+1]; 1311 last->end_time = set; 1312 } else last->end_time = MIN(last_last_end,start); 1313 } 1314 end = last_end; 1315 last_has_invalid_end = false; 1316 if (last_end > next_start && !is_last_line) last_has_invalid_end = true; 1317 SubLine *event = [[SubLine alloc] initWithLine:accum start:start end:end]; 1318 1319 [outpackets addObject:event]; 1320 1321 last_last_end = last_end; 1322 last = event; 1323 } 1324 } 1325 1326 if (last_has_invalid_end) { 1327 last->end_time = times[num*2 - 3]; // end time of line before last 1328 } 1329 #ifdef SS_DEBUG 1330 NSLog(@"out - %@",outpackets); 1331 #endif 1332 1333 if (finished) [lines removeAllObjects]; 1334 else { 1335 num = [lines count]; 1336 for (int i = 0; i < num-1; i++) { 1337 if (isinrange(slines[num-1]->begin_time, slines[i]->begin_time, slines[i]->end_time)) break; 1338 [lines removeObject:slines[i]]; 1339 } 1340 } 1341 #ifdef SS_DEBUG 1342 NSLog(@"post - %@",lines); 1343 #endif 1344 } 1345 1346 -(SubLine*)_getSerializedPacket 1347 { 1348 if ([outpackets count] == 0) { 1349 [self refill]; 1350 if ([outpackets count] == 0) 1351 return nil; 1352 } 1353 1354 SubLine *sl = [outpackets objectAtIndex:0]; 1355 [outpackets removeObjectAtIndex:0]; 1356 1357 [sl autorelease]; 1358 return sl; 1300 } 1301 1302 return [[SubLine alloc] initWithLine:str start:begin_time end:end_time]; 1359 1303 } 1360 1304 1361 1305 -(SubLine*)getSerializedPacket 1362 1306 { 1363 if (!last_time) { 1364 SubLine *ret = [self _getSerializedPacket]; 1365 if (ret) { 1366 last_time = ret->end_time; 1367 write_gap = YES; 1368 } 1369 return ret; 1370 } 1371 1372 restart: 1373 1374 if (write_gap) { 1375 SubLine *next = [self _getSerializedPacket]; 1376 SubLine *sl; 1377 1378 if (!next) return nil; 1379 1380 toReturn = [next retain]; 1381 1382 write_gap = NO; 1383 1384 if (toReturn->begin_time > last_time) sl = [[SubLine alloc] initWithLine:@"\n" start:last_time end:toReturn->begin_time]; 1385 else goto restart; 1386 1387 return [sl autorelease]; 1307 int nlines = [lines count]; 1308 1309 if (!nlines) return nil; 1310 1311 SubLine *nextline = [lines objectAtIndex:0], *ret; 1312 1313 if (nextline->begin_time > last_end_time) { 1314 ret = [[SubLine alloc] initWithLine:@"\n" start:last_end_time end:nextline->begin_time]; 1388 1315 } else { 1389 SubLine *ret = toReturn; 1390 last_time = ret->end_time; 1391 write_gap = YES; 1392 1393 toReturn = nil; 1394 return [ret autorelease]; 1395 } 1396 } 1397 1398 -(void)setFinished:(BOOL)f 1399 { 1400 finished = f; 1316 ret = [self getNextRealSerializedPacket]; 1317 } 1318 1319 if (!ret) return nil; 1320 1321 last_begin_time = ret->begin_time; 1322 last_end_time = ret->end_time; 1323 1324 return [ret autorelease]; 1325 } 1326 1327 -(void)setFinished:(BOOL)_finished 1328 { 1329 finished = _finished; 1401 1330 } 1402 1331 1403 1332 -(BOOL)isEmpty 1404 1333 { 1405 return [lines count] == 0 && [outpackets count] == 0 && !toReturn;1334 return [lines count] == 0; 1406 1335 } 1407 1336 1408 1337 -(NSString*)description 1409 1338 { 1410 return [NSString stringWithFormat:@" i: %d o: %d finished inputting: %d",[lines count],[outpackets count],finished];1339 return [NSString stringWithFormat:@"lines left: %d finished inputting: %d",[lines count],finished]; 1411 1340 } 1412 1341 @end … … 1420 1349 begin_time = s; 1421 1350 end_time = e; 1351 no = 0; 1422 1352 } 1423 1353 … … 1433 1363 -(NSString*)description 1434 1364 { 1435 return [NSString stringWithFormat:@"\"%@\", from %d s to %d s", line,begin_time,end_time];1365 return [NSString stringWithFormat:@"\"%@\", from %d s to %d s",[line substringToIndex:[line length]-1],begin_time,end_time]; 1436 1366 } 1437 1367 @end -
trunk/Subtitles/SubParsing.h
r1027 r1036 37 37 @public; 38 38 UniCharArrayOffset offset; 39 __strong void *ex;39 id ex; 40 40 SubRenderer *delegate; 41 41 } -
trunk/Subtitles/SubParsing.m.rl
r1031 r1036 41 41 } 42 42 43 -(void)finalize {[delegate releaseSpanExtra:ex]; [super finalize];} 43 -(void)finalize 44 { 45 [delegate releaseSpanExtra:ex]; 46 [super finalize]; 47 } 48 49 -(NSString*)description 50 { 51 return [NSString stringWithFormat:@"Span at %d: %@", offset, [delegate describeSpanEx:ex]]; 52 } 44 53 @end 45 54 … … 191 200 %%machine SSAtag; 192 201 %%write data; 193 194 static NSMutableString *FilterSlashEscapes(NSMutableString *s)195 {196 [s replaceOccurrencesOfString:@"\\n" withString:@"\n" options:NSCaseInsensitiveSearch range:NSMakeRange(0, [s length])];197 unichar nbsp = 0xA0;198 199 [s replaceOccurrencesOfString:@"\\h" withString:[NSString stringWithCharacters:  length:1] options:0 range: NSMakeRange(0,[s length])];200 return s;201 }202 202 203 203 static int compare_layer(const void *a, const void *b) … … 306 306 action setfloatnum {floatnum = [psend() floatValue];} 307 307 action setstringval {strval = psend();} 308 action nullstring {strval = @"";} 308 309 action setxypos {curX=curY=-1; sscanf([psend() UTF8String], "(%d,%d)", &curX, &curY);} 309 310 … … 346 347 flag = [01] >paramset %setintnum; 347 348 floatnum = ("-"? [0-9]+ ("." [0-9]*)?) >paramset %setfloatnum; 348 string = ( [^\\}]*) >paramset %setstringval;349 string = (([^\\}]+) >paramset %setstringval | "" %nullstring ); 349 350 color = ("H"|"&"){,2} (xdigit+) >paramset %sethexnum "&"?; 350 351 parens = "(" [^)]* ")"; … … 359 360 |"shad" floatnum %shadowdist 360 361 |"be" flag %bluredge 362 |"blur" floatnum 361 363 |"fn" string %fontname 362 364 |"fs" floatnum %fontsize -
trunk/Subtitles/SubRenderer.h
r1027 r1036 12 12 @class SubStyle, SubContext, SubRenderDiv, SubRenderSpan; 13 13 14 typedef enum {tag_b=0, tag_i, tag_u, tag_s, tag_bord, tag_shad, tag_be, tag_fn, tag_fs, tag_fscx, tag_fscy, tag_fsp, tag_frx, tag_fry, tag_frz, tag_1c, tag_2c, tag_3c, tag_4c, 15 tag_alpha, tag_1a, tag_2a, tag_3a, tag_4a, tag_r, tag_p} SSATagType; 14 typedef enum { 15 tag_b=0, tag_i, tag_u, tag_s, tag_bord, tag_shad, tag_be, 16 tag_fn, tag_fs, tag_fscx, tag_fscy, tag_fsp, tag_frx, 17 tag_fry, tag_frz, tag_1c, tag_2c, tag_3c, tag_4c, tag_alpha, 18 tag_1a, tag_2a, tag_3a, tag_4a, tag_r, tag_p 19 } SSATagType; 16 20 17 21 #ifndef __OBJC_GC__ … … 21 25 #endif 22 26 27 // XXX these should be 'id' instead of 'void*' but it makes it easier to use ATSUStyle 23 28 @interface SubRenderer : NSObject 24 29 -(void)completedHeaderParsing:(SubContext*)sc; … … 30 35 -(void)spanChangedTag:(SSATagType)tag span:(SubRenderSpan*)span div:(SubRenderDiv*)div param:(void*)p; 31 36 -(float)aspectRatio; 37 -(NSString*)describeSpanEx:(void*)ex; 32 38 @end -
trunk/createStaticLibs.sh
r1035 r1036 155 155 make -j3 156 156 fi 157 158 ####################### 159 # lipo/copy shlibs 160 ####################### 161 BUILDDIR="$BUILT_PRODUCTS_DIR/Universal" 162 INTEL="$BUILT_PRODUCTS_DIR/intel" 163 PPC="$BUILT_PRODUCTS_DIR/ppc" 164 165 rm -rf "$BUILDDIR" 166 mkdir "$BUILDDIR" 167 echo $buildi386 $buildppc 168 if [ $buildi386 -eq $buildppc ] ; then 169 # lipo them 170 for aa in "$INTEL"/*/*.a ; do 171 echo lipo -create $aa `echo -n $aa | sed 's/intel/ppc/'` -output `echo -n $aa | sed 's/intel\/.*\//Universal\//'` 172 lipo -create $aa `echo -n $aa | sed 's/intel/ppc/'` -output `echo -n $aa | sed 's/intel\/.*\//Universal\//'` 173 done 174 else 175 if [ $buildppc -gt 0 ] ; then 176 archDir="ppc" 177 BUILDARCHDIR=$PPC 178 else 179 archDir="intel" 180 BUILDARCHDIR=$INTEL 181 fi 182 # just copy them 183 for aa in "$BUILDARCHDIR"/*/*.a ; do 184 echo cp "$aa" `echo -n $aa | sed 's/'$archDir'\/.*\//Universal\//'` 185 cp "$aa" `echo -n $aa | sed 's/'$archDir'\/.*\//Universal\//'` 186 done 187 fi 188 echo -n "$buildid_ffmpeg" > $OUTPUT_FILE 189 190 mkdir "$SYMROOT/Universal" || true 191 cp "$BUILT_PRODUCTS_DIR/Universal"/* "$SYMROOT/Universal" 192 ranlib "$SYMROOT/Universal"/*.a 193 157 194 fi 158 159 #######################160 # lipo/copy shlibs161 #######################162 BUILDDIR="$BUILT_PRODUCTS_DIR/Universal"163 INTEL="$BUILT_PRODUCTS_DIR/intel"164 PPC="$BUILT_PRODUCTS_DIR/ppc"165 166 rm -rf "$BUILDDIR"167 mkdir "$BUILDDIR"168 echo $buildi386 $buildppc169 if [ $buildi386 -eq $buildppc ] ; then170 # lipo them171 for aa in "$INTEL"/*/*.a ; do172 echo lipo -create $aa `echo -n $aa | sed 's/intel/ppc/'` -output `echo -n $aa | sed 's/intel\/.*\//Universal\//'`173 lipo -create $aa `echo -n $aa | sed 's/intel/ppc/'` -output `echo -n $aa | sed 's/intel\/.*\//Universal\//'`174 done175 else176 if [ $buildppc -gt 0 ] ; then177 archDir="ppc"178 BUILDARCHDIR=$PPC179 else180 archDir="intel"181 BUILDARCHDIR=$INTEL182 fi183 # just copy them184 for aa in "$BUILDARCHDIR"/*/*.a ; do185 echo cp "$aa" `echo -n $aa | sed 's/'$archDir'\/.*\//Universal\//'`186 cp "$aa" `echo -n $aa | sed 's/'$archDir'\/.*\//Universal\//'`187 done188 fi189 echo -n "$buildid_ffmpeg" > $OUTPUT_FILE190 191 mkdir "$SYMROOT/Universal" || true192 cp "$BUILT_PRODUCTS_DIR/Universal"/* "$SYMROOT/Universal"193 ranlib "$SYMROOT/Universal"/*.a
