Changeset 632ef79dbc8feb1e106aaddcab412cea65ddbea1

Show
Ignore:
Timestamp:
02/14/08 02:00:07 (5 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1202950807 +0000
git-parent:

[e651381f1fd0d7d29b31e5e3625af7977886d045]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1202950807 +0000
Message:

frontrow_plugin: Cleanups, and improvement such as audio volume settings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • projects/macosx/frontrow_plugin/VLCAppliance.m

    r0eef312 r632ef79  
    2929{ 
    3030    // Disabled until we properly display a menu for that. You can test it by uncommenting those lines, and comment the following line. 
    31     // VLCMediaListAspect * mediaListAspect = [[[[VLCMediaDiscoverer alloc] initWithName:@"freebox"] discoveredMedia] hierarchicalAspect]; 
     31    // VLCMediaListAspect * mediaListAspect = [[[[[VLCMediaDiscoverer alloc] initWithName:@"freebox"] discoveredMedia] retain] hierarchicalAspect]; 
    3232    // VLCApplianceController * controller = [[VLCMediaListController alloc] initWithMediaListAspect:mediaListAspect]; 
    3333 
  • projects/macosx/frontrow_plugin/VLCMediaLayer.m

    r0eef312 r632ef79  
    4646        _videoLayer.frame = self.bounds; 
    4747        _videoLayer.autoresizingMask = kCALayerWidthSizable|kCALayerHeightSizable; 
     48        _videoLayer.fillScreen = YES; 
    4849        [self addSublayer:_videoLayer]; 
    4950    } 
     
    5152    if(_player == nil) { 
    5253        _player = [[VLCMediaPlayer alloc] initWithVideoLayer:_videoLayer]; 
    53     } 
    54     else { 
    55         [_player pause]; 
    5654    } 
    5755#endif 
  • projects/macosx/frontrow_plugin/VLCMediaListController.h

    r0eef312 r632ef79  
    1818 
    1919- initWithMediaListAspect:(VLCMediaListAspect *)mediaListAspect; 
    20  
     20- initWithMediaListAspect:(VLCMediaListAspect *)aMediaListAspect andTitle:(NSString *)title; 
    2121@end 
  • projects/macosx/frontrow_plugin/VLCMediaListController.m

    r0eef312 r632ef79  
    1313#import <BackRow/BRTextMenuItemLayer.h> 
    1414#import <BackRow/BRControllerStack.h> 
     15#import <BackRow/BRHeaderControl.h> 
    1516 
    1617@interface VLCMediaListController () 
     
    2627- initWithMediaListAspect:(VLCMediaListAspect *)aMediaListAspect 
    2728{ 
    28     self = [super init]; 
    29          
    30     self.mediaListAspect = aMediaListAspect; 
    31     [self.mediaListAspect addObserver:self forKeyPath:@"media" options:NSKeyValueChangeRemoval|NSKeyValueChangeInsertion|NSKeyValueChangeSetting context:nil]; 
    32     [[self list] setDatasource:self]; 
    33     isReloading = NO; 
     29    return [self initWithMediaListAspect:aMediaListAspect andTitle:nil]; 
     30
    3431 
     32- initWithMediaListAspect:(VLCMediaListAspect *)aMediaListAspect andTitle:(NSString *)title 
     33{ 
     34    if( self = [super init] ) 
     35    { 
     36        self.mediaListAspect = aMediaListAspect; 
     37        [self.mediaListAspect addObserver:self forKeyPath:@"media" options:NSKeyValueChangeRemoval|NSKeyValueChangeInsertion|NSKeyValueChangeSetting context:nil]; 
     38        [[self list] setDatasource:self]; 
     39        isReloading = NO; 
     40        if(title) 
     41        { 
     42            [[self header] setTitle: title]; 
     43        } 
     44    } 
    3545    return self; 
    3646} 
     
    4959        { 
    5060            isReloading = YES; 
    51             [self performSelector:@selector(reload) withObject:nil afterDelay:2.]; 
     61            [self performSelector:@selector(reload) withObject:nil afterDelay: [[self list] itemCount] > 10 ? 2. : [[self list] itemCount] ? 0.3 : 0.0]; 
    5262        } 
    5363    } 
     
    104114     
    105115    BRTextMenuItemLayer * item = nil; 
    106      
     116 
    107117    if(isDirectory) { 
    108118        item = [BRTextMenuItemLayer folderMenuItem]; 
     
    119129- (void)itemSelected:(NSInteger)row 
    120130{ 
    121     BOOL isDirectory = ![[mediaListAspect nodeAtIndex:row] isLeaf]; 
     131    VLCMediaListAspectNode * node = [mediaListAspect nodeAtIndex:row]; 
     132    BOOL isDirectory = ![node isLeaf]; 
    122133     
    123134    BRController * controller = nil; 
    124135     
    125136    if(isDirectory) { 
    126         controller = [[[VLCMediaListController alloc] initWithMediaListAspect:[[mediaListAspect nodeAtIndex:row] children]] autorelease]; 
     137        controller = [[[VLCMediaListController alloc] initWithMediaListAspect:[node children] andTitle:[[node media] valueForKeyPath:@"metaDictionary.title"]] autorelease]; 
    127138    } 
    128139    else { 
  • projects/macosx/frontrow_plugin/VLCPlayerController.m

    r0eef312 r632ef79  
    6969            break; 
    7070        } 
     71        case BREventUpUsage: 
     72        { 
     73            NSLog(@"UP"); 
     74            [[[VLCLibrary sharedLibrary] audio] setVolume:[[[VLCLibrary sharedLibrary] audio] volume]+20]; 
     75            break; 
     76        } 
     77        case BREventDownUsage: 
     78        { 
     79            NSLog(@"DOWN"); 
     80            [[[VLCLibrary sharedLibrary] audio] setVolume:[[[VLCLibrary sharedLibrary] audio] volume]-20]; 
     81            break; 
     82        } 
    7183        case BREventMenuUsage: 
    7284            [[self stack] popController];