Changeset 40785cad487daf4df6418b07f28bdd03d1ca3f03
- 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
| rf397fdb |
r40785ca |
|
| 66 | 66 | |
|---|
| 67 | 67 | VLC_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 ) ); |
|---|
| | 68 | VLC_EXPORT( int, stream_Peek, ( stream_t *s, const uint8_t **pp_peek, int i_peek ) ); |
|---|
| 69 | 69 | VLC_EXPORT( int, stream_vaControl, ( stream_t *s, int i_query, va_list args ) ); |
|---|
| 70 | 70 | VLC_EXPORT( void, stream_Delete, ( stream_t *s ) ); |
|---|
| ra8a47dd |
r40785ca |
|
| 298 | 298 | |
|---|
| 299 | 299 | static int DStreamRead ( stream_t *, void *p_read, int i_read ); |
|---|
| 300 | | static int DStreamPeek ( stream_t *, uint8_t **pp_peek, int i_peek ); |
|---|
| | 300 | static int DStreamPeek ( stream_t *, const uint8_t **pp_peek, int i_peek ); |
|---|
| 301 | 301 | static int DStreamControl( stream_t *, int i_query, va_list ); |
|---|
| 302 | 302 | static int DStreamThread ( stream_t * ); |
|---|
| … | … | |
| 420 | 420 | } |
|---|
| 421 | 421 | |
|---|
| 422 | | static int DStreamPeek( stream_t *s, uint8_t **pp_peek, int i_peek ) |
|---|
| | 422 | static int DStreamPeek( stream_t *s, const uint8_t **pp_peek, int i_peek ) |
|---|
| 423 | 423 | { |
|---|
| 424 | 424 | d_stream_sys_t *p_sys = (d_stream_sys_t*)s->p_sys; |
|---|
| … | … | |
| 546 | 546 | static void SkipID3Tag( demux_t *p_demux ) |
|---|
| 547 | 547 | { |
|---|
| 548 | | uint8_t *p_peek; |
|---|
| | 548 | const uint8_t *p_peek; |
|---|
| 549 | 549 | uint8_t version, revision; |
|---|
| 550 | 550 | int i_size; |
|---|
| r0fb0c8e |
r40785ca |
|
| 366 | 366 | block_t *(*pf_block) ( stream_t *, int i_size ); |
|---|
| 367 | 367 | 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 ); |
|---|
| 369 | 369 | int (*pf_control)( stream_t *, int i_query, va_list ); |
|---|
| 370 | 370 | void (*pf_destroy)( stream_t *); |
|---|
| r9b6b0df |
r40785ca |
|
| 37 | 37 | |
|---|
| 38 | 38 | static int Read ( stream_t *, void *p_read, int i_read ); |
|---|
| 39 | | static int Peek ( stream_t *, uint8_t **pp_peek, int i_read ); |
|---|
| | 39 | static int Peek ( stream_t *, const uint8_t **pp_peek, int i_read ); |
|---|
| 40 | 40 | static int Control( stream_t *, int i_query, va_list ); |
|---|
| 41 | 41 | static void Delete ( stream_t * ); |
|---|
| … | … | |
| 150 | 150 | } |
|---|
| 151 | 151 | |
|---|
| 152 | | static int Peek( stream_t *s, uint8_t **pp_peek, int i_read ) |
|---|
| | 152 | static int Peek( stream_t *s, const uint8_t **pp_peek, int i_read ) |
|---|
| 153 | 153 | { |
|---|
| 154 | 154 | stream_sys_t *p_sys = s->p_sys; |
|---|
| re98f560 |
r40785ca |
|
| 168 | 168 | /* Method 1: */ |
|---|
| 169 | 169 | static 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 ); |
|---|
| | 170 | static int AStreamPeekBlock( stream_t *s, const uint8_t **p_peek, int i_read ); |
|---|
| 171 | 171 | static int AStreamSeekBlock( stream_t *s, int64_t i_pos ); |
|---|
| 172 | 172 | static void AStreamPrebufferBlock( stream_t *s ); |
|---|
| … | … | |
| 175 | 175 | /* Method 2 */ |
|---|
| 176 | 176 | static 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 ); |
|---|
| | 177 | static int AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, int i_read ); |
|---|
| 178 | 178 | static int AStreamSeekStream( stream_t *s, int64_t i_pos ); |
|---|
| 179 | 179 | static void AStreamPrebufferStream( stream_t *s ); |
|---|
| … | … | |
| 706 | 706 | } |
|---|
| 707 | 707 | |
|---|
| 708 | | static int AStreamPeekBlock( stream_t *s, uint8_t **pp_peek, int i_read ) |
|---|
| | 708 | static int AStreamPeekBlock( stream_t *s, const uint8_t **pp_peek, int i_read ) |
|---|
| 709 | 709 | { |
|---|
| 710 | 710 | stream_sys_t *p_sys = s->p_sys; |
|---|
| … | … | |
| 1047 | 1047 | } |
|---|
| 1048 | 1048 | |
|---|
| 1049 | | static int AStreamPeekStream( stream_t *s, uint8_t **pp_peek, int i_read ) |
|---|
| | 1049 | static int AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, int i_read ) |
|---|
| 1050 | 1050 | { |
|---|
| 1051 | 1051 | stream_sys_t *p_sys = s->p_sys; |
|---|
| … | … | |
| 1402 | 1402 | { |
|---|
| 1403 | 1403 | char *psz_eol; |
|---|
| 1404 | | uint8_t *p_data; |
|---|
| | 1404 | const uint8_t *p_data; |
|---|
| 1405 | 1405 | int i_data; |
|---|
| 1406 | 1406 | int64_t i_pos; |
|---|
| … | … | |
| 1505 | 1505 | else |
|---|
| 1506 | 1506 | { |
|---|
| 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; |
|---|
| 1509 | 1509 | |
|---|
| 1510 | 1510 | if( s->i_char_width == 2 ) |
|---|
| … | … | |
| 1838 | 1838 | * p_input->i_bufsize) |
|---|
| 1839 | 1839 | */ |
|---|
| 1840 | | int stream_Peek( stream_t *s, uint8_t **pp_peek, int i_peek ) |
|---|
| | 1840 | int stream_Peek( stream_t *s, const uint8_t **pp_peek, int i_peek ) |
|---|
| 1841 | 1841 | { |
|---|
| 1842 | 1842 | return s->pf_peek( s, pp_peek, i_peek ); |
|---|