Changeset 1e9ecb9029e00ada8ceced3d60c54570bd7c1a84

Show
Ignore:
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
  • include/ninput.h

    r562ab59 r1e9ecb9  
    390390 
    391391    INPUT_ADD_INFO,   /* arg1= char * arg2= char * arg3=...  res=can fail    */ 
     392    INPUT_GET_INFO,   /* arg1= char * arg2= char * arg3= char ** res=can fail*/ 
    392393 
    393394    INPUT_SET_NAME,   /* arg1= char * res=can fail    */ 
  • include/vlc_meta.h

    r0101fe5 r1e9ecb9  
    133133} 
    134134 
     135static 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 
    135151#endif 
  • modules/demux/m3u.c

    rd27f781 r1e9ecb9  
    3636 * Constants and structures 
    3737 *****************************************************************************/ 
    38 #define MAX_LINE 1024 
     38#define MAX_LINE 8192 
    3939 
    4040#define TYPE_UNKNOWN 0 
  • modules/video_output/directx/events.c

    r4db4bfc r1e9ecb9  
    3131#include <ctype.h>                                              /* tolower() */ 
    3232#include <string.h>                                            /* strerror() */ 
     33 
     34#ifndef _WIN32_WINNT 
     35#   define _WIN32_WINNT 0x0400 
     36#endif 
    3337 
    3438#include <vlc/vlc.h> 
  • src/input/control.c

    r3dcdd8d r1e9ecb9  
    33 ***************************************************************************** 
    44 * Copyright (C) 1999-2004 VideoLAN 
    5  * $Id: stream.c 7041 2004-03-11 16:48:27Z gbazin
     5 * $Id
    66 * 
    77 * Authors: Gildas Bazin <gbazin@videolan.org> 
     
    213213        break; 
    214214 
     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 
    215255        case INPUT_ADD_BOOKMARK: 
    216256            p_bkmk = (seekpoint_t *)va_arg( args, seekpoint_t * );