Changeset c7b1c474c6a8687a0645553beb0e5c6f868d8c5c
- 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
| re48d619 |
rc7b1c47 |
|
| 38 | 38 | C: jobi |
|---|
| 39 | 39 | D: VCD input |
|---|
| | 40 | |
|---|
| | 41 | N: Julien Blache |
|---|
| | 42 | E: jb@technologeek.org |
|---|
| | 43 | D: Disc ejection code |
|---|
| 40 | 44 | |
|---|
| 41 | 45 | N: Emmanuel Blindauer |
|---|
| r569eb5e |
rc7b1c47 |
|
| 1 | 1 | List 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 $ |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | Please try to keep this file up to date. Also, grep for FIXME in the |
|---|
| … | … | |
| 18 | 18 | Input: |
|---|
| 19 | 19 | |
|---|
| 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 | - |
|---|
| 24 | 21 | |
|---|
| 25 | 22 | |
|---|
| … | … | |
| 37 | 34 | |
|---|
| 38 | 35 | * The DirectX video output plugin is broken because of vout4. |
|---|
| 39 | | |
|---|
| 40 | | * The GGI video output plugin is broken because of vout4. |
|---|
| 41 | 36 | |
|---|
| 42 | 37 | * The BeOS video output plugin is broken because of vout4. |
|---|
| … | … | |
| 70 | 65 | * Saving preferences does not work at all. |
|---|
| 71 | 66 | |
|---|
| | 67 | |
|---|
| | 68 | Misc: |
|---|
| | 69 | |
|---|
| | 70 | * The Jin-Roh DVD seems to segfault. |
|---|
| | 71 | |
|---|
| r1e053ea |
rc7b1c47 |
|
| 101 | 101 | memcpy/memcpy3dn \ |
|---|
| 102 | 102 | mga/mga \ |
|---|
| | 103 | mga/xmga \ |
|---|
| 103 | 104 | motion/motion \ |
|---|
| 104 | 105 | motion/motionmmx \ |
|---|
| … | … | |
| 123 | 124 | # C Objects |
|---|
| 124 | 125 | # |
|---|
| 125 | | INTERFACE := main interface intf_msg intf_playlist |
|---|
| | 126 | INTERFACE := main interface intf_msg intf_playlist intf_eject |
|---|
| 126 | 127 | INPUT := input input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system |
|---|
| 127 | 128 | VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures |
|---|
| r1e053ea |
rc7b1c47 |
|
| 6440 | 6440 | if test x$enable_mga = xyes |
|---|
| 6441 | 6441 | then |
|---|
| 6442 | | PLUGINS="${PLUGINS} mga" |
|---|
| | 6442 | PLUGINS="${PLUGINS} mga xmga" |
|---|
| 6443 | 6443 | fi |
|---|
| 6444 | 6444 | fi |
|---|
| r1e053ea |
rc7b1c47 |
|
| 949 | 949 | [ if test x$enable_mga = xyes |
|---|
| 950 | 950 | then |
|---|
| 951 | | PLUGINS="${PLUGINS} mga" |
|---|
| | 951 | PLUGINS="${PLUGINS} mga xmga" |
|---|
| 952 | 952 | fi ]) |
|---|
| 953 | 953 | |
|---|
| r1e053ea |
rc7b1c47 |
|
| 4 | 4 | ***************************************************************************** |
|---|
| 5 | 5 | * 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 $ |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | * Authors: Samuel Hocevar <sam@via.ecp.fr> |
|---|
| … | … | |
| 469 | 469 | void ( * intf_PlaylistJumpto ) ( struct playlist_s *, int ); |
|---|
| 470 | 470 | void ( * intf_UrlDecode ) ( char * ); |
|---|
| | 471 | int ( * intf_Eject ) ( const char * ); |
|---|
| 471 | 472 | |
|---|
| 472 | 473 | void ( * msleep ) ( mtime_t ); |
|---|
| … | … | |
| 577 | 578 | struct module_s * ( * module_Need ) ( int, char *, struct probedata_s * ); |
|---|
| 578 | 579 | void ( * module_Unneed ) ( struct module_s * ); |
|---|
| | 580 | |
|---|
| 579 | 581 | } module_symbols_t; |
|---|
| 580 | 582 | |
|---|
| r1e053ea |
rc7b1c47 |
|
| 5 | 5 | ***************************************************************************** |
|---|
| 6 | 6 | * 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 $ |
|---|
| 8 | 8 | * |
|---|
| 9 | 9 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 260 | 260 | boolean_t b_eof; |
|---|
| 261 | 261 | vlc_thread_t thread_id; /* id for thread functions */ |
|---|
| 262 | | int * pi_status; /* temporary status flag */ |
|---|
| | 262 | int i_status; /* status flag */ |
|---|
| 263 | 263 | |
|---|
| 264 | 264 | /* Input module */ |
|---|
| … | … | |
| 344 | 344 | struct input_thread_s * input_CreateThread ( struct playlist_item_s *, |
|---|
| 345 | 345 | int *pi_status ); |
|---|
| 346 | | void input_DestroyThread ( struct input_thread_s *, int *pi_status ); |
|---|
| | 346 | void input_StopThread ( struct input_thread_s *, int *pi_status ); |
|---|
| | 347 | void input_DestroyThread ( struct input_thread_s * ); |
|---|
| 347 | 348 | |
|---|
| 348 | 349 | void input_SetStatus ( struct input_thread_s *, int ); |
|---|
| rcc0f0bb |
rc7b1c47 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 57 | 57 | * of InitModule. Same for Activate- and DeactivateModule. */ |
|---|
| 58 | 58 | #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 ; |
|---|
| 63 | 63 | #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; |
|---|
| 68 | 68 | #endif |
|---|
| 69 | 69 | |
|---|
| … | … | |
| 76 | 76 | */ |
|---|
| 77 | 77 | #define MODULE_INIT_START \ |
|---|
| 78 | | int _X( InitModule ) ( module_t *p_module ) \ |
|---|
| | 78 | int __VLC_SYMBOL( InitModule ) ( module_t *p_module ) \ |
|---|
| 79 | 79 | { \ |
|---|
| 80 | 80 | int i_shortcut = 0; \ |
|---|
| … | … | |
| 116 | 116 | DECLARE_SYMBOLS; \ |
|---|
| 117 | 117 | \ |
|---|
| 118 | | int _X( ActivateModule ) ( module_t *p_module ) \ |
|---|
| | 118 | int __VLC_SYMBOL( ActivateModule ) ( module_t *p_module ) \ |
|---|
| 119 | 119 | { \ |
|---|
| 120 | 120 | p_module->p_functions = \ |
|---|
| … | … | |
| 137 | 137 | */ |
|---|
| 138 | 138 | #define MODULE_DEACTIVATE_START \ |
|---|
| 139 | | int _X( DeactivateModule )( module_t *p_module ) \ |
|---|
| | 139 | int __VLC_SYMBOL( DeactivateModule )( module_t *p_module ) \ |
|---|
| 140 | 140 | { \ |
|---|
| 141 | 141 | free( p_module->p_functions ); |
|---|
| rcc0f0bb |
rc7b1c47 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 51 | 51 | /* Capability score set to 0 because we don't want to be spawned |
|---|
| 52 | 52 | * unless explicitly requested to */ |
|---|
| 53 | | ADD_CAPABILITY( INPUT, 0 ) |
|---|
| 54 | 53 | ADD_CAPABILITY( AOUT, 0 ) |
|---|
| 55 | 54 | ADD_CAPABILITY( VOUT, 0 ) |
|---|
| 56 | 55 | ADD_CAPABILITY( INTF, 0 ) |
|---|
| | 56 | /* This one is ok. */ |
|---|
| | 57 | ADD_CAPABILITY( INPUT, 100 ) |
|---|
| 57 | 58 | ADD_SHORTCUT( "dummy" ) |
|---|
| 58 | 59 | MODULE_INIT_STOP |
|---|
| r53b978f |
rc7b1c47 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 90 | 90 | { |
|---|
| 91 | 91 | /* If the user specified "vlc:" then it's probably a file */ |
|---|
| 92 | | return( 100 ); |
|---|
| | 92 | return( 1 ); |
|---|
| 93 | 93 | } |
|---|
| 94 | 94 | |
|---|
| 95 | | return( 1 ); |
|---|
| | 95 | return( 0 ); |
|---|
| 96 | 96 | } |
|---|
| 97 | 97 | |
|---|
| … | … | |
| 154 | 154 | |
|---|
| 155 | 155 | intf_ErrMsg( "input error: unknown command `%s'", psz_name ); |
|---|
| 156 | | |
|---|
| 157 | 156 | } |
|---|
| 158 | 157 | |
|---|
| r85e4b3a |
rc7b1c47 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 135 | 135 | } |
|---|
| 136 | 136 | |
|---|
| 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; |
|---|
| 139 | 139 | |
|---|
| 140 | 140 | p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_row * |
|---|
| r1e053ea |
rc7b1c47 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 61 | 61 | static void vout_Display ( vout_thread_t *, picture_t * ); |
|---|
| 62 | 62 | |
|---|
| 63 | | static int NewPicture ( vout_thread_t *, picture_t * ); |
|---|
| 64 | 63 | static int OpenDisplay ( vout_thread_t * ); |
|---|
| 65 | 64 | static void CloseDisplay ( vout_thread_t * ); |
|---|
| … | … | |
| 95 | 94 | GrLfbInfo_t p_buffer_info; /* back buffer info */ |
|---|
| 96 | 95 | |
|---|
| 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; |
|---|
| 100 | 98 | |
|---|
| 101 | 99 | } vout_sys_t; |
|---|
| … | … | |
| 168 | 166 | I_OUTPUTPICTURES = 0; |
|---|
| 169 | 167 | |
|---|
| 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 ) |
|---|
| 177 | 174 | { |
|---|
| 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; |
|---|
| 188 | 176 | break; |
|---|
| 189 | 177 | } |
|---|
| 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; |
|---|
| 200 | 211 | } |
|---|
| 201 | 212 | |
|---|
| … | … | |
| 287 | 298 | GrLfbInfo_t p_front_buffer_info; /* front buffer info */ |
|---|
| 288 | 299 | |
|---|
| 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 | | |
|---|
| 301 | 300 | grGlideGetVersion( version ); |
|---|
| 302 | 301 | grGlideInit(); |
|---|
| … | … | |
| 309 | 308 | |
|---|
| 310 | 309 | 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 ) ) |
|---|
| 313 | 312 | { |
|---|
| 314 | 313 | intf_ErrMsg( "vout error: can't open 3dfx screen" ); |
|---|
| … | … | |
| 348 | 347 | return( 1 ); |
|---|
| 349 | 348 | } |
|---|
| 350 | | grLfbUnlock(GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); |
|---|
| | 349 | grLfbUnlock( GR_LFB_WRITE_ONLY, GR_BUFFER_BACKBUFFER ); |
|---|
| 351 | 350 | |
|---|
| 352 | 351 | grBufferClear( 0, 0, 0 ); |
|---|
| 353 | 352 | |
|---|
| | 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 | |
|---|
| 354 | 357 | return( 0 ); |
|---|
| 355 | 358 | } |
|---|
| … | … | |
| 368 | 371 | /* shutdown Glide */ |
|---|
| 369 | 372 | 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 | |
|---|
| r1e053ea |
rc7b1c47 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 330 | 330 | vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); |
|---|
| 331 | 331 | |
|---|
| 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 ) |
|---|
| 334 | 333 | { |
|---|
| 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; |
|---|
| 345 | 347 | |
|---|
| 346 | 348 | #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 ) |
|---|
| 350 | 378 | { |
|---|
| 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 ); |
|---|
| 357 | 381 | } |
|---|
| 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 ); |
|---|
| 379 | 382 | } |
|---|
| 380 | 383 | |
|---|
| rcc0f0bb |
rc7b1c47 |
|
| 94 | 94 | <name>activate</name> |
|---|
| 95 | 95 | <handler>GnomeMenubarFileOpenActivate</handler> |
|---|
| 96 | | <data>"intf_window"</data> |
|---|
| 97 | 96 | <last_modification_time>Sat, 19 May 2001 16:27:02 GMT</last_modification_time> |
|---|
| 98 | 97 | </signal> |
|---|
| … | … | |
| 109 | 108 | <name>activate</name> |
|---|
| 110 | 109 | <handler>GnomeMenubarDiscOpenActivate</handler> |
|---|
| 111 | | <data>"intf_window"</data> |
|---|
| 112 | 110 | <last_modification_time>Sat, 19 May 2001 16:27:10 GMT</last_modification_time> |
|---|
| 113 | 111 | </signal> |
|---|
| … | … | |
| 123 | 121 | <signal> |
|---|
| 124 | 122 | <name>activate</name> |
|---|
| 125 | | <handler>GnomeMenbarNetworkOpenActivate</handler> |
|---|
| 126 | | <data>"intf_window"</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> |
|---|
| 128 | 125 | </signal> |
|---|
| 129 | 126 | <label>_Network Stream...</label> |
|---|
| … | … | |
| 135 | 132 | <class>GtkMenuItem</class> |
|---|
| 136 | 133 | <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> |
|---|
| 137 | 154 | <right_justify>False</right_justify> |
|---|
| 138 | 155 | </widget> |
|---|
| … | … | |
| 144 | 161 | <name>activate</name> |
|---|
| 145 | 162 | <handler>GnomeMenubarExitActivate</handler> |
|---|
| 146 | | <data>"intf_window"</data> |
|---|
| 147 | 163 | <last_modification_time>Sat, 19 May 2001 16:27:52 GMT</last_modification_time> |
|---|
| 148 | 164 | </signal> |
|---|
| … | … | |
| 167 | 183 | <name>activate</name> |
|---|
| 168 | 184 | <handler>GnomeMenubarWindowToggleActivate</handler> |
|---|
| 169 | | <data>"intf_window"</data> |
|---|
| 170 | 185 | <last_modification_time>Sat, 19 May 2001 16:28:06 GMT</last_modification_time> |
|---|
| 171 | 186 | </signal> |
|---|
| … | … | |
| 180 | 195 | <name>activate</name> |
|---|
| 181 | 196 | <handler>GnomeMenubarFullscreenActivate</handler> |
|---|
| 182 | | <data>"intf_window"</data> |
|---|
| 183 | 197 | <last_modification_time>Sat, 19 May 2001 16:28:15 GMT</last_modification_time> |
|---|
| 184 | 198 | </signal> |
|---|
| … | … | |
| 233 | 247 | <name>activate</name> |
|---|
| 234 | 248 | <handler>GnomeMenubarPlaylistActivate</handler> |
|---|
| 235 | | <data>"intf_window"</data> |
|---|
| 236 | 249 | <last_modification_time>Sat, 19 May 2001 16:28:41 GMT</last_modification_time> |
|---|
| 237 | 250 | </signal> |
|---|
| … | … | |
| 249 | 262 | <name>activate</name> |
|---|
| 250 | 263 | <handler>GnomeMenubarModulesActivate</handler> |
|---|
| 251 | | <data>"intf_window"</data> |
|---|
| 252 | 264 | <last_modification_time>Sat, 19 May 2001 16:28:53 GMT</last_modification_time> |
|---|
| 253 | 265 | </signal> |
|---|
| … | … | |
| 298 | 310 | <name>activate</name> |
|---|
| 299 | 311 | <handler>GnomeMenubarPreferencesActivate</handler> |
|---|
| 300 | | <data>"intf_window"</data> |
|---|
| 301 | 312 | <last_modification_time>Sat, 19 May 2001 16:29:03 GMT</last_modification_time> |
|---|
| 302 | 313 | </signal> |
|---|
| … | … | |
| 321 | 332 | <name>activate</name> |
|---|
| 322 | 333 | <handler>GnomeMenubarAboutActivate</handler> |
|---|
| 323 | | <data>"intf_window"</data> |
|---|
| 324 | 334 | <last_modification_time>Sat, 19 May 2001 16:29:19 GMT</last_modification_time> |
|---|
| 325 | 335 | </signal> |
|---|
| … | … | |
| 433 | 443 | <label>Stop</label> |
|---|
| 434 | 444 | <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>"intf_window"</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> |
|---|
| 435 | 460 | </widget> |
|---|
| 436 | 461 | |
|---|
| rb465bcc |
rc7b1c47 |
|
| 31 | 31 | |
|---|
| 32 | 32 | void |
|---|
| 33 | | GnomeMenbarNetworkOpenActivate (GtkMenuItem *menuitem, |
|---|
| | 33 | GnomeMenubarNetworkOpenActivate (GtkMenuItem *menuitem, |
|---|
| 34 | 34 | gpointer user_data) |
|---|
| 35 | 35 | { |
|---|
| … | … | |
| 37 | 37 | } |
|---|
| 38 | 38 | |
|---|
| | 39 | void |
|---|
| | 40 | GnomeMenubarDiscEjectActivate (GtkMenuItem *menuitem, |
|---|
| | 41 | gpointer user_data) |
|---|
| | 42 | { |
|---|
| | 43 | GtkDiscEject( GTK_WIDGET( menuitem ), NULL, "intf_window" ); |
|---|
| | 44 | } |
|---|
| 39 | 45 | |
|---|
| 40 | 46 | void |
|---|
| … | … | |
| 260 | 266 | GtkJumpShow( GTK_WIDGET( menuitem ), NULL, "intf_popup" ); |
|---|
| 261 | 267 | } |
|---|
| 262 | | |
|---|
| 263 | | |
|---|
| 264 | | |
|---|
| rb465bcc |
rc7b1c47 |
|
| 12 | 12 | |
|---|
| 13 | 13 | void |
|---|
| 14 | | GnomeMenbarNetworkOpenActivate (GtkMenuItem *menuitem, |
|---|
| | 14 | GnomeMenubarNetworkOpenActivate (GtkMenuItem *menuitem, |
|---|
| | 15 | gpointer user_data); |
|---|
| | 16 | |
|---|
| | 17 | void |
|---|
| | 18 | GnomeMenubarDiscEjectActivate (GtkMenuItem *menuitem, |
|---|
| 15 | 19 | gpointer user_data); |
|---|
| 16 | 20 | |
|---|
| … | … | |
| 142 | 146 | GtkNetworkOpenChannel (GtkToggleButton *togglebutton, |
|---|
| 143 | 147 | gpointer user_data); |
|---|
| | 148 | |
|---|
| rcc0f0bb |
rc7b1c47 |
|
| 33 | 33 | GNOME_APP_UI_ITEM, N_("_Network Stream..."), |
|---|
| 34 | 34 | N_("Select a Network Stream"), |
|---|
| 35 | | (gpointer) GnomeMenbarNetworkOpenActivate, NULL, NULL, |
|---|
| | 35 | (gpointer) GnomeMenubarNetworkOpenActivate, NULL, NULL, |
|---|
| 36 | 36 | 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, |
|---|
| 37 | 45 | 0, (GdkModifierType) 0, NULL |
|---|
| 38 | 46 | }, |
|---|
| … | … | |
| 146 | 154 | GtkWidget *toolbar_back; |
|---|
| 147 | 155 | GtkWidget *toolbar_stop; |
|---|
| | 156 | GtkWidget *toolbar_eject; |
|---|
| 148 | 157 | GtkWidget *toolbar_play; |
|---|
| 149 | 158 | GtkWidget *toolbar_pause; |
|---|
| … | … | |
| 221 | 230 | |
|---|
| 222 | 231 | 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); |
|---|
| 223 | 242 | 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, |
|---|
| 225 | 244 | (GtkDestroyNotify) gtk_widget_unref); |
|---|
| 226 | 245 | |
|---|
| … | … | |
| 390 | 409 | (GtkDestroyNotify) gtk_widget_unref); |
|---|
| 391 | 410 | 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); |
|---|
| 392 | 423 | |
|---|
| 393 | 424 | tmp_toolbar_icon = gnome_stock_pixmap_widget (intf_window, GNOME_STOCK_PIXMAP_FORWARD); |
|---|
| … | … | |
| 682 | 713 | gtk_signal_connect (GTK_OBJECT (toolbar_stop), "button_press_event", |
|---|
| 683 | 714 | GTK_SIGNAL_FUNC (GtkControlStop), |
|---|
| | 715 | "intf_window"); |
|---|
| | 716 | gtk_signal_connect (GTK_OBJECT (toolbar_eject), "button_press_event", |
|---|
| | 717 | GTK_SIGNAL_FUNC (GtkDiscEject), |
|---|
| 684 | 718 | "intf_window"); |
|---|
| 685 | 719 | gtk_signal_connect (GTK_OBJECT (toolbar_play), "button_press_event", |
|---|
| r1e053ea |
rc7b1c47 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 329 | 329 | GtkPlayListManage( p_data ); |
|---|
| 330 | 330 | |
|---|
| 331 | | if( p_input_bank->pp_input[0] != NULL && !p_intf->b_die ) |
|---|
| | 331 | if( p_input_bank->pp_input[0] != NULL ) |
|---|
| 332 | 332 | { |
|---|
| 333 | 333 | vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); |
|---|
| 334 | 334 | |
|---|
| 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 ) |
|---|
| 337 | 336 | { |
|---|
| 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 */ |
|---|