Changeset 647
- Timestamp:
- 07/30/08 13:45:46 (4 months ago)
- Files:
-
- trunk/SapphireFrappliance/SapphireVideoTSParser.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/SapphireFrappliance/SapphireVideoTSParser.m
r535 r647 94 94 /*! 95 95 * @brief Given the two encoding characters of a language, get the display friendly version 96 * 97 * @return NSString translation of the two character ISO code, or nil if the character 98 * code results in an unspecified language 96 99 */ 97 100 static const NSString *languageFromEncodedChars( const char firstChar, const char secondChar ) … … 292 295 continue; 293 296 294 const NSMutableString * const audioText = [NSMutableString stringWithString:(NSString *)languageFromEncodedChars(vts_CommonFirstLanguageCode ( audioAttrs[idx] ), 295 vts_CommonSecondLanguageCode( audioAttrs[idx] ) )]; 296 if( vts_AudioIsDTS( audioAttrs[idx] ) ) 297 [audioText appendString:@" - DTS"]; 298 299 if( vts_AudioIsSurround( audioAttrs[idx] ) ) 297 const NSString * const lang = languageFromEncodedChars( vts_CommonFirstLanguageCode ( audioAttrs[idx] ), 298 vts_CommonSecondLanguageCode( audioAttrs[idx] ) ); 299 300 /* Check for unspecified audio */ 301 if( lang != nil ) 300 302 { 301 if ( vts_AudioSupportsDolbyDecoding( audioAttrs[idx] ) ) 302 [audioText appendString:@" Dolby Surround"]; 303 else 304 [audioText appendString:@" Surround"]; 303 const NSMutableString * const audioText = [NSMutableString stringWithString:(NSString *)lang]; 304 if( vts_AudioIsDTS( audioAttrs[idx] ) ) 305 [audioText appendString:@" - DTS"]; 306 307 if( vts_AudioIsSurround( audioAttrs[idx] ) ) 308 { 309 if ( vts_AudioSupportsDolbyDecoding( audioAttrs[idx] ) ) 310 [audioText appendString:@" Dolby Surround"]; 311 else 312 [audioText appendString:@" Surround"]; 313 } 314 315 [audioList addObject:audioText]; 305 316 } 306 307 [audioList addObject:audioText];308 317 } 309 318 … … 336 345 { 337 346 if( vts_SubpictureIsSubtitle( subpictureAttrs[idx] ) ) 338 [subtitleList addObject:languageFromEncodedChars(vts_CommonFirstLanguageCode ( subpictureAttrs[idx] ), 339 vts_CommonSecondLanguageCode( subpictureAttrs[idx] ) )]; 347 { 348 const NSString * const lang = languageFromEncodedChars( vts_CommonFirstLanguageCode ( subpictureAttrs[idx] ), 349 vts_CommonSecondLanguageCode( subpictureAttrs[idx] ) ); 350 if( lang != nil ) 351 [subtitleList addObject:lang]; 352 } 340 353 } 341 354
