Changeset 40785cad487daf4df6418b07f28bdd03d1ca3f03

Show
Ignore:
Timestamp:
20/07/07 16:22:54 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1184941374 +0000
git-parent:

[8b91a2d0b18af1add7d4d616dedd25293db564bb]

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

Make stream_Peek take a const pointer as it should
(This introduces a lot of warnings)

Files:

Legend:

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

    rf397fdb r40785ca  
    6666 
    6767VLC_EXPORT( int, stream_Read, ( stream_t *s, void *p_read, int i_read ) ); 
    68 VLC_EXPORT( int, stream_Peek, ( stream_t *s, uint8_t **pp_peek, int i_peek ) ); 
     68VLC_EXPORT( int, stream_Peek, ( stream_t *s, const uint8_t **pp_peek, int i_peek ) ); 
    6969VLC_EXPORT( int, stream_vaControl, ( stream_t *s, int i_query, va_list args ) ); 
    7070VLC_EXPORT( void, stream_Delete, ( stream_t *s ) ); 
  • src/input/demux.c

    ra8a47dd r40785ca  
    298298 
    299299static int DStreamRead   ( stream_t *, void *p_read, int i_read ); 
    300 static int DStreamPeek   ( stream_t *, uint8_t **pp_peek, int i_peek ); 
     300static int DStreamPeek   ( stream_t *, const uint8_t **pp_peek, int i_peek ); 
    301301static int DStreamControl( stream_t *, int i_query, va_list ); 
    302302static int DStreamThread ( stream_t * ); 
     
    420420} 
    421421 
    422 static int DStreamPeek( stream_t *s, uint8_t **pp_peek, int i_peek ) 
     422static int DStreamPeek( stream_t *s, const uint8_t **pp_peek, int i_peek ) 
    423423{ 
    424424    d_stream_sys_t *p_sys = (d_stream_sys_t*)s->p_sys; 
     
    546546static void SkipID3Tag( demux_t *p_demux ) 
    547547{ 
    548     uint8_t *p_peek; 
     548    const uint8_t *p_peek; 
    549549    uint8_t version, revision; 
    550550    int i_size; 
  • src/input/input_internal.h

    r0fb0c8e r40785ca  
    366366    block_t *(*pf_block)  ( stream_t *, int i_size ); 
    367367    int      (*pf_read)   ( stream_t *, void *p_read, int i_read ); 
    368     int      (*pf_peek)   ( stream_t *, uint8_t **pp_peek, int i_peek ); 
     368    int      (*pf_peek)   ( stream_t *, const uint8_t **pp_peek, int i_peek ); 
    369369    int      (*pf_control)( stream_t *, int i_query, va_list ); 
    370370    void     (*pf_destroy)( stream_t *); 
  • src/input/mem_stream.c

    r9b6b0df r40785ca  
    3737 
    3838static int  Read   ( stream_t *, void *p_read, int i_read ); 
    39 static int  Peek   ( stream_t *, uint8_t **pp_peek, int i_read ); 
     39static int  Peek   ( stream_t *, const uint8_t **pp_peek, int i_read ); 
    4040static int  Control( stream_t *, int i_query, va_list ); 
    4141static void Delete ( stream_t * ); 
     
    150150} 
    151151 
    152 static int Peek( stream_t *s, uint8_t **pp_peek, int i_read ) 
     152static int Peek( stream_t *s, const uint8_t **pp_peek, int i_read ) 
    153153{ 
    154154    stream_sys_t *p_sys = s->p_sys; 
  • src/input/stream.c

    re98f560 r40785ca  
    168168/* Method 1: */ 
    169169static int  AStreamReadBlock( stream_t *s, void *p_read, int i_read ); 
    170 static int  AStreamPeekBlock( stream_t *s, uint8_t **p_peek, int i_read ); 
     170static int  AStreamPeekBlock( stream_t *s, const uint8_t **p_peek, int i_read ); 
    171171static int  AStreamSeekBlock( stream_t *s, int64_t i_pos ); 
    172172static void AStreamPrebufferBlock( stream_t *s ); 
     
    175175/* Method 2 */ 
    176176static int  AStreamReadStream( stream_t *s, void *p_read, int i_read ); 
    177 static int  AStreamPeekStream( stream_t *s, uint8_t **pp_peek, int i_read ); 
     177static int  AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, int i_read ); 
    178178static int  AStreamSeekStream( stream_t *s, int64_t i_pos ); 
    179179static void AStreamPrebufferStream( stream_t *s ); 
     
    706706} 
    707707 
    708 static int AStreamPeekBlock( stream_t *s, uint8_t **pp_peek, int i_read ) 
     708static int AStreamPeekBlock( stream_t *s, const uint8_t **pp_peek, int i_read ) 
    709709{ 
    710710    stream_sys_t *p_sys = s->p_sys; 
     
    10471047} 
    10481048 
    1049 static int AStreamPeekStream( stream_t *s, uint8_t **pp_peek, int i_read ) 
     1049static int AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, int i_read ) 
    10501050{ 
    10511051    stream_sys_t *p_sys = s->p_sys; 
     
    14021402    { 
    14031403        char *psz_eol; 
    1404         uint8_t *p_data; 
     1404        const uint8_t *p_data; 
    14051405        int i_data; 
    14061406        int64_t i_pos; 
     
    15051505        else 
    15061506        { 
    1507             uint8_t *p = p_data; 
    1508             uint8_t *p_last = p + i_data - s->i_char_width; 
     1507            const uint8_t *p = p_data; 
     1508            const uint8_t *p_last = p + i_data - s->i_char_width; 
    15091509 
    15101510            if( s->i_char_width == 2 ) 
     
    18381838 * p_input->i_bufsize) 
    18391839 */ 
    1840 int stream_Peek( stream_t *s, uint8_t **pp_peek, int i_peek ) 
     1840int stream_Peek( stream_t *s, const uint8_t **pp_peek, int i_peek ) 
    18411841{ 
    18421842    return s->pf_peek( s, pp_peek, i_peek );