Changeset 5458

Show
Ignore:
Timestamp:
04/17/08 21:14:57 (1 month ago)
Author:
morris
Message:

Add -orderFrontFullscreenHUDWindow, expose -flashCurrentTime, add -stepForward and -stepBackward

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Spiral/trunk/SPMovieController.h

    r5130 r5458  
    150150- (void)playWhenTracksAreLoaded; 
    151151- (BOOL)isPlaying; 
     152- (void)stepForward; 
     153- (void)stepBackward; 
    152154- (void)stop; 
    153155- (void)invalidate; 
     
    155157- (void)stopFullscreen; 
    156158- (BOOL)isInFullscreen; 
     159- (void)orderFrontFullscreenHUDWindow; 
    157160- (void)resumePlaying; 
    158161- (float)rate; 
     
    160163- (void)cycleSubtitleTracksForwards:(BOOL)forwards; 
    161164- (void)cycleAspectRatiosForwards:(BOOL)forwards; 
     165- (void)flashCurrentTime; 
    162166- (BOOL)openNext; 
    163167- (BOOL)openNextAndStartPlaying:(BOOL)startPlaying; 
  • Spiral/trunk/SPMovieController.m

    r5250 r5458  
    3737@interface SPMovieController(Private) 
    3838 
    39 - (void)_flashCurrentTime; 
    4039- (void)_flashOverlayString:(NSString *)string; 
    4140- (void)_flashOverlayString:(NSString *)string hold:(BOOL)hold; 
     
    5756 
    5857@implementation SPMovieController(Private) 
    59  
    60 - (void)_flashCurrentTime { 
    61         [self _flashOverlayString:[NSSWF:NSLS(@"%@/%@", @"Current time overlay"), 
    62                 [[self class] shortStringForTimeInterval:[self currentTime]], 
    63                 [[self class] shortStringForTimeInterval:[self duration]]]]; 
    64 } 
    65  
    66  
    6758 
    6859- (void)_flashOverlayString:(NSString *)string { 
     
    631622                                [self setCurrentTime:[self currentTime] + [[self class] skipTimeIntervalForKey:key]]; 
    632623                                 
    633                                 [self _flashCurrentTime]; 
     624                                [self flashCurrentTime]; 
    634625                                break; 
    635626                                 
     
    637628                                [self setCurrentTime:0.0]; 
    638629                                 
    639                                 [self _flashCurrentTime]; 
     630                                [self flashCurrentTime]; 
    640631                                break; 
    641632                                 
     
    643634                                [self setCurrentTime:[self duration]]; 
    644635                                 
    645                                 [self _flashCurrentTime]; 
     636                                [self flashCurrentTime]; 
    646637                                break; 
    647638                                 
     
    671662                                 
    672663                        case 't': 
    673                                 [self _flashCurrentTime]; 
     664                                [self flashCurrentTime]; 
    674665                                break; 
    675666                } 
     
    11341125 
    11351126 
     1127- (void)stepForward { 
     1128        [_movie stepForward]; 
     1129} 
     1130 
     1131 
     1132 
     1133- (void)stepBackward { 
     1134        [_movie stepBackward]; 
     1135         
     1136} 
     1137 
     1138 
     1139 
    11361140- (void)stop { 
    11371141        [_movie stop]; 
     
    11681172- (BOOL)isInFullscreen { 
    11691173        return (_fullscreenWindow != NULL); 
     1174} 
     1175 
     1176 
     1177 
     1178- (void)orderFrontFullscreenHUDWindow { 
     1179        [_fullscreenWindow orderFrontHUDWindow]; 
    11701180} 
    11711181 
     
    12411251        count = [[self audioTracks] count]; 
    12421252         
    1243         if([[self audioTracks] count] > 1) { 
     1253        if(count > 0) { 
    12441254                audioTrack = [self audioTrack]; 
    12451255                 
     
    12751285                if(forwards) { 
    12761286                        if(subtitleTrack == count) 
    1277                                 subtitleTrack = 1
     1287                                subtitleTrack = 0
    12781288                        else 
    12791289                                subtitleTrack++; 
    12801290                } else { 
    1281                         if(subtitleTrack <= 1
     1291                        if(subtitleTrack <= 0
    12821292                                subtitleTrack = count; 
    12831293                        else 
     
    13191329 
    13201330 
     1331- (void)flashCurrentTime { 
     1332        [self _flashOverlayString:[NSSWF:NSLS(@"%@/%@", @"Current time overlay"), 
     1333                [[self class] shortStringForTimeInterval:[self currentTime]], 
     1334                [[self class] shortStringForTimeInterval:[self duration]]]]; 
     1335} 
     1336 
     1337 
     1338 
    13211339- (BOOL)openPrevious { 
    13221340        SPPlaylistFile                  *file, *previousFile;