Changeset 36b86f5b99933b478403e8231325e2392178a1f5
- Timestamp:
- 24/03/04 00:44:49 (5 years ago)
- git-parent:
- Files:
-
- Makefile.am (modified) (2 diffs)
- include/input_ext-intf.h (modified) (1 diff)
- include/ninput.h (modified) (4 diffs)
- include/video_output.h (modified) (2 diffs)
- include/vlc_common.h (modified) (1 diff)
- include/vlc_interface.h (modified) (2 diffs)
- src/input/control.c (added)
- src/input/input.c (modified) (5 diffs)
- src/interface/interface.c (modified) (2 diffs)
- src/libvlc.h (modified) (4 diffs)
- src/video_output/video_output.c (modified) (2 diffs)
- src/video_output/vout_intf.c (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Makefile.am
rbbb7928 r36b86f5 324 324 src/playlist/info.c \ 325 325 src/input/input.c \ 326 src/input/control.c \ 326 327 src/input/es_out.c \ 327 328 src/input/stream.c \ … … 340 341 src/video_output/vout_subpictures.c \ 341 342 src/video_output/vout_synchro.c \ 343 src/video_output/vout_intf.c \ 342 344 src/audio_output/common.c \ 343 345 src/audio_output/dec.c \ include/input_ext-intf.h
rcb50d64 r36b86f5 344 344 345 345 count_t c_loops; 346 347 /* User bookmarks */ 348 int i_bookmarks; 349 seekpoint_t **pp_bookmarks; 346 350 347 351 /* private, do not touch it */ include/ninput.h
r743502e r36b86f5 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999-2001 VideoLAN 5 * $Id : ninput.h,v 1.29 2004/03/03 12:01:17 fenrir Exp$5 * $Id$ 6 6 * 7 7 * Authors: Laurent Aimar <fenrir@via.ecp.fr> … … 284 284 }; 285 285 286 286 struct seekpoint_t 287 { 288 int64_t i_byte_offset; 289 int64_t i_time_offset; 290 char *psz_name; 291 }; 292 293 static inline seekpoint_t *vlc_seekpoint_New( void ) 294 { 295 seekpoint_t *point = (seekpoint_t*)malloc( sizeof( seekpoint_t ) ); 296 point->i_byte_offset = point->i_time_offset; 297 point->psz_name = NULL; 298 return point; 299 } 300 301 static inline void vlc_seekpoint_Delete( seekpoint_t *point ) 302 { 303 if( !point ) return; 304 if( point->psz_name ) free( point->psz_name ); 305 free( point ); 306 } 307 308 static inline seekpoint_t *vlc_seekpoint_Duplicate( seekpoint_t *src ) 309 { 310 seekpoint_t *point = vlc_seekpoint_New(); 311 if( src->psz_name ) point->psz_name = strdup( src->psz_name ); 312 point->i_time_offset = src->i_time_offset; 313 point->i_byte_offset = src->i_byte_offset; 314 return point; 315 } 287 316 288 317 /* Demux */ … … 319 348 } 320 349 321 322 350 /* Subtitles */ 323 351 VLC_EXPORT( char **, subtitles_Detect, ( input_thread_t *, char* path, char *fname ) ); … … 327 355 */ 328 356 357 358 /** 359 * \defgroup input Input 360 * @{ 361 */ 362 enum input_query_e 363 { 364 INPUT_GET_POSITION, /* arg1= double * res= */ 365 INPUT_SET_POSITION, /* arg1= double res=can fail */ 366 367 INPUT_GET_TIME, /* arg1= int64_t * res= */ 368 INPUT_SET_TIME, /* arg1= int64_t res=can fail */ 369 370 INPUT_GET_LENGTH, /* arg1= int64_t * res=can fail */ 371 372 INPUT_GET_FPS, /* arg1= float * res=can fail */ 373 INPUT_GET_META, /* arg1= vlc_meta_t ** res=can fail */ 374 375 INPUT_GET_BOOKMARKS, /* arg1= seekpoint_t *** arg2= int * res=can fail */ 376 INPUT_CLEAR_BOOKMARKS, /* res=can fail */ 377 INPUT_ADD_BOOKMARK, /* arg1= seekpoint_t * res=can fail */ 378 INPUT_DEL_BOOKMARK, /* arg1= seekpoint_t * res=can fail */ 379 INPUT_SET_BOOKMARK, /* arg1= int res=can fail */ 380 381 INPUT_GET_DIVISIONS 382 }; 383 384 VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list ) ); 385 VLC_EXPORT( int, input_Control, ( input_thread_t *, int i_query, ... ) ); 386 387 /** 388 * @} 389 */ 390 329 391 #endif include/video_output.h
rf982997 r36b86f5 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999, 2000 VideoLAN 5 * $Id : video_output.h,v 1.108 2004/02/22 00:15:33 gbazin Exp$5 * $Id$ 6 6 * 7 7 * Authors: Vincent Seguin <seguin@via.ecp.fr> … … 216 216 picture_t * vout_RenderPicture ( vout_thread_t *, picture_t *, 217 217 subpicture_t * ); 218 VLC_EXPORT( void *, vout_RequestWindow, ( vout_thread_t *, int *, int *, unsigned int *, unsigned int * ) ); 219 VLC_EXPORT( void, vout_ReleaseWindow, ( vout_thread_t *, void * ) ); 220 218 221 /** 219 222 * \addtogroup subpicture include/vlc_common.h
r756605b r36b86f5 225 225 typedef struct pgrm_sys_t pgrm_sys_t; 226 226 typedef struct stream_descriptor_t stream_descriptor_t; 227 typedef struct seekpoint_t seekpoint_t; 227 228 228 229 /* Format */ include/vlc_interface.h
rdcaa5aa r36b86f5 63 63 void ( *pf_show_dialog ) ( intf_thread_t *, int, int, 64 64 intf_dialog_args_t * ); 65 66 /** Video window callbacks */ 67 void * ( *pf_request_window ) ( intf_thread_t *, int *, int *, 68 unsigned int *, unsigned int * ); 69 void ( *pf_release_window ) ( intf_thread_t *, void * ); 65 70 66 71 /* XXX: new message passing stuff will go here */ … … 143 148 #define INTF_DIALOG_FILEINFO 12 144 149 #define INTF_DIALOG_PREFS 13 150 #define INTF_DIALOG_BOOKMARKS 14 145 151 146 152 #define INTF_DIALOG_POPUPMENU 20 src/input/input.c
rab94829 r36b86f5 78 78 static int RateCallback ( vlc_object_t *p_this, char const *psz_cmd, 79 79 vlc_value_t oldval, vlc_value_t newval, void *p_data ); 80 static int BookmarkCallback( vlc_object_t *p_this, char const *psz_cmd, 81 vlc_value_t oldval, vlc_value_t newval, void *p_data ); 80 82 81 83 /***************************************************************************** … … 131 133 132 134 /* decoders */ 133 var_Create( p_input, "minimize-threads", VLC_VAR_BOOL |VLC_VAR_DOINHERIT );135 var_Create( p_input, "minimize-threads", VLC_VAR_BOOL|VLC_VAR_DOINHERIT ); 134 136 135 137 /* play status */ … … 195 197 p_input->pf_demux = NULL; 196 198 p_input->pf_rewind = NULL; 197 p_input->pf_demux_control = NULL;199 p_input->pf_demux_control = demux_vaControlDefault; 198 200 p_input->i_cr_average = config_GetInt( p_input, "cr-average" ); 199 201 … … 249 251 250 252 msg_Info( p_input, "playlist item `%s'", p_input->psz_source ); 253 254 /* Bookmarks */ 255 var_Create( p_input, "bookmarks", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); 256 var_Create( p_input, "bookmark", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE | 257 VLC_VAR_ISCOMMAND ); 258 val.psz_string = _("Bookmark"); 259 var_Change( p_input, "bookmark", VLC_VAR_SETTEXT, &val, NULL ); 260 var_AddCallback( p_input, "bookmark", BookmarkCallback, NULL ); 261 262 p_input->i_bookmarks = 0; 263 p_input->pp_bookmarks = NULL; 264 265 var_Get( p_input, "bookmarks", &val ); 266 if( val.psz_string ) 267 { 268 /* FIXME: have a common cfg parsing routine used by sout and others */ 269 char *psz_parser, *psz_start, *psz_end; 270 psz_parser = val.psz_string; 271 while( (psz_start = strchr( psz_parser, '{' ) ) ) 272 { 273 seekpoint_t seekpoint; 274 char backup; 275 psz_start++; 276 psz_end = strchr( psz_start, '}' ); 277 if( !psz_end ) break; 278 psz_parser = psz_end + 1; 279 backup = *psz_parser; 280 *psz_parser = 0; 281 *psz_end = ','; 282 283 seekpoint.psz_name = 0; 284 seekpoint.i_byte_offset = 0; 285 seekpoint.i_time_offset = 0; 286 while( (psz_end = strchr( psz_start, ',' ) ) ) 287 { 288 *psz_end = 0; 289 if( !strncmp( psz_start, "name=", 5 ) ) 290 { 291 seekpoint.psz_name = psz_start + 5; 292 } 293 else if( !strncmp( psz_start, "bytes=", 6 ) ) 294 { 295 seekpoint.i_byte_offset = atol(psz_start + 6); 296 } 297 else if( !strncmp( psz_start, "time=", 5 ) ) 298 { 299 seekpoint.i_time_offset = atol(psz_start + 5) * 1000000; 300 } 301 psz_start = psz_end + 1; 302 } 303 msg_Dbg( p_input, "adding bookmark: %s, bytes="I64Fd", time="I64Fd, 304 seekpoint.psz_name, seekpoint.i_byte_offset, 305 seekpoint.i_time_offset ); 306 input_Control( p_input, INPUT_ADD_BOOKMARK, &seekpoint ); 307 *psz_parser = backup; 308 } 309 free( val.psz_string ); 310 } 251 311 252 312 /* Initialize input info */ … … 1421 1481 return VLC_SUCCESS; 1422 1482 } 1483 1484 static int BookmarkCallback( vlc_object_t *p_this, char const *psz_cmd, 1485 vlc_value_t oldval, vlc_value_t newval, void *p_data ) 1486 { 1487 input_thread_t *p_input = (input_thread_t *)p_this; 1488 return input_Control( p_input, INPUT_SET_BOOKMARK, newval ); 1489 } src/interface/interface.c
rc87d50d r36b86f5 5 5 ***************************************************************************** 6 6 * Copyright (C) 1998-2004 VideoLAN 7 * $Id : interface.c,v 1.114 2004/03/03 20:39:53 gbazin Exp$7 * $Id$ 8 8 * 9 9 * Authors: Vincent Seguin <seguin@via.ecp.fr> … … 85 85 return NULL; 86 86 } 87 88 /* XXX: workaround for a bug in VLC 0.5.0 where the dvdplay plugin was 89 * registering itself in $interface, which we do not want to happen. */ 90 psz_intf = config_GetPsz( p_intf, "intf" ); 91 if( psz_intf ) 92 { 93 if( !strcasecmp( psz_intf, "dvdplay" ) ) 94 { 95 config_PutPsz( p_intf, "intf", "" ); 96 } 97 free( psz_intf ); 98 } 87 p_intf->pf_request_window = NULL; 88 p_intf->pf_release_window = NULL; 99 89 100 90 /* Choose the best module */ src/libvlc.h
r37c01b3 r36b86f5 196 196 "adapt to the video characteristics.") 197 197 198 #define VIDEOX_TEXT N_("Video x coordinate") 199 #define VIDEOX_LONGTEXT N_( \ 200 "You can enforce the position of the top left corner of the video window "\ 201 "here (x coordinate).") 202 203 #define VIDEOY_TEXT N_("Video y coordinate") 204 #define VIDEOY_LONGTEXT N_( \ 205 "You can enforce the position of the top left corner of the video window "\ 206 "here (y coordinate).") 207 198 208 #define ALIGN_TEXT N_("Video alignment") 199 209 #define ALIGN_LONGTEXT N_( \ … … 311 321 #define STOP_TIME_TEXT N_("Input stop time (second)") 312 322 #define STOP_TIME_LONGTEXT N_("Input stop time (second)") 323 324 #define BOOKMARKS_TEXT N_("Bookmarks list for a stream") 325 #define BOOKMARKS_LONGTEXT N_("You can specify a list of bookmarks for a stream in " \ 326 "the form \"{name=bookmark-name,time=optional-time-offset," \ 327 "bytes=optional-byte-offset},{etc...}\"") 313 328 314 329 #define SUB_AUTO_TEXT N_("Autodetect subtitle files") … … 758 773 add_integer( "width", -1, NULL, WIDTH_TEXT, WIDTH_LONGTEXT, VLC_TRUE ); 759 774 add_integer( "height", -1, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE ); 775 add_integer( "video-x", -1, NULL, VIDEOX_TEXT, VIDEOX_LONGTEXT, VLC_TRUE ); 776 add_integer( "video-y", -1, NULL, VIDEOY_TEXT, VIDEOY_LONGTEXT, VLC_TRUE ); 760 777 add_integer( "align", 0, NULL, ALIGN_TEXT, ALIGN_LONGTEXT, VLC_TRUE ); 761 778 change_integer_list( pi_align_values, ppsz_align_descriptions, 0 ); … … 809 826 add_integer( "stop-time", 0, NULL, 810 827 STOP_TIME_TEXT, STOP_TIME_LONGTEXT, VLC_TRUE ); 828 add_string( "bookmarks", NULL, NULL, 829 BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_TRUE ); 811 830 812 831 add_file( "dvd", DVD_DEVICE, NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT, src/video_output/video_output.c
rc87d50d r36b86f5 6 6 ***************************************************************************** 7 7 * Copyright (C) 2000-2004 VideoLAN 8 * $Id : video_output.c,v 1.246 2004/03/03 20:39:53 gbazin Exp$8 * $Id$ 9 9 * 10 10 * Authors: Vincent Seguin <seguin@via.ecp.fr> … … 317 317 var_Create( p_vout, "zoom", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT ); 318 318 var_Create( p_vout, "align", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); 319 var_Create( p_vout, "video-x", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); 320 var_Create( p_vout, "video-y", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); 319 321 320 322 p_vout->b_override_aspect = VLC_FALSE;
