VLC 4.0.0-dev
stream.c File Reference
Include dependency graph for stream.c:

Data Structures

struct  stream_priv_t
 

Macros

#define stream_priv(s)   container_of(s, stream_priv_t, stream)
 
#define STREAM_PROBE_LINE   2048
 Read from the stream until first newline. More...
 
#define STREAM_LINE_MAX   (2048*100)
 

Typedefs

typedef struct stream_priv_t stream_priv_t
 

Functions

stream_tvlc_stream_CustomNew (vlc_object_t *parent, void(*destroy)(stream_t *), size_t size, const char *type_name)
 Allocates a VLC stream object. More...
 
void * vlc_stream_Private (stream_t *stream)
 
stream_tvlc_stream_CommonNew (vlc_object_t *parent, void(*destroy)(stream_t *))
 
void stream_CommonDelete (stream_t *s)
 
void vlc_stream_Delete (stream_t *s)
 Destroy a stream. More...
 
stream_t *() vlc_stream_NewURL (vlc_object_t *p_parent, const char *psz_url)
 Create a stream_t reading from a URL. More...
 
stream_t *() vlc_stream_NewMRL (vlc_object_t *parent, const char *mrl)
 Create a stream for the data referred to by a Media Resource Locator (MRL). More...
 
char * vlc_stream_ReadLine (stream_t *s)
 
static ssize_t vlc_stream_CopyBlock (block_t **restrict pp, void *buf, size_t len)
 
static ssize_t vlc_stream_ReadRaw (stream_t *s, void *buf, size_t len)
 
ssize_t vlc_stream_ReadPartial (stream_t *s, void *buf, size_t len)
 Reads partial data from a byte stream. More...
 
ssize_t vlc_stream_Read (stream_t *s, void *buf, size_t len)
 Reads data from a byte stream. More...
 
ssize_t vlc_stream_Peek (stream_t *s, const uint8_t **restrict bufp, size_t len)
 
block_tvlc_stream_ReadBlock (stream_t *s)
 Reads a data block from a byte stream. More...
 
uint64_t vlc_stream_Tell (const stream_t *s)
 Tells the current stream position. More...
 
bool vlc_stream_Eof (const stream_t *s)
 Checks for end of stream. More...
 
int vlc_stream_Seek (stream_t *s, uint64_t offset)
 Sets the current stream position. More...
 
int vlc_stream_vaControl (stream_t *s, int cmd, va_list args)
 Use to control the "stream_t *". More...
 
block_tvlc_stream_Block (stream_t *s, size_t size)
 Read data into a block. More...
 
int vlc_stream_ReadDir (stream_t *s, input_item_node_t *p_node)
 Reads a directory. More...
 

Macro Definition Documentation

◆ STREAM_LINE_MAX

#define STREAM_LINE_MAX   (2048*100)

◆ stream_priv

#define stream_priv (   s)    container_of(s, stream_priv_t, stream)

◆ STREAM_PROBE_LINE

#define STREAM_PROBE_LINE   2048

Read from the stream until first newline.

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

Typedef Documentation

◆ stream_priv_t

typedef struct stream_priv_t stream_priv_t

Function Documentation

◆ stream_CommonDelete()

◆ vlc_stream_CopyBlock()

static ssize_t vlc_stream_CopyBlock ( block_t **restrict  pp,
void *  buf,
size_t  len 
)
static

◆ vlc_stream_CustomNew()

◆ vlc_stream_Peek()

ssize_t vlc_stream_Peek ( stream_t s,
const uint8_t **restrict  bufp,
size_t  len 
)

◆ vlc_stream_Private()

◆ vlc_stream_ReadRaw()