Changeset 3a361d2f7684140a9adfc005185840bafb192f7c

Show
Ignore:
Timestamp:
07/05/02 00:59:46 (7 years ago)
Author:
Christophe Massiot <massiot@videolan.org>
git-committer:
Christophe Massiot <massiot@videolan.org> 1020725986 +0000
git-parent:

[a4fcb5e2e8d543bdb6b50bc339d00324ae99b2f6]

git-author:
Christophe Massiot <massiot@videolan.org> 1020725986 +0000
Message:

Improvements of the OS X GUI.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib

    r30a5f36 r3a361d2  
    44        { 
    55            ACTIONS = { 
     6                eject = id;  
    67                faster = id;  
     8                fullscreen = id;  
     9                mute = id;  
    710                next = id;  
    811                pause = id;  
  • extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib

    r30a5f36 r3a361d2  
    44<dict> 
    55    <key>IBDocumentLocation</key> 
    6     <string>729 10 500 426 0 0 1600 1178 </string> 
     6    <string>13 255 500 426 0 0 1152 746 </string> 
    77    <key>IBEditorPositions</key> 
    88    <dict> 
     9        <key>235</key> 
     10        <string>401 417 350 182 0 0 1152 746 </string> 
    911        <key>29</key> 
    10         <string>108 456 205 44 0 0 1600 1178 </string> 
     12        <string>804 409 205 44 0 0 1152 746 </string> 
     13        <key>445</key> 
     14        <string>347 561 370 117 0 0 1152 746 </string> 
    1115        <key>460</key> 
    12         <string>120 456 104 66 0 0 1600 1178 </string> 
     16        <string>84 279 104 66 0 0 1152 746 </string> 
    1317    </dict> 
    1418    <key>IBFramework Version</key> 
    1519    <string>248.0</string> 
     20    <key>IBOpenObjects</key> 
     21    <array> 
     22        <integer>29</integer> 
     23        <integer>21</integer> 
     24    </array> 
    1625    <key>IBSystem Version</key> 
    1726    <string>5Q125</string> 
  • include/config.h

    r1538dd9 r3a361d2  
    106106/* Duration between the time we receive the data packet, and the time we will 
    107107 * mark it to be presented */ 
    108 #define DEFAULT_PTS_DELAY               (mtime_t)(.2*CLOCK_FREQ) 
     108#define DEFAULT_PTS_DELAY               (mtime_t)(.35*CLOCK_FREQ) 
    109109 
    110110/***************************************************************************** 
     
    135135 *   song from the interface) 
    136136 * - long, in order to perform the buffer calculations as few as possible */ 
    137 #define AOUT_BUFFER_DURATION            100000 
     137#define AOUT_BUFFER_DURATION            90000 
    138138 
    139139/***************************************************************************** 
  • plugins/macosx/intf_controller.c

    r30a5f36 r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_controller.c,v 1.6 2002/04/23 03:21:21 jlj Exp $ 
     5 * $Id: intf_controller.c,v 1.7 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
     
    156156} 
    157157 
     158- (IBAction)mute:(id)sender 
     159{ 
     160    NSMenuItem * item = (NSMenuItem *)sender; 
     161 
     162    [o_intf mute]; 
     163 
     164    if( p_main->p_intf->p_sys->b_mute ) 
     165    { 
     166        [item setState:NSOnState]; 
     167    } 
     168    else 
     169    { 
     170        [item setState:NSOffState]; 
     171    } 
     172} 
     173 
     174- (IBAction)fullscreen:(id)sender 
     175{ 
     176    [o_intf fullscreen]; 
     177} 
     178 
     179- (IBAction)eject:(id)sender 
     180{ 
     181    [o_intf eject]; 
     182} 
     183 
    158184- (IBAction)timesliderUpdate:(id)slider 
    159185{ 
  • plugins/macosx/intf_controller.h

    r30a5f36 r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_controller.h,v 1.5 2002/04/23 03:21:21 jlj Exp $ 
     5 * $Id: intf_controller.h,v 1.6 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
     
    7474- (IBAction)prev:(id)sender; 
    7575- (IBAction)next:(id)sender; 
     76- (IBAction)mute:(id)sender; 
     77- (IBAction)fullscreen:(id)fullscreen; 
     78- (IBAction)eject:(id)sender; 
    7679- (IBAction)timesliderUpdate:(id)slider; 
    7780- (IBAction)quit:(id)sender; 
  • plugins/macosx/intf_macosx.c

    rb4bea3c r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_macosx.c,v 1.12 2002/04/16 23:00:54 massiot Exp $ 
     5 * $Id: intf_macosx.c,v 1.13 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Authors: Colin Delacroix <colin@zoy.org> 
     
    6868    p_intf->p_sys->o_pool = [[NSAutoreleasePool alloc] init]; 
    6969    p_intf->p_sys->o_port = [[NSPort port] retain]; 
     70    p_intf->p_sys->b_mute = 0; 
    7071 
    7172    [[NSApplication sharedApplication] autorelease]; 
  • plugins/macosx/intf_open.h

    r30a5f36 r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_open.h,v 1.1 2002/04/23 03:21:21 jlj Exp $ 
     5 * $Id: intf_open.h,v 1.2 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>  
     
    2626 *****************************************************************************/ 
    2727#import <Cocoa/Cocoa.h> 
     28 
     29NSArray *GetEjectableMediaOfClass( const char *psz_class ); 
    2830 
    2931/***************************************************************************** 
  • plugins/macosx/intf_vlc_wrapper.c

    r30a5f36 r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_vlc_wrapper.c,v 1.10 2002/04/23 03:21:21 jlj Exp $ 
     5 * $Id: intf_vlc_wrapper.c,v 1.11 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
    88 *          Jon Lech Johansen <jon-vl@nanocrew.net> 
     9 *          Christophe Massiot <massiot@via.ecp.fr> 
    910 * 
    1011 * This program is free software; you can redistribute it and/or modify 
     
    2728#include <string.h> 
    2829 
     30#include <IOKit/storage/IOCDMedia.h> 
     31#include <IOKit/storage/IODVDMedia.h> 
     32 
    2933#include <videolan/vlc.h> 
    3034 
    3135#include "interface.h" 
    3236#include "intf_playlist.h" 
     37#include "intf_eject.h" 
    3338 
    3439#include "video.h" 
    3540#include "video_output.h" 
     41#include "audio_output.h" 
     42 
    3643#include "stream_control.h" 
    3744#include "input_ext-intf.h" 
     
    7885 
    7986        return( 1 ); 
     87    } 
     88 
     89    if( p_input_bank->pp_input[0] != NULL ) 
     90    { 
     91        vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
     92 
     93        if( !p_input_bank->pp_input[0]->b_die ) 
     94        { 
     95            /* New input or stream map change */ 
     96            if( p_input_bank->pp_input[0]->stream.b_changed || 
     97                p_main->p_intf->p_sys->i_part != 
     98                p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) 
     99            { 
     100                [self setupMenus]; 
     101            } 
     102        } 
     103 
     104        vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
     105    } 
     106    else 
     107    { 
     108        [self setupMenus]; 
    80109    } 
    81110 
     
    196225} 
    197226 
     227- (void)mute 
     228{ 
     229    if( p_aout_bank->pp_aout[0] == NULL ) return; 
     230 
     231    if( p_main->p_intf->p_sys->b_mute ) 
     232    { 
     233        p_aout_bank->pp_aout[0]->i_volume =  
     234                            p_main->p_intf->p_sys->i_saved_volume; 
     235    } 
     236    else 
     237    { 
     238        p_main->p_intf->p_sys->i_saved_volume =  
     239                            p_aout_bank->pp_aout[0]->i_volume; 
     240        p_aout_bank->pp_aout[0]->i_volume = 0; 
     241    } 
     242    p_main->p_intf->p_sys->b_mute = !p_main->p_intf->p_sys->b_mute; 
     243} 
     244 
     245- (void)fullscreen 
     246{ 
     247    if( p_vout_bank->pp_vout[0] != NULL ) 
     248    { 
     249        p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE; 
     250    } 
     251} 
     252 
     253- (void)eject 
     254{ 
     255    /* FIXME : this will only eject the first drive found */ 
     256    NSArray * o_devices = GetEjectableMediaOfClass(kIODVDMediaClass); 
     257    const char * psz_device; 
     258 
     259    if ( o_devices == nil ) 
     260    { 
     261        o_devices = GetEjectableMediaOfClass(kIOCDMediaClass); 
     262    } 
     263 
     264    psz_device = [[o_devices objectAtIndex:0] cString]; 
     265    intf_Eject( psz_device ); 
     266} 
     267 
    198268/* playback info */ 
    199269 
     
    419489} 
    420490 
     491- (void)setupMenus 
     492{ 
     493#if 0 
     494    NSMenu * o_main_menu = [NSApp mainMenu]; 
     495    NSMenuItem * o_program_item = [o_main_menu itemWithTitle:@"Program"]; 
     496 
     497    if( p_input_bank->pp_input[0] == NULL ) 
     498    { 
     499        NSMenu * o_program = [o_program_item submenu]; 
     500        [o_program_item setEnabled:0]; 
     501        [o_program removeItemAtIndex:0]; 
     502    } 
     503    else 
     504    { 
     505        NSMenu * o_program = [o_program_item submenu]; 
     506        [o_program_item setEnabled:1]; 
     507        [o_program removeItemAtIndex:0]; 
     508    } 
     509#endif 
     510} 
     511 
    421512@end 
  • plugins/macosx/intf_vlc_wrapper.h

    r30a5f36 r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: intf_vlc_wrapper.h,v 1.5 2002/04/23 03:21:21 jlj Exp $ 
     5 * $Id: intf_vlc_wrapper.h,v 1.6 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Authors: Florian G. Pflug <fgp@phlo.org> 
     
    4646- (void)playSlower; 
    4747- (void)playFaster; 
     48- (void)mute; 
     49- (void)fullscreen; 
     50- (void)eject; 
    4851 
    4952/* playback info */ 
     
    6871- (void)openNet:(NSString*)o_protocol addr:(NSString*)o_addr port:(int)i_port baddr:(NSString*)o_baddr; 
    6972- (void)openNetChannel:(NSString*)o_addr port:(int)i_port; 
     73- (void)setupMenus; 
    7074 
    7175@end 
  • plugins/macosx/macosx.h

    r848637d r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: macosx.h,v 1.7 2002/04/25 23:07:23 massiot Exp $ 
     5 * $Id: macosx.h,v 1.8 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Authors: Colin Delacroix <colin@zoy.org> 
     
    3838    NSPort *o_port; 
    3939    NSAutoreleasePool *o_pool; 
     40 
     41    boolean_t b_mute; 
     42    int i_saved_volume; 
     43     
     44    int i_part; 
    4045} intf_sys_t; 
    4146 
     
    5358    boolean_t b_mouse_pointer_visible; 
    5459    mtime_t i_time_mouse_last_moved; 
    55  
     60     
    5661    CodecType i_codec; 
    5762    CGrafPtr p_qdport; 
  • src/interface/intf_eject.c

    r054b90a r3a361d2  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001, 2002 VideoLAN 
    5  * $Id: intf_eject.c,v 1.9 2002/04/04 22:08:05 massiot Exp $ 
     5 * $Id: intf_eject.c,v 1.10 2002/05/06 22:59:46 massiot Exp $ 
    66 * 
    77 * Author: Julien Blache <jb@technologeek.org> for the Linux part 
    88 *               with code taken from the Linux "eject" command 
     9 *         Jon Lech Johanson <jon-vl@nanocrew.net> for Darwin 
    910 * 
    1011 * This program is free software; you can redistribute it and/or modify 
     
    8283int intf_Eject( const char *psz_device ) 
    8384{ 
    84     int i_fd; 
    8585    int i_ret; 
    8686 
     
    100100        strlen( psz_disk ) > 4 ) 
    101101    { 
    102 #define EJECT_CMD "disktool -e %s 0" 
     102#define EJECT_CMD "/usr/sbin/disktool -e %s 0" 
    103103        snprintf( sz_cmd, sizeof(sz_cmd), EJECT_CMD, psz_disk ); 
    104104#undef EJECT_CMD 
     
    128128    return 1; 
    129129 
    130 #endif 
     130#else /* SYS_DARWIN */ 
     131 
     132    int i_fd; 
    131133 
    132134    /* This code could be extended to support CD/DVD-ROM chargers */ 
     
    165167 
    166168    return i_ret; 
     169#endif 
    167170} 
    168171