Changeset 310
- Timestamp:
- 01/27/07 04:06:54 (2 years ago)
- Files:
-
- trunk/MatroskaImportPrivate.cpp (modified) (1 diff)
- trunk/Perian.xcodeproj/project.pbxproj (modified) (10 diffs)
- trunk/SSADocument.h (added)
- trunk/SSADocument.m (added)
- trunk/SSATagParsing.h (added)
- trunk/SSATagParsing.m.rl (added)
- trunk/SubImport.c (modified) (5 diffs)
- trunk/SubImport.h (modified) (1 diff)
- trunk/ragel (added)
- trunk/rlcodegen (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/MatroskaImportPrivate.cpp
r306 r310 456 456 457 457 } else if ((*imgDesc)->cType == kSubFormatUTF8) { 458 mkvTrack.theTrack = CreatePlaintextSubTrack(theMovie, imgDesc, GetMovieTimeScale(theMovie), dataRef, dataRefType );458 mkvTrack.theTrack = CreatePlaintextSubTrack(theMovie, imgDesc, GetMovieTimeScale(theMovie), dataRef, dataRefType, kSubFormatUTF8); 459 459 if (mkvTrack.theTrack == NULL) 460 460 return GetMoviesError(); trunk/Perian.xcodeproj/project.pbxproj
r300 r310 102 102 11C85FE70A64315500DF3D73 /* Perian-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 11A709DA0A3CFCB6002058D4 /* Perian-Info.plist */; }; 103 103 11F28DAD0B52EB75000AF78C /* SUUpdateAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = 11F28DAC0B52EB75000AF78C /* SUUpdateAlert.m */; }; 104 3D211A1D0B6B18880051299D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F539CD110B62BC82005A72C9 /* Foundation.framework */; }; 105 3D211A200B6B1A540051299D /* SSADocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D211A1F0B6B1A540051299D /* SSADocument.m */; }; 106 3D211A230B6B1A660051299D /* Categories.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D211A220B6B1A660051299D /* Categories.m */; }; 107 3D211A300B6B1AD80051299D /* SSATagParsing.m.rl in Resources */ = {isa = PBXBuildFile; fileRef = 3D211A2F0B6B1AD80051299D /* SSATagParsing.m.rl */; }; 104 108 3D4A7A990B5533BC004C5D6A /* ColorConversions.c in Sources */ = {isa = PBXBuildFile; fileRef = 3D4A7A980B5533BC004C5D6A /* ColorConversions.c */; }; 105 109 6116E5510B43C27B0020F1CE /* ACBaseCodec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6116E5370B43C27B0020F1CE /* ACBaseCodec.cpp */; }; … … 240 244 /* End PBXBuildFile section */ 241 245 246 /* Begin PBXBuildRule section */ 247 3D211A2D0B6B1A880051299D /* PBXBuildRule */ = { 248 isa = PBXBuildRule; 249 compilerSpec = com.apple.compilers.proxy.script; 250 filePatterns = "*.c.rl *.cpp.rl *.cp.rl *.cxx.rl *.m.rl *.mm.rl"; 251 fileType = pattern.proxy; 252 isEditable = 1; 253 outputFiles = ( 254 "$(DERIVED_FILES_DIR)/$(INPUT_FILE_BASE)", 255 ); 256 script = "RAGEL=${PROJECT_DIR}/ragel\nRLCODEGEN=${PROJECT_DIR}/rlcodegen\n\n${RAGEL} -o ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.ragel ${INPUT_FILE_PATH} || exit\n${RLCODEGEN} -T1 -o ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE} ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.ragel || exit"; 257 }; 258 /* End PBXBuildRule section */ 259 242 260 /* Begin PBXContainerItemProxy section */ 243 261 11BA3DAF0A61EE90008AF206 /* PBXContainerItemProxy */ = { … … 417 435 11F28DAB0B52EB75000AF78C /* SUUpdateAlert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdateAlert.h; sourceTree = "<group>"; }; 418 436 11F28DAC0B52EB75000AF78C /* SUUpdateAlert.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUUpdateAlert.m; sourceTree = "<group>"; }; 437 3D211A1E0B6B1A540051299D /* SSADocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSADocument.h; sourceTree = "<group>"; }; 438 3D211A1F0B6B1A540051299D /* SSADocument.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = SSADocument.m; sourceTree = "<group>"; }; 439 3D211A210B6B1A660051299D /* Categories.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Categories.h; path = ../../SSAView/Categories.h; sourceTree = SOURCE_ROOT; }; 440 3D211A220B6B1A660051299D /* Categories.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = Categories.m; path = ../../SSAView/Categories.m; sourceTree = SOURCE_ROOT; }; 441 3D211A2E0B6B1AD80051299D /* SSATagParsing.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SSATagParsing.h; sourceTree = "<group>"; }; 442 3D211A2F0B6B1AD80051299D /* SSATagParsing.m.rl */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 30; path = SSATagParsing.m.rl; sourceTree = "<group>"; }; 419 443 3D4A7A970B5533BC004C5D6A /* ColorConversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorConversions.h; sourceTree = "<group>"; }; 420 444 3D4A7A980B5533BC004C5D6A /* ColorConversions.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ColorConversions.c; sourceTree = "<group>"; }; … … 595 619 F560DF0203D622D001ABA332 /* FFusionCodec.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; path = FFusionCodec.r; sourceTree = "<group>"; }; 596 620 F57755F40B51EB1800C7D833 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; }; 597 F5CFD1B40B50009000616865 /* PerianPanePListGenerator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PerianPanePListGenerator; sourceTree = BUILT_PRODUCTS_DIR; };621 F5CFD1B40B50009000616865 /* PerianPanePListGenerator */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = PerianPanePListGenerator; sourceTree = BUILT_PRODUCTS_DIR; }; 598 622 F5CFD1BC0B5000CE00616865 /* GBPerianPanePListGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GBPerianPanePListGenerator.h; sourceTree = "<group>"; }; 599 623 F5CFD1BD0B5000CE00616865 /* GBPerianPanePListGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GBPerianPanePListGenerator.m; sourceTree = "<group>"; }; … … 625 649 8F483B550A642644002CCA73 /* libavformat.a in Frameworks */, 626 650 8F483B5E0A6426C1002CCA73 /* AudioToolbox.framework in Frameworks */, 651 3D211A1D0B6B18880051299D /* Foundation.framework in Frameworks */, 627 652 ); 628 653 runOnlyForDeploymentPostprocessing = 0; … … 738 763 61D517720AE0402E00A671E1 /* CommonUtils.c */, 739 764 6116E74E0B4738CE0020F1CE /* CodecIDs.h */, 765 3D211A210B6B1A660051299D /* Categories.h */, 766 3D211A220B6B1A660051299D /* Categories.m */, 740 767 ); 741 768 name = Source; … … 837 864 isa = PBXGroup; 838 865 children = ( 866 3D211A2E0B6B1AD80051299D /* SSATagParsing.h */, 867 3D211A2F0B6B1AD80051299D /* SSATagParsing.m.rl */, 868 3D211A1E0B6B1A540051299D /* SSADocument.h */, 869 3D211A1F0B6B1A540051299D /* SSADocument.m */, 839 870 613CD51A0AD1FB650098A825 /* TextSubCodec.c */, 840 871 613CD51B0AD1FB650098A825 /* TextSubCodec.h */, … … 1172 1203 ); 1173 1204 buildRules = ( 1205 3D211A2D0B6B1A880051299D /* PBXBuildRule */, 1174 1206 ); 1175 1207 dependencies = ( … … 1334 1366 11A70AD90A3D0149002058D4 /* FFusion.icns in Resources */, 1335 1367 11C85FE70A64315500DF3D73 /* Perian-Info.plist in Resources */, 1368 3D211A300B6B1AD80051299D /* SSATagParsing.m.rl in Resources */, 1336 1369 ); 1337 1370 runOnlyForDeploymentPostprocessing = 0; … … 1477 1510 F52286260B50625E00F8CF7D /* bitstream_info.c in Sources */, 1478 1511 3D4A7A990B5533BC004C5D6A /* ColorConversions.c in Sources */, 1512 3D211A200B6B1A540051299D /* SSADocument.m in Sources */, 1513 3D211A230B6B1A660051299D /* Categories.m in Sources */, 1479 1514 ); 1480 1515 runOnlyForDeploymentPostprocessing = 0; trunk/SubImport.c
r298 r310 58 58 59 59 Track CreatePlaintextSubTrack(Movie theMovie, ImageDescriptionHandle imgDesc, 60 TimeScale timescale, Handle dataRef, OSType dataRefType )60 TimeScale timescale, Handle dataRef, OSType dataRefType, FourCharCode subType) 61 61 { 62 62 Rect movieBox; … … 71 71 72 72 (*imgDesc)->idSize = sizeof(ImageDescription); 73 (*imgDesc)->cType = kSubFormatUTF8;73 (*imgDesc)->cType = subType; 74 74 (*imgDesc)->width = FixedToInt(trackWidth); 75 75 (*imgDesc)->height = FixedToInt(trackHeight); … … 91 91 return theTrack; 92 92 } 93 94 extern ComponentResult LoadSubStationAlphaSubtitles(const FSRef *theDirectory, CFStringRef filename, Movie theMovie, Track *firstSubTrack); 93 95 94 96 ComponentResult LoadSubRipSubtitles(const FSRef *theDirectory, CFStringRef filename, Movie theMovie, Track *firstSubTrack) … … 138 140 139 141 // millisecond accuracy 140 theTrack = CreatePlaintextSubTrack(theMovie, textDesc, 1000, dataRef, dataRefType );142 theTrack = CreatePlaintextSubTrack(theMovie, textDesc, 1000, dataRef, dataRefType, kSubFormatUTF8); 141 143 if (theTrack == NULL) { 142 144 err = GetMoviesError(); … … 294 296 if (actRange.location == extRange.location) 295 297 LoadSubRipSubtitles(&parentDir, cfFoundFilename, theMovie, &firstSubTrack); 298 299 actRange = CFStringFind(cfFoundFilename, CFSTR(".ass"), kCFCompareCaseInsensitive | kCFCompareBackwards); 300 if (actRange.location == extRange.location) 301 LoadSubStationAlphaSubtitles(&parentDir, cfFoundFilename, theMovie, &firstSubTrack); 296 302 297 303 // VobSub trunk/SubImport.h
r218 r310 22 22 23 23 Track CreatePlaintextSubTrack(Movie theMovie, ImageDescriptionHandle imgDesc, 24 TimeScale timescale, Handle dataRef, OSType dataRefType );24 TimeScale timescale, Handle dataRef, OSType dataRefType, FourCharCode subType); 25 25 26 26 #ifdef __cplusplus
