stream.c File Reference

Include dependency graph for stream.c:


Data Structures

struct  stream_track_t
struct  access_entry_t
struct  stream_sys_t

Defines

#define STREAM_CACHE_TRACK   3
#define STREAM_CACHE_SIZE   (4*STREAM_CACHE_TRACK*1024*1024)
#define STREAM_CACHE_PREBUFFER_SIZE   (32767)
#define STREAM_CACHE_PREBUFFER_LENGTH   (100*1000)
#define STREAM_DATA_WAIT   40000
#define STREAM_READ_ATONCE   32767
#define STREAM_CACHE_TRACK_SIZE   (STREAM_CACHE_SIZE/STREAM_CACHE_TRACK)
#define STREAM_PROBE_LINE   2048
 Read from the stream untill first newline.
#define STREAM_LINE_MAX   (2048*100)

Enumerations

enum  stream_read_method_t { Immediate, Block, Stream }

Functions

static int AStreamReadBlock (stream_t *s, void *p_read, unsigned int i_read)
static int AStreamPeekBlock (stream_t *s, const uint8_t **p_peek, unsigned int i_read)
static int AStreamSeekBlock (stream_t *s, int64_t i_pos)
static void AStreamPrebufferBlock (stream_t *s)
static block_tAReadBlock (stream_t *s, bool *pb_eof)
static int AStreamReadStream (stream_t *s, void *p_read, unsigned int i_read)
static int AStreamPeekStream (stream_t *s, const uint8_t **pp_peek, unsigned 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, unsigned int i_read)
static int AStreamReadImmediate (stream_t *s, void *p_read, unsigned int i_read)
static int AStreamPeekImmediate (stream_t *s, const uint8_t **pp_peek, unsigned int i_read)
static int AStreamSeekImmediate (stream_t *s, int64_t i_pos)
static int AStreamControl (stream_t *s, int i_query, va_list)
static void AStreamDestroy (stream_t *s)
static void UStreamDestroy (stream_t *s)
static int ASeek (stream_t *s, int64_t i_pos)
static int64_t stream_buffered_size (stream_t *s)
static void stream_buffer_empty (stream_t *s, int length)
static void stream_buffer_fill (stream_t *s, int length)
static uint8_t * stream_buffer (stream_t *s)
stream_t__stream_UrlNew (vlc_object_t *p_parent, const char *psz_url)
stream_tstream_AccessNew (access_t *p_access, bool b_quick)
void stream_AccessReset (stream_t *s)
void stream_AccessUpdate (stream_t *s)
static int AStreamRefillBlock (stream_t *s)
static int AStreamRefillStream (stream_t *s)
char * stream_ReadLine (stream_t *s)
int stream_Read (stream_t *s, void *p_read, int i_read)
 Try to read "i_read" bytes into a buffer pointed by "p_read".
int stream_Peek (stream_t *s, const uint8_t **pp_peek, int i_peek)
 Store in pp_peek a pointer to the next "i_peek" bytes in the stream.
int stream_vaControl (stream_t *s, int i_query, va_list args)
 Use to control the "stream_t *".
void stream_Delete (stream_t *s)
 Destroy a stream.
int stream_Control (stream_t *s, int i_query,...)
block_tstream_Block (stream_t *s, int i_size)
 Read "i_size" bytes and store them in a block_t.

Define Documentation

#define STREAM_CACHE_PREBUFFER_LENGTH   (100*1000)

#define STREAM_CACHE_PREBUFFER_SIZE   (32767)

#define STREAM_CACHE_SIZE   (4*STREAM_CACHE_TRACK*1024*1024)

#define STREAM_CACHE_TRACK   3

#define STREAM_CACHE_TRACK_SIZE   (STREAM_CACHE_SIZE/STREAM_CACHE_TRACK)

#define STREAM_DATA_WAIT   40000

#define STREAM_LINE_MAX   (2048*100)

#define STREAM_PROBE_LINE   2048

Read from the stream untill first newline.

Parameters:
s Stream handle to read from
Returns:
A pointer to the allocated output string. You need to free this when you are done.

#define STREAM_READ_ATONCE   32767


Enumeration Type Documentation

enum stream_read_method_t

Enumerator:
Immediate 
Block 
Stream 


Function Documentation

static block_t * AReadBlock ( stream_t s,
bool *  pb_eof 
) [static]

static int AReadStream ( stream_t s,
void *  p_read,
unsigned int  i_read 
) [static]

static int ASeek ( stream_t s,
int64_t  i_pos 
) [static]

static int AStreamControl ( stream_t s,
int  i_query,
va_list   
) [static]

static void AStreamDestroy ( stream_t s  )  [static]

static int AStreamPeekBlock ( stream_t s,
const uint8_t **  p_peek,
unsigned int  i_read 
) [static]

static int AStreamPeekImmediate ( stream_t s,
const uint8_t **  pp_peek,
unsigned int  i_read 
) [static]

static int AStreamPeekStream ( stream_t s,
const uint8_t **  pp_peek,
unsigned int  i_read 
) [static]

static void AStreamPrebufferBlock ( stream_t s  )  [static]

static void AStreamPrebufferStream ( stream_t s  )  [static]

static int AStreamReadBlock ( stream_t s,
void *  p_read,
unsigned int  i_read 
) [static]

static int AStreamReadImmediate ( stream_t s,
void *  p_read,
unsigned int  i_read 
) [static]

static int AStreamReadStream ( stream_t s,
void *  p_read,
unsigned int  i_read 
) [static]

static int AStreamRefillBlock ( stream_t s  )  [static]

static int AStreamRefillStream ( stream_t s  )  [static]

static int AStreamSeekBlock ( stream_t s,
int64_t  i_pos 
) [static]

static int AStreamSeekImmediate ( stream_t s,
int64_t  i_pos 
) [static]

static int AStreamSeekStream ( stream_t s,
int64_t  i_pos 
) [static]

stream_t* stream_AccessNew ( access_t p_access,
bool  b_quick 
)

void stream_AccessReset ( stream_t s  ) 

void stream_AccessUpdate ( stream_t s  ) 

static uint8_t* stream_buffer ( stream_t s  )  [inline, static]

static void stream_buffer_empty ( stream_t s,
int  length 
) [inline, static]

static void stream_buffer_fill ( stream_t s,
int  length 
) [inline, static]

static int64_t stream_buffered_size ( stream_t s  )  [inline, static]

static void UStreamDestroy ( stream_t s  )  [static]


Generated on Wed Aug 13 08:05:35 2008 for VLC by  doxygen 1.5.1