Changeset e3e9c13799fc03656fe36f9646b77030aff2626c

Show
Ignore:
Timestamp:
02/10/07 18:05:13 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1191341113 +0000
git-parent:

[d8fc0a94ed76c7f4d9e441b28010d997ab9890eb]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1191341113 +0000
Message:

Pass content-type from access to stream

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_stream.h

    r6ee1e19 re3e9c13  
    6161    /* Special for direct access control from demuxer. 
    6262     * XXX: avoid using it by all means */ 
    63     STREAM_CONTROL_ACCESS   /* arg1= int i_access_query, args   res: can fail 
     63    STREAM_CONTROL_ACCESS,  /* arg1= int i_access_query, args   res: can fail 
    6464                             if access unreachable or access control answer */ 
     65 
     66    STREAM_GET_CONTENT_TYPE,   /**< arg1= char **         res=can file */ 
    6567}; 
    6668 
     
    9294    return i_pos; 
    9395} 
     96 
    9497static inline int stream_MTU( stream_t *s ) 
    9598{ 
     
    98101    return i_mtu; 
    99102} 
     103 
    100104static inline int stream_Seek( stream_t *s, int64_t i_pos ) 
    101105{ 
    102106    return stream_Control( s, STREAM_SET_POSITION, i_pos ); 
     107} 
     108 
     109/** 
     110 * Get the Content-Type of a stream, or NULL if unknown. 
     111 * Result must be free()'d. 
     112 */ 
     113static inline char *stream_ContentType( stream_t *s ) 
     114{ 
     115    char *res; 
     116    if( stream_Control( s, STREAM_GET_CONTENT_TYPE, &res ) ) 
     117        return NULL; 
     118    return res; 
    103119} 
    104120 
  • src/input/demux.c

    r528f021 re3e9c13  
    509509 
    510510        case STREAM_CONTROL_ACCESS: 
     511        case STREAM_GET_CONTENT_TYPE: 
    511512            return VLC_EGENERIC; 
    512513 
  • src/input/mem_stream.c

    r6ee1e19 re3e9c13  
    124124 
    125125        case STREAM_GET_MTU: 
     126        case STREAM_GET_CONTENT_TYPE: 
    126127            return VLC_EGENERIC; 
    127128 
  • src/input/stream.c

    rcc3bd15 re3e9c13  
    556556            } 
    557557            return access2_vaControl( p_access, i_int, args ); 
     558 
     559        case STREAM_GET_CONTENT_TYPE: 
     560            return access2_Control( p_access, ACCESS_GET_CONTENT_TYPE, 
     561                                    va_arg( args, char ** ) ); 
    558562 
    559563        default: