};
VLC_EXPORT( int, stream_Read, ( stream_t *s, void *p_read, int i_read ) );
-VLC_EXPORT( int, stream_Peek, ( stream_t *s, uint8_t **pp_peek, int i_peek ) );
+VLC_EXPORT( int, stream_Peek, ( stream_t *s, const uint8_t **pp_peek, int i_peek ) );
VLC_EXPORT( int, stream_vaControl, ( stream_t *s, int i_query, va_list args ) );
VLC_EXPORT( void, stream_Delete, ( stream_t *s ) );
VLC_EXPORT( int, stream_Control, ( stream_t *s, int i_query, ... ) );
} d_stream_sys_t;
static int DStreamRead ( stream_t *, void *p_read, int i_read );
-static int DStreamPeek ( stream_t *, uint8_t **pp_peek, int i_peek );
+static int DStreamPeek ( stream_t *, const uint8_t **pp_peek, int i_peek );
static int DStreamControl( stream_t *, int i_query, va_list );
static int DStreamThread ( stream_t * );
return i_out;
}
-static int DStreamPeek( stream_t *s, uint8_t **pp_peek, int i_peek )
+static int DStreamPeek( stream_t *s, const uint8_t **pp_peek, int i_peek )
{
d_stream_sys_t *p_sys = (d_stream_sys_t*)s->p_sys;
block_t **pp_block = &p_sys->p_block;
****************************************************************************/
static void SkipID3Tag( demux_t *p_demux )
{
- uint8_t *p_peek;
+ const uint8_t *p_peek;
uint8_t version, revision;
int i_size;
int b_footer;
block_t *(*pf_block) ( stream_t *, int i_size );
int (*pf_read) ( stream_t *, void *p_read, int i_read );
- int (*pf_peek) ( stream_t *, uint8_t **pp_peek, int i_peek );
+ int (*pf_peek) ( stream_t *, const uint8_t **pp_peek, int i_peek );
int (*pf_control)( stream_t *, int i_query, va_list );
void (*pf_destroy)( stream_t *);
};
static int Read ( stream_t *, void *p_read, int i_read );
-static int Peek ( stream_t *, uint8_t **pp_peek, int i_read );
+static int Peek ( stream_t *, const uint8_t **pp_peek, int i_read );
static int Control( stream_t *, int i_query, va_list );
static void Delete ( stream_t * );
return i_res;
}
-static int Peek( stream_t *s, uint8_t **pp_peek, int i_read )
+static int Peek( stream_t *s, const uint8_t **pp_peek, int i_read )
{
stream_sys_t *p_sys = s->p_sys;
int i_res = __MIN( i_read, p_sys->i_size - p_sys->i_pos );
/* Method 1: */
static int AStreamReadBlock( stream_t *s, void *p_read, int i_read );
-static int AStreamPeekBlock( stream_t *s, uint8_t **p_peek, int i_read );
+static int AStreamPeekBlock( stream_t *s, const uint8_t **p_peek, int i_read );
static int AStreamSeekBlock( stream_t *s, int64_t i_pos );
static void AStreamPrebufferBlock( stream_t *s );
static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof );
/* Method 2 */
static int AStreamReadStream( stream_t *s, void *p_read, int i_read );
-static int AStreamPeekStream( stream_t *s, uint8_t **pp_peek, int i_read );
+static int AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, int i_read );
static int AStreamSeekStream( stream_t *s, int64_t i_pos );
static void AStreamPrebufferStream( stream_t *s );
static int AReadStream( stream_t *s, void *p_read, int i_read );
return i_data;
}
-static int AStreamPeekBlock( stream_t *s, uint8_t **pp_peek, int i_read )
+static int AStreamPeekBlock( stream_t *s, const uint8_t **pp_peek, int i_read )
{
stream_sys_t *p_sys = s->p_sys;
uint8_t *p_data;
return i_data;
}
-static int AStreamPeekStream( stream_t *s, uint8_t **pp_peek, int i_read )
+static int AStreamPeekStream( stream_t *s, const uint8_t **pp_peek, int i_read )
{
stream_sys_t *p_sys = s->p_sys;
stream_track_t *tk = &p_sys->stream.tk[p_sys->stream.i_tk];
while( i_read < STREAM_LINE_MAX )
{
char *psz_eol;
- uint8_t *p_data;
+ const uint8_t *p_data;
int i_data;
int64_t i_pos;
}
else
{
- uint8_t *p = p_data;
- uint8_t *p_last = p + i_data - s->i_char_width;
+ const uint8_t *p = p_data;
+ const uint8_t *p_last = p + i_data - s->i_char_width;
if( s->i_char_width == 2 )
{
* the end of the stream (but only when you have i_peek >=
* p_input->i_bufsize)
*/
-int stream_Peek( stream_t *s, uint8_t **pp_peek, int i_peek )
+int stream_Peek( stream_t *s, const uint8_t **pp_peek, int i_peek )
{
return s->pf_peek( s, pp_peek, i_peek );
}