VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
stream_memory.c File Reference
Include dependency graph for stream_memory.c:

Data Structures

struct  stream_sys_t

Functions

static int Read (stream_t *, void *p_read, unsigned int i_read)
static int Peek (stream_t *, const uint8_t **pp_peek, unsigned int i_read)
static int Control (stream_t *, int i_query, va_list)
static void Delete (stream_t *)
stream_tstream_MemoryNew (((vlc_object_t *)(vlc_object_t *p_this)), uint8_t *p_buffer, uint64_t i_size, bool i_preserve_memory)
 Create a stream from a memory buffer.

Function Documentation

static int Control ( stream_t s,
int  i_query,
va_list  args 
)
static
static void Delete ( stream_t s)
static
static int Peek ( stream_t s,
const uint8_t **  pp_peek,
unsigned int  i_read 
)
static
static int Read ( stream_t s,
void *  p_read,
unsigned int  i_read 
)
static
stream_t* stream_MemoryNew ( ((vlc_object_t *)(vlc_object_t *p_this))  ,
uint8_t *  p_buffer,
uint64_t  i_size,
bool  i_preserve_memory 
)

Create a stream from a memory buffer.

Parameters
p_thisthe calling vlc_object
p_bufferthe memory buffer for the stream
i_bufferthe size of the buffer
i_preserve_memoryif this is set to false the memory buffer pointed to by p_buffer is freed on stream_Destroy

References Control(), Delete(), stream_sys_t::i_pos, stream_sys_t::i_preserve_memory, stream_sys_t::i_size, stream_sys_t::p_buffer, stream_t::p_input, stream_t::p_sys, Peek(), stream_t::pf_control, stream_t::pf_destroy, stream_t::pf_peek, stream_t::pf_read, stream_t::psz_path, Read(), strdup(), stream_CommonDelete(), and stream_CommonNew().