Changeset c7b1c474c6a8687a0645553beb0e5c6f868d8c5c

Show
Ignore:
Timestamp:
09/01/02 03:01:14 (7 years ago)
Author:
Sam Hocevar <sam@videolan.org>
git-committer:
Sam Hocevar <sam@videolan.org> 1010541674 +0000
git-parent:

[1ae5bed4b16da43ac074f21b5ad024b14ffdfb01]

git-author:
Sam Hocevar <sam@videolan.org> 1010541674 +0000
Message:
  • ./include/modules_inner.h: replaced _X with VLC_SYMBOL because _X was
    already a system macro under MacOS X.
  • ./plugins/dummy/dummy.c: fixed vlc:loop, vlc:quit, etc. entries.
  • ./plugins/glide/glide.c: activated double buffering.
  • ./plugins/mga/xmga.c: started writing an xmga plugin; doesn't work yet.
  • ./src/input/input.c: fixed the input memory leak, and the insane thread
    spawning we got with vlc:loop.
  • ./src/misc/intf_eject.c: disc ejection routine courtesy of Julien Blache,
    currently Linux-only.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • AUTHORS

    re48d619 rc7b1c47  
    3838C: jobi 
    3939D: VCD input 
     40 
     41N: Julien Blache 
     42E: jb@technologeek.org 
     43D: Disc ejection code 
    4044 
    4145N: Emmanuel Blindauer 
  • BUGS

    r569eb5e rc7b1c47  
    11List of known vlc bugs 
    2 $Id: BUGS,v 1.3 2002/01/05 16:09:49 sam Exp $ 
     2$Id: BUGS,v 1.4 2002/01/09 02:01:14 sam Exp $ 
    33 
    44   Please try to keep this file up to date. Also, grep for FIXME in the 
     
    1818Input: 
    1919 
    20   * There is a memory leak in the input because the input thread is 
    21   never joined for termination. 
    22  
    23   * vlc:foo targets don't work anymore. 
     20  - 
    2421 
    2522 
     
    3734 
    3835  * The DirectX video output plugin is broken because of vout4. 
    39  
    40   * The GGI video output plugin is broken because of vout4. 
    4136 
    4237  * The BeOS video output plugin is broken because of vout4. 
     
    7065  * Saving preferences does not work at all. 
    7166 
     67 
     68Misc: 
     69 
     70  * The Jin-Roh DVD seems to segfault. 
     71 
  • Makefile

    r1e053ea rc7b1c47  
    101101        memcpy/memcpy3dn \ 
    102102        mga/mga \ 
     103        mga/xmga \ 
    103104        motion/motion \ 
    104105        motion/motionmmx \ 
     
    123124# C Objects 
    124125#  
    125 INTERFACE := main interface intf_msg intf_playlist 
     126INTERFACE := main interface intf_msg intf_playlist intf_eject 
    126127INPUT := input input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system 
    127128VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures 
  • configure

    r1e053ea rc7b1c47  
    64406440   if test x$enable_mga = xyes 
    64416441    then 
    6442       PLUGINS="${PLUGINS} mga
     6442      PLUGINS="${PLUGINS} mga xmga
    64436443    fi  
    64446444fi 
  • configure.in

    r1e053ea rc7b1c47  
    949949  [ if test x$enable_mga = xyes 
    950950    then 
    951       PLUGINS="${PLUGINS} mga
     951      PLUGINS="${PLUGINS} mga xmga
    952952    fi ]) 
    953953 
  • include/common.h

    r1e053ea rc7b1c47  
    44 ***************************************************************************** 
    55 * Copyright (C) 1998, 1999, 2000 VideoLAN 
    6  * $Id: common.h,v 1.66 2002/01/07 02:12:29 sam Exp $ 
     6 * $Id: common.h,v 1.67 2002/01/09 02:01:14 sam Exp $ 
    77 * 
    88 * Authors: Samuel Hocevar <sam@via.ecp.fr> 
     
    469469    void ( * intf_PlaylistJumpto )  ( struct playlist_s *, int ); 
    470470    void ( * intf_UrlDecode )       ( char * ); 
     471    int  ( * intf_Eject )           ( const char * ); 
    471472 
    472473    void    ( * msleep )         ( mtime_t ); 
     
    577578    struct module_s * ( * module_Need ) ( int, char *, struct probedata_s * ); 
    578579    void ( * module_Unneed )            ( struct module_s * ); 
     580 
    579581} module_symbols_t; 
    580582 
  • include/input_ext-intf.h

    r1e053ea rc7b1c47  
    55 ***************************************************************************** 
    66 * Copyright (C) 1999, 2000 VideoLAN 
    7  * $Id: input_ext-intf.h,v 1.56 2002/01/07 02:12:29 sam Exp $ 
     7 * $Id: input_ext-intf.h,v 1.57 2002/01/09 02:01:14 sam Exp $ 
    88 * 
    99 * Authors: Christophe Massiot <massiot@via.ecp.fr> 
     
    260260    boolean_t               b_eof; 
    261261    vlc_thread_t            thread_id;            /* id for thread functions */ 
    262     int *                   pi_status;              /* temporary status flag */ 
     262    int                     i_status;                         /* status flag */ 
    263263 
    264264    /* Input module */ 
     
    344344struct input_thread_s * input_CreateThread ( struct playlist_item_s *, 
    345345                                             int *pi_status ); 
    346 void   input_DestroyThread  ( struct input_thread_s *, int *pi_status ); 
     346void   input_StopThread     ( struct input_thread_s *, int *pi_status ); 
     347void   input_DestroyThread  ( struct input_thread_s * ); 
    347348 
    348349void   input_SetStatus      ( struct input_thread_s *, int ); 
  • include/modules_inner.h

    rcc0f0bb rc7b1c47  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: modules_inner.h,v 1.10 2001/12/30 07:09:54 sam Exp $ 
     5 * $Id: modules_inner.h,v 1.11 2002/01/09 02:01:14 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    5757 * of InitModule. Same for Activate- and DeactivateModule. */ 
    5858#ifdef BUILTIN 
    59 #   define _M( function )  CONCATENATE( function, MODULE_NAME ) 
    60 #   define _X( function )  CONCATENATE( function, MODULE_NAME ) 
    61 #   define DECLARE_SYMBOLS
    62 #   define STORE_SYMBOLS   
     59#   define _M( function )          CONCATENATE( function, MODULE_NAME ) 
     60#   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_NAME ) 
     61#   define DECLARE_SYMBOLS        
     62#   define STORE_SYMBOLS          
    6363#else 
    64 #   define _M( function )  function 
    65 #   define _X( function )  CONCATENATE( function, MODULE_SYMBOL ) 
    66 #   define DECLARE_SYMBOLS module_symbols_t* p_symbols; 
    67 #   define STORE_SYMBOLS   p_symbols = p_module->p_symbols; 
     64#   define _M( function )          function 
     65#   define __VLC_SYMBOL( symbol  ) CONCATENATE( symbol, MODULE_SYMBOL ) 
     66#   define DECLARE_SYMBOLS         module_symbols_t* p_symbols; 
     67#   define STORE_SYMBOLS           p_symbols = p_module->p_symbols; 
    6868#endif 
    6969 
     
    7676 */ 
    7777#define MODULE_INIT_START                                                     \ 
    78     int _X( InitModule ) ( module_t *p_module )                               \ 
     78    int __VLC_SYMBOL( InitModule ) ( module_t *p_module )                     \ 
    7979    {                                                                         \ 
    8080        int i_shortcut = 0;                                                   \ 
     
    116116    DECLARE_SYMBOLS;                                                          \ 
    117117                                                                              \ 
    118     int _X( ActivateModule ) ( module_t *p_module )                           \ 
     118    int __VLC_SYMBOL( ActivateModule ) ( module_t *p_module )                 \ 
    119119    {                                                                         \ 
    120120        p_module->p_functions =                                               \ 
     
    137137 */ 
    138138#define MODULE_DEACTIVATE_START                                               \ 
    139     int _X( DeactivateModule )( module_t *p_module )                          \ 
     139    int __VLC_SYMBOL( DeactivateModule )( module_t *p_module )                \ 
    140140    {                                                                         \ 
    141141        free( p_module->p_functions ); 
  • plugins/dummy/dummy.c

    rcc0f0bb rc7b1c47  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000, 2001 VideoLAN 
    5  * $Id: dummy.c,v 1.13 2001/12/30 07:09:55 sam Exp $ 
     5 * $Id: dummy.c,v 1.14 2002/01/09 02:01:14 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    5151    /* Capability score set to 0 because we don't want to be spawned 
    5252     * unless explicitly requested to */ 
    53     ADD_CAPABILITY( INPUT, 0 ) 
    5453    ADD_CAPABILITY( AOUT, 0 ) 
    5554    ADD_CAPABILITY( VOUT, 0 ) 
    5655    ADD_CAPABILITY( INTF, 0 ) 
     56    /* This one is ok. */ 
     57    ADD_CAPABILITY( INPUT, 100 ) 
    5758    ADD_SHORTCUT( "dummy" ) 
    5859MODULE_INIT_STOP 
  • plugins/dummy/input_dummy.c

    r53b978f rc7b1c47  
    33 ***************************************************************************** 
    44 * Copyright (C) 2001 VideoLAN 
    5  * $Id: input_dummy.c,v 1.12 2002/01/04 14:01:34 sam Exp $ 
     5 * $Id: input_dummy.c,v 1.13 2002/01/09 02:01:14 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    9090    { 
    9191        /* If the user specified "vlc:" then it's probably a file */ 
    92         return( 100 ); 
     92        return( 1 ); 
    9393    } 
    9494 
    95     return( 1 ); 
     95    return( 0 ); 
    9696} 
    9797 
     
    154154 
    155155    intf_ErrMsg( "input error: unknown command `%s'", psz_name ); 
    156  
    157156} 
    158157 
  • plugins/filter/wall.c

    r85e4b3a rc7b1c47  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000, 2001 VideoLAN 
    5  * $Id: wall.c,v 1.9 2002/01/07 17:02:07 sam Exp $ 
     5 * $Id: wall.c,v 1.10 2002/01/09 02:01:14 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    135135    } 
    136136 
    137     p_vout->p_sys->i_col = 3
    138     p_vout->p_sys->i_row = 3
     137    p_vout->p_sys->i_col = 6
     138    p_vout->p_sys->i_row = 6
    139139 
    140140    p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_row * 
  • plugins/glide/glide.c

    r1e053ea rc7b1c47  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000, 2001 VideoLAN 
    5  * $Id: glide.c,v 1.10 2002/01/07 02:12:29 sam Exp $ 
     5 * $Id: glide.c,v 1.11 2002/01/09 02:01:14 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    6161static void vout_Display   ( vout_thread_t *, picture_t * ); 
    6262 
    63 static int  NewPicture     ( vout_thread_t *, picture_t * ); 
    6463static int  OpenDisplay    ( vout_thread_t * ); 
    6564static void CloseDisplay   ( vout_thread_t * ); 
     
    9594    GrLfbInfo_t                 p_buffer_info;           /* back buffer info */ 
    9695 
    97     /* Dummy video memory */ 
    98     byte_t *                    p_video;                      /* base adress */ 
    99     size_t                      i_page_size;                    /* page size */ 
     96    u8* pp_buffer[2]; 
     97    int i_index; 
    10098 
    10199} vout_sys_t; 
     
    168166    I_OUTPUTPICTURES = 0; 
    169167 
    170     /* Try to initialize up to 1 direct buffers */ 
    171     while( I_OUTPUTPICTURES < 1 ) 
    172     { 
    173         p_pic = NULL; 
    174  
    175         /* Find an empty picture slot */ 
    176         for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ ) 
     168    p_pic = NULL; 
     169 
     170    /* Find an empty picture slot */ 
     171    for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ ) 
     172    { 
     173        if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE ) 
    177174        { 
    178             if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE ) 
    179             { 
    180                 p_pic = p_vout->p_picture + i_index; 
    181                 break; 
    182             } 
    183         } 
    184  
    185         /* Allocate the picture */ 
    186         if( p_pic == NULL || NewPicture( p_vout, p_pic ) ) 
    187         { 
     175            p_pic = p_vout->p_picture + i_index; 
    188176            break; 
    189177        } 
    190  
    191         p_pic->i_status = DESTROYED_PICTURE; 
    192         p_pic->i_type   = DIRECT_PICTURE; 
    193  
    194         PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic; 
    195  
    196         I_OUTPUTPICTURES++; 
    197     } 
    198  
    199     return( 0 ); 
     178    } 
     179 
     180    if( p_pic == NULL ) 
     181    { 
     182        return -1; 
     183    } 
     184 
     185    /* We know the chroma, allocate a buffer which will be used 
     186     * directly by the decoder */ 
     187    p_pic->i_planes = 1; 
     188 
     189    p_pic->p->p_pixels = p_vout->p_sys->pp_buffer[p_vout->p_sys->i_index]; 
     190    p_pic->p->i_pixel_bytes = GLIDE_BYTES_PER_PIXEL; 
     191    p_pic->p->i_lines = GLIDE_HEIGHT; 
     192 
     193    p_pic->p->b_margin = 1; 
     194    p_pic->p->b_hidden = 1; 
     195    p_pic->p->i_visible_bytes = GLIDE_WIDTH * GLIDE_BYTES_PER_PIXEL; 
     196    p_pic->p->i_pitch = p_vout->p_sys->p_buffer_info.strideInBytes; 
     197                         /*1024 * GLIDE_BYTES_PER_PIXEL*/ 
     198 
     199    p_pic->p->i_red_mask =   0xf800; 
     200    p_pic->p->i_green_mask = 0x07e0; 
     201    p_pic->p->i_blue_mask =  0x001f; 
     202 
     203    p_pic->i_status = DESTROYED_PICTURE; 
     204    p_pic->i_type   = DIRECT_PICTURE; 
     205 
     206    PP_OUTPUTPICTURE[ 0 ] = p_pic; 
     207 
     208    I_OUTPUTPICTURES = 1; 
     209 
     210    return 0; 
    200211} 
    201212 
     
    287298    GrLfbInfo_t p_front_buffer_info;                    /* front buffer info */ 
    288299 
    289     p_vout->p_sys->i_page_size = GLIDE_WIDTH * GLIDE_HEIGHT 
    290                                   * GLIDE_BYTES_PER_PIXEL; 
    291  
    292     /* Map two framebuffers a the very beginning of the fb */ 
    293     p_vout->p_sys->p_video = malloc( p_vout->p_sys->i_page_size * 2 ); 
    294     if( (int)p_vout->p_sys->p_video == -1 ) 
    295     { 
    296         intf_ErrMsg( "vout error: can't map video memory (%s)", 
    297                      strerror(errno) ); 
    298         return( 1 ); 
    299     } 
    300  
    301300    grGlideGetVersion( version ); 
    302301    grGlideInit(); 
     
    309308 
    310309    grSstSelect( 0 ); 
    311     if( !grSstWinOpen(0, resolution, GR_REFRESH_60Hz, 
    312                         GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1) ) 
     310    if( !grSstWinOpen( 0, resolution, GR_REFRESH_60Hz, 
     311                       GR_COLORFORMAT_ABGR, GR_ORIGIN_UPPER_LEFT, 2, 1 ) ) 
    313312    { 
    314313        intf_ErrMsg( "vout error: can't open 3dfx screen" ); 
     
    348347        return( 1 ); 
    349348    } 
    350     grLfbUnlock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); 
     349    grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); 
    351350     
    352351    grBufferClear( 0, 0, 0 ); 
    353352 
     353    p_vout->p_sys->pp_buffer[0] = p_vout->p_sys->p_buffer_info.lfbPtr; 
     354    p_vout->p_sys->pp_buffer[1] = p_front_buffer_info.lfbPtr; 
     355    p_vout->p_sys->i_index = 0; 
     356 
    354357    return( 0 ); 
    355358} 
     
    368371    /* shutdown Glide */ 
    369372    grGlideShutdown(); 
    370     free( p_vout->p_sys->p_video ); 
    371 
    372  
    373 /***************************************************************************** 
    374  * NewPicture: allocate a picture 
    375  ***************************************************************************** 
    376  * Returns 0 on success, -1 otherwise 
    377  *****************************************************************************/ 
    378 static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic ) 
    379 
    380     /* We know the chroma, allocate a buffer which will be used 
    381      * directly by the decoder */ 
    382     p_pic->p->p_pixels = p_vout->p_sys->p_video; 
    383     p_pic->p->i_pixel_bytes = GLIDE_BYTES_PER_PIXEL; 
    384     p_pic->p->i_lines = GLIDE_HEIGHT; 
    385  
    386     p_pic->p->b_margin = 1; 
    387     p_pic->p->b_hidden = 1; 
    388     p_pic->p->i_visible_bytes = GLIDE_WIDTH * GLIDE_BYTES_PER_PIXEL; 
    389     p_pic->p->i_pitch = p_vout->p_sys->p_buffer_info.strideInBytes; 
    390                          /*1024 * GLIDE_BYTES_PER_PIXEL*/ 
    391  
    392     p_pic->p->i_red_mask =   0xf800; 
    393     p_pic->p->i_green_mask = 0x07e0; 
    394     p_pic->p->i_blue_mask =  0x001f; 
    395  
    396     p_pic->i_planes = 1; 
    397  
    398     return 0; 
    399 
    400  
     373
     374 
  • plugins/gtk/gnome.c

    r1e053ea rc7b1c47  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000 VideoLAN 
    5  * $Id: gnome.c,v 1.6 2002/01/07 02:12:29 sam Exp $ 
     5 * $Id: gnome.c,v 1.7 2002/01/09 02:01:14 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    330330        vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
    331331 
    332         /* New input or stream map change */ 
    333         if( p_input_bank->pp_input[0]->stream.b_changed ) 
     332        if( !p_input_bank->pp_input[0]->b_die ) 
    334333        { 
    335             GtkModeManage( p_intf ); 
    336             GtkSetupMenus( p_intf ); 
    337             p_intf->p_sys->b_playing = 1; 
    338         } 
    339  
    340         /* Manage the slider */ 
    341         if( p_input_bank->pp_input[0]->stream.b_seekable ) 
    342         { 
    343             float           newvalue; 
    344             newvalue = p_intf->p_sys->p_adj->value; 
     334            /* New input or stream map change */ 
     335            if( p_input_bank->pp_input[0]->stream.b_changed ) 
     336            { 
     337                GtkModeManage( p_intf ); 
     338                GtkSetupMenus( p_intf ); 
     339                p_intf->p_sys->b_playing = 1; 
     340            } 
     341 
     342            /* Manage the slider */ 
     343            if( p_input_bank->pp_input[0]->stream.b_seekable ) 
     344            { 
     345                float           newvalue; 
     346                newvalue = p_intf->p_sys->p_adj->value; 
    345347     
    346348#define p_area p_input_bank->pp_input[0]->stream.p_selected_area 
    347             /* If the user hasn't touched the slider since the last time, 
    348              * then the input can safely change it */ 
    349             if( newvalue == p_intf->p_sys->f_adj_oldvalue ) 
     349                /* If the user hasn't touched the slider since the last time, 
     350                 * then the input can safely change it */ 
     351                if( newvalue == p_intf->p_sys->f_adj_oldvalue ) 
     352                { 
     353                    /* Update the value */ 
     354                    p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = 
     355                        ( 100. * p_area->i_tell ) / p_area->i_size; 
     356     
     357                    gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ), 
     358                                             "value_changed" ); 
     359                } 
     360                /* Otherwise, send message to the input if the user has 
     361                 * finished dragging the slider */ 
     362                else if( p_intf->p_sys->b_slider_free ) 
     363                { 
     364                    off_t i_seek = ( newvalue * p_area->i_size ) / 100; 
     365         
     366                    vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
     367                    input_Seek( p_input_bank->pp_input[0], i_seek ); 
     368                    vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
     369     
     370                    /* Update the old value */ 
     371                    p_intf->p_sys->f_adj_oldvalue = newvalue; 
     372                } 
     373#undef p_area 
     374            } 
     375 
     376            if( p_intf->p_sys->i_part != 
     377                p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) 
    350378            { 
    351                 /* Update the value */ 
    352                 p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = 
    353                     ( 100. * p_area->i_tell ) / p_area->i_size; 
    354      
    355                 gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ), 
    356                                          "value_changed" ); 
     379                p_intf->p_sys->b_chapter_update = 1; 
     380                GtkSetupMenus( p_intf ); 
    357381            } 
    358             /* Otherwise, send message to the input if the user has 
    359              * finished dragging the slider */ 
    360             else if( p_intf->p_sys->b_slider_free ) 
    361             { 
    362                 off_t i_seek = ( newvalue * p_area->i_size ) / 100; 
    363      
    364                 vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
    365                 input_Seek( p_input_bank->pp_input[0], i_seek ); 
    366                 vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
    367      
    368                 /* Update the old value */ 
    369                 p_intf->p_sys->f_adj_oldvalue = newvalue; 
    370             } 
    371 #undef p_area 
    372         } 
    373  
    374         if( p_intf->p_sys->i_part != 
    375             p_input_bank->pp_input[0]->stream.p_selected_area->i_part ) 
    376         { 
    377             p_intf->p_sys->b_chapter_update = 1; 
    378             GtkSetupMenus( p_intf ); 
    379382        } 
    380383 
  • plugins/gtk/gnome.glade

    rcc0f0bb rc7b1c47  
    9494        <name>activate</name> 
    9595        <handler>GnomeMenubarFileOpenActivate</handler> 
    96         <data>&quot;intf_window&quot;</data> 
    9796        <last_modification_time>Sat, 19 May 2001 16:27:02 GMT</last_modification_time> 
    9897          </signal> 
     
    109108        <name>activate</name> 
    110109        <handler>GnomeMenubarDiscOpenActivate</handler> 
    111         <data>&quot;intf_window&quot;</data> 
    112110        <last_modification_time>Sat, 19 May 2001 16:27:10 GMT</last_modification_time> 
    113111          </signal> 
     
    123121          <signal> 
    124122        <name>activate</name> 
    125         <handler>GnomeMenbarNetworkOpenActivate</handler> 
    126         <data>&quot;intf_window&quot;</data> 
    127         <last_modification_time>Sat, 19 May 2001 16:27:39 GMT</last_modification_time> 
     123        <handler>GnomeMenubarNetworkOpenActivate</handler> 
     124        <last_modification_time>Fri, 21 Dec 2001 13:11:28 GMT</last_modification_time> 
    128125          </signal> 
    129126          <label>_Network Stream...</label> 
     
    135132          <class>GtkMenuItem</class> 
    136133          <name>separator1</name> 
     134          <right_justify>False</right_justify> 
     135        </widget> 
     136 
     137        <widget> 
     138          <class>GtkPixmapMenuItem</class> 
     139          <name>menubar_eject</name> 
     140          <tooltip>Eject disc</tooltip> 
     141          <signal> 
     142        <name>activate</name> 
     143        <handler>GnomeMenubarDiscEjectActivate</handler> 
     144        <last_modification_time>Fri, 21 Dec 2001 13:11:28 GMT</last_modification_time> 
     145          </signal> 
     146          <label>_Eject Disc</label> 
     147          <right_justify>False</right_justify> 
     148          <stock_icon>GNOME_STOCK_MENU_TOP</stock_icon> 
     149        </widget> 
     150 
     151        <widget> 
     152          <class>GtkMenuItem</class> 
     153          <name>separator15</name> 
    137154          <right_justify>False</right_justify> 
    138155        </widget> 
     
    144161        <name>activate</name> 
    145162        <handler>GnomeMenubarExitActivate</handler> 
    146         <data>&quot;intf_window&quot;</data> 
    147163        <last_modification_time>Sat, 19 May 2001 16:27:52 GMT</last_modification_time> 
    148164          </signal> 
     
    167183        <name>activate</name> 
    168184        <handler>GnomeMenubarWindowToggleActivate</handler> 
    169         <data>&quot;intf_window&quot;</data> 
    170185        <last_modification_time>Sat, 19 May 2001 16:28:06 GMT</last_modification_time> 
    171186          </signal> 
     
    180195        <name>activate</name> 
    181196        <handler>GnomeMenubarFullscreenActivate</handler> 
    182         <data>&quot;intf_window&quot;</data> 
    183197        <last_modification_time>Sat, 19 May 2001 16:28:15 GMT</last_modification_time> 
    184198          </signal> 
     
    233247        <name>activate</name> 
    234248        <handler>GnomeMenubarPlaylistActivate</handler> 
    235         <data>&quot;intf_window&quot;</data> 
    236249        <last_modification_time>Sat, 19 May 2001 16:28:41 GMT</last_modification_time> 
    237250          </signal> 
     
    249262        <name>activate</name> 
    250263        <handler>GnomeMenubarModulesActivate</handler> 
    251         <data>&quot;intf_window&quot;</data> 
    252264        <last_modification_time>Sat, 19 May 2001 16:28:53 GMT</last_modification_time> 
    253265          </signal> 
     
    298310        <name>activate</name> 
    299311        <handler>GnomeMenubarPreferencesActivate</handler> 
    300         <data>&quot;intf_window&quot;</data> 
    301312        <last_modification_time>Sat, 19 May 2001 16:29:03 GMT</last_modification_time> 
    302313          </signal> 
     
    321332        <name>activate</name> 
    322333        <handler>GnomeMenubarAboutActivate</handler> 
    323         <data>&quot;intf_window&quot;</data> 
    324334        <last_modification_time>Sat, 19 May 2001 16:29:19 GMT</last_modification_time> 
    325335          </signal> 
     
    433443      <label>Stop</label> 
    434444      <stock_pixmap>GNOME_STOCK_PIXMAP_STOP</stock_pixmap> 
     445    </widget> 
     446 
     447    <widget> 
     448      <class>GtkButton</class> 
     449      <child_name>Toolbar:button</child_name> 
     450      <name>toolbar_eject</name> 
     451      <tooltip>Eject disc</tooltip> 
     452      <signal> 
     453        <name>button_press_event</name> 
     454        <handler>GtkDiscEject</handler> 
     455        <data>&quot;intf_window&quot;</data> 
     456        <last_modification_time>Fri, 21 Dec 2001 15:24:18 GMT</last_modification_time> 
     457      </signal> 
     458      <label>Eject</label> 
     459      <stock_pixmap>GNOME_STOCK_PIXMAP_TOP</stock_pixmap> 
    435460    </widget> 
    436461 
  • plugins/gtk/gnome_callbacks.c

    rb465bcc rc7b1c47  
    3131 
    3232void 
    33 GnomeMenbarNetworkOpenActivate         (GtkMenuItem     *menuitem, 
     33GnomeMenubarNetworkOpenActivate         (GtkMenuItem     *menuitem, 
    3434                                        gpointer         user_data) 
    3535{ 
     
    3737} 
    3838 
     39void 
     40GnomeMenubarDiscEjectActivate           (GtkMenuItem     *menuitem, 
     41                                        gpointer         user_data) 
     42{ 
     43     GtkDiscEject( GTK_WIDGET( menuitem ), NULL, "intf_window" ); 
     44} 
    3945 
    4046void 
     
    260266    GtkJumpShow( GTK_WIDGET( menuitem ), NULL, "intf_popup" ); 
    261267} 
    262  
    263  
    264  
  • plugins/gtk/gnome_callbacks.h

    rb465bcc rc7b1c47  
    1212 
    1313void 
    14 GnomeMenbarNetworkOpenActivate         (GtkMenuItem     *menuitem, 
     14GnomeMenubarNetworkOpenActivate         (GtkMenuItem     *menuitem, 
     15                                        gpointer         user_data); 
     16 
     17void 
     18GnomeMenubarDiscEjectActivate         (GtkMenuItem     *menuitem, 
    1519                                        gpointer         user_data); 
    1620 
     
    142146GtkNetworkOpenChannel                  (GtkToggleButton *togglebutton, 
    143147                                        gpointer         user_data); 
     148 
  • plugins/gtk/gnome_interface.c

    rcc0f0bb rc7b1c47  
    3333    GNOME_APP_UI_ITEM, N_("_Network Stream..."), 
    3434    N_("Select a Network Stream"), 
    35     (gpointer) GnomeMenbarNetworkOpenActivate, NULL, NULL, 
     35    (gpointer) GnomeMenubarNetworkOpenActivate, NULL, NULL, 
    3636    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_REFRESH, 
     37    0, (GdkModifierType) 0, NULL 
     38  }, 
     39  GNOMEUIINFO_SEPARATOR, 
     40  { 
     41    GNOME_APP_UI_ITEM, N_("_Eject Disc"), 
     42    N_("Eject disc"), 
     43    (gpointer) GnomeMenubarDiscEjectActivate, NULL, NULL, 
     44    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_TOP, 
    3745    0, (GdkModifierType) 0, NULL 
    3846  }, 
     
    146154  GtkWidget *toolbar_back; 
    147155  GtkWidget *toolbar_stop; 
     156  GtkWidget *toolbar_eject; 
    148157  GtkWidget *toolbar_play; 
    149158  GtkWidget *toolbar_pause; 
     
    221230 
    222231  gtk_widget_ref (menubar_file_menu_uiinfo[4].widget); 
     232  gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_eject", 
     233                            menubar_file_menu_uiinfo[4].widget, 
     234                            (GtkDestroyNotify) gtk_widget_unref); 
     235 
     236  gtk_widget_ref (menubar_file_menu_uiinfo[5].widget); 
     237  gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator15", 
     238                            menubar_file_menu_uiinfo[5].widget, 
     239                            (GtkDestroyNotify) gtk_widget_unref); 
     240 
     241  gtk_widget_ref (menubar_file_menu_uiinfo[6].widget); 
    223242  gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_exit", 
    224                             menubar_file_menu_uiinfo[4].widget, 
     243                            menubar_file_menu_uiinfo[6].widget, 
    225244                            (GtkDestroyNotify) gtk_widget_unref); 
    226245 
     
    390409                            (GtkDestroyNotify) gtk_widget_unref); 
    391410  gtk_widget_show (toolbar_stop); 
     411 
     412  tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_TOP); 
     413  toolbar_eject = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar), 
     414                                GTK_TOOLBAR_CHILD_BUTTON, 
     415                                NULL, 
     416                                _("Eject"), 
     417                                _("Eject disc"), NULL, 
     418                                tmp_toolbar_icon, NULL, NULL); 
     419  gtk_widget_ref (toolbar_eject); 
     420  gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_eject", toolbar_eject, 
     421                            (GtkDestroyNotify) gtk_widget_unref); 
     422  gtk_widget_show (toolbar_eject); 
    392423 
    393424  tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FORWARD); 
     
    682713  gtk_signal_connect (GTK_OBJECT (toolbar_stop), "button_press_event", 
    683714                      GTK_SIGNAL_FUNC (GtkControlStop), 
     715                      "intf_window"); 
     716  gtk_signal_connect (GTK_OBJECT (toolbar_eject), "button_press_event", 
     717                      GTK_SIGNAL_FUNC (GtkDiscEject), 
    684718                      "intf_window"); 
    685719  gtk_signal_connect (GTK_OBJECT (toolbar_play), "button_press_event", 
  • plugins/gtk/gtk.c

    r1e053ea rc7b1c47  
    33 ***************************************************************************** 
    44 * Copyright (C) 2000-2001 VideoLAN 
    5  * $Id: gtk.c,v 1.8 2002/01/07 02:12:29 sam Exp $ 
     5 * $Id: gtk.c,v 1.9 2002/01/09 02:01:14 sam Exp $ 
    66 * 
    77 * Authors: Samuel Hocevar <sam@zoy.org> 
     
    329329    GtkPlayListManage( p_data ); 
    330330 
    331     if( p_input_bank->pp_input[0] != NULL && !p_intf->b_die
     331    if( p_input_bank->pp_input[0] != NULL
    332332    { 
    333333        vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); 
    334334 
    335         /* New input or stream map change */ 
    336         if( p_input_bank->pp_input[0]->stream.b_changed ) 
     335        if( !p_input_bank->pp_input[0]->b_die ) 
    337336        { 
    338             GtkModeManage( p_intf ); 
    339             GtkSetupMenus( p_intf ); 
    340             p_intf->p_sys->b_playing = 1; 
    341         } 
    342  
    343         /* Manage the slider */ 
    344         if( p_input_bank->pp_input[0]->stream.b_seekable ) 
    345         { 
    346             float newvalue = p_intf->p_sys->p_adj->value; 
     337            /* New input or stream map change */