Changeset 1e9ecb9029e00ada8ceced3d60c54570bd7c1a84
- Timestamp:
- 23/04/04 14:46:34
(5 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1082724394 +0000
- git-parent:
[c55e169d9b8c5e6907ffba8b5a0e0e3396735b13]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1082724394 +0000
- Message:
* src/input/control.c, include/ninput.h: Added INPUT_GET_INFO.
* include/vlc_meta.h: vlc_meta_GetValue().
* modules/demux/m3u.c: increased MAX_LINE to 8192.
* modules/video_output/directx/events.c: portability fix.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r562ab59 |
r1e9ecb9 |
|
| 390 | 390 | |
|---|
| 391 | 391 | INPUT_ADD_INFO, /* arg1= char * arg2= char * arg3=... res=can fail */ |
|---|
| | 392 | INPUT_GET_INFO, /* arg1= char * arg2= char * arg3= char ** res=can fail*/ |
|---|
| 392 | 393 | |
|---|
| 393 | 394 | INPUT_SET_NAME, /* arg1= char * res=can fail */ |
|---|
| r0101fe5 |
r1e9ecb9 |
|
| 133 | 133 | } |
|---|
| 134 | 134 | |
|---|
| | 135 | static inline char *vlc_meta_GetValue( vlc_meta_t *m, char *name ) |
|---|
| | 136 | { |
|---|
| | 137 | int i; |
|---|
| | 138 | |
|---|
| | 139 | for( i = 0; i < m->i_meta; i++ ) |
|---|
| | 140 | { |
|---|
| | 141 | if( !strcmp( m->name[i], name ) ) |
|---|
| | 142 | { |
|---|
| | 143 | char *value = NULL; |
|---|
| | 144 | if( m->value[i] ) value = strdup( m->value[i] ); |
|---|
| | 145 | return value; |
|---|
| | 146 | } |
|---|
| | 147 | } |
|---|
| | 148 | return NULL; |
|---|
| | 149 | } |
|---|
| | 150 | |
|---|
| 135 | 151 | #endif |
|---|
| rd27f781 |
r1e9ecb9 |
|
| 36 | 36 | * Constants and structures |
|---|
| 37 | 37 | *****************************************************************************/ |
|---|
| 38 | | #define MAX_LINE 1024 |
|---|
| | 38 | #define MAX_LINE 8192 |
|---|
| 39 | 39 | |
|---|
| 40 | 40 | #define TYPE_UNKNOWN 0 |
|---|
| r4db4bfc |
r1e9ecb9 |
|
| 31 | 31 | #include <ctype.h> /* tolower() */ |
|---|
| 32 | 32 | #include <string.h> /* strerror() */ |
|---|
| | 33 | |
|---|
| | 34 | #ifndef _WIN32_WINNT |
|---|
| | 35 | # define _WIN32_WINNT 0x0400 |
|---|
| | 36 | #endif |
|---|
| 33 | 37 | |
|---|
| 34 | 38 | #include <vlc/vlc.h> |
|---|
| r3dcdd8d |
r1e9ecb9 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 1999-2004 VideoLAN |
|---|
| 5 | | * $Id: stream.c 7041 2004-03-11 16:48:27Z gbazin $ |
|---|
| | 5 | * $Id$ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Gildas Bazin <gbazin@videolan.org> |
|---|
| … | … | |
| 213 | 213 | break; |
|---|
| 214 | 214 | |
|---|
| | 215 | case INPUT_GET_INFO: |
|---|
| | 216 | { |
|---|
| | 217 | char *psz_cat = (char *)va_arg( args, char * ); |
|---|
| | 218 | char *psz_name = (char *)va_arg( args, char * ); |
|---|
| | 219 | char **ppsz_value = (char **)va_arg( args, char ** ); |
|---|
| | 220 | int i; |
|---|
| | 221 | |
|---|
| | 222 | i_ret = VLC_EGENERIC; |
|---|
| | 223 | *ppsz_value = NULL; |
|---|
| | 224 | |
|---|
| | 225 | vlc_mutex_lock( &p_input->p_item->lock ); |
|---|
| | 226 | for( i = 0; i < p_input->p_item->i_categories; i++ ) |
|---|
| | 227 | { |
|---|
| | 228 | if( !strcmp( p_input->p_item->pp_categories[i]->psz_name, |
|---|
| | 229 | psz_cat ) ) |
|---|
| | 230 | break; |
|---|
| | 231 | } |
|---|
| | 232 | |
|---|
| | 233 | if( i != p_input->p_item->i_categories ) |
|---|
| | 234 | { |
|---|
| | 235 | info_category_t *p_cat; |
|---|
| | 236 | p_cat = p_input->p_item->pp_categories[i]; |
|---|
| | 237 | |
|---|
| | 238 | for( i = 0; i < p_cat->i_infos; i++ ) |
|---|
| | 239 | { |
|---|
| | 240 | if( !strcmp( p_cat->pp_infos[i]->psz_name, psz_name ) ) |
|---|
| | 241 | { |
|---|
| | 242 | if( p_cat->pp_infos[i]->psz_value ) |
|---|
| | 243 | { |
|---|
| | 244 | *ppsz_value =strdup(p_cat->pp_infos[i]->psz_value); |
|---|
| | 245 | i_ret = VLC_SUCCESS; |
|---|
| | 246 | } |
|---|
| | 247 | break; |
|---|
| | 248 | } |
|---|
| | 249 | } |
|---|
| | 250 | } |
|---|
| | 251 | vlc_mutex_unlock( &p_input->p_item->lock ); |
|---|
| | 252 | } |
|---|
| | 253 | break; |
|---|
| | 254 | |
|---|
| 215 | 255 | case INPUT_ADD_BOOKMARK: |
|---|
| 216 | 256 | p_bkmk = (seekpoint_t *)va_arg( args, seekpoint_t * ); |
|---|