Changeset 873
- Timestamp:
- 05/04/08 20:08:03 (7 months ago)
- Files:
-
- trunk/Subtitles/SubImport.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Subtitles/SubImport.mm
r872 r873 64 64 } 65 65 66 static bool ShouldEngageFrontRowHack(void) 67 { 68 bool ret; 69 Boolean isSet; 70 71 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 72 NSString *applicationName = [[NSProcessInfo processInfo] processName]; 73 long minorVersion; 74 Gestalt(gestaltSystemVersionMinor, &minorVersion); 75 CFPreferencesGetAppBooleanValue(CFSTR("PerianFrontRowSubtitleHack"),CFSTR("org.perian.Perian"),&isSet); 76 77 ret = (minorVersion == 5) && [applicationName isEqualToString:@"Front Row"] && isSet; 78 [pool release]; 79 80 return ret; 81 } 82 66 83 Track CreatePlaintextSubTrack(Movie theMovie, ImageDescriptionHandle imgDesc, 67 84 TimeScale timescale, Handle dataRef, OSType dataRefType, FourCharCode subType, Handle imageExtension, Rect movieBox) … … 92 109 // finally, say that we're transparent 93 110 MediaHandler mh = GetMediaHandler(theMedia); 94 MediaSetGraphicsMode(mh, graphicsModePreBlackAlpha, NULL); 111 112 if (ShouldEngageFrontRowHack()) { 113 RGBColor blendColor = {0x0000, 0x0000, 0x0000}; 114 MediaSetGraphicsMode(mh, transparent, &blendColor); 115 } 116 else MediaSetGraphicsMode(mh, graphicsModePreBlackAlpha, NULL); 95 117 96 118 // subtitle tracks should be above the video track, which should be layer 0
