Go to the documentation of this file.
25 #define VLC_STREAM_H 1
325 return (int64_t)1 << 62;
334 const char *ext = strrchr(
name,
'.' );
335 return ext != NULL && !
strcasecmp( ext, extension );
362 mime_type[strcspn( mime_type,
" ;" )] =
'\0';
394 size_t size,
bool preserve)
VLC_USED;
395 #define vlc_stream_MemoryNew(a, b, c, d) \
396 vlc_stream_MemoryNew(VLC_OBJECT(a), b, c, d)
404 #define vlc_stream_NewURL(a, b) vlc_stream_NewURL(VLC_OBJECT(a), b)
485 #define stream_FilterSetDefaultReadDir(stream) \
487 (stream)->pf_readdir = vlc_stream_FilterDefaultReadDir; \
arg1= bool * res=cannot fail
Definition: vlc_stream.h:142
res=can fail
Definition: vlc_stream.h:146
arg1=unsigned * res=can fail
Definition: vlc_stream.h:151
#define VLC_API
Definition: fourcc_gen.c:30
#define VLC_COMMON_MEMBERS
Backward compatibility macro.
Definition: vlc_common.h:457
ssize_t vlc_stream_ReadPartial(stream_t *, void *buf, size_t len)
Reads partial data from a byte stream.
Definition: stream.c:431
int vlc_stream_vaControl(stream_t *s, int query, va_list args)
Use to control the "stream_t *".
Definition: stream.c:655
static int vlc_stream_GetSize(stream_t *s, uint64_t *size)
Get the size of the stream.
Definition: vlc_stream.h:313
int strcasecmp(const char *, const char *)
arg1=bool, arg2=const char *psz_ext (if arg1 is true) res=can fail
Definition: vlc_stream.h:163
arg1=input_title_t*** arg2=int* res=can fail
Definition: vlc_stream.h:150
bool b_preparsing
True if this access is used to preparse.
Definition: vlc_stream.h:57
ssize_t vlc_stream_fifo_Write(stream_t *s, const void *buf, size_t len)
Writes data to a FIFO stream.
Definition: stream_fifo.c:160
bool vlc_stream_Eof(const stream_t *)
Checks for end of stream.
Definition: stream.c:586
arg1= int res=can fail
Definition: vlc_stream.h:160
#define vlc_stream_NewURL(a, b)
Definition: vlc_stream.h:404
arg1= int res=can fail
Definition: vlc_stream.h:159
arg1= bool res=can fail
Definition: vlc_stream.h:158
stream_query_e
Possible commands to send to vlc_stream_Control() and vlc_stream_vaControl()
Definition: vlc_stream.h:137
Definition: vlc_stream.h:166
static bool stream_HasExtension(stream_t *s, const char *extension)
Definition: vlc_stream.h:330
const char * psz_location
Location (URL with the scheme stripped)
Definition: vlc_stream.h:55
arg1= bool * res=cannot fail
Definition: vlc_stream.h:140
block_t * vlc_stream_ReadBlock(stream_t *)
Reads a data block from a byte stream.
Definition: stream.c:529
int(* pf_readdir)(stream_t *, input_item_node_t *)
Read directory.
Definition: vlc_stream.h:105
char * psz_name
Definition: vlc_stream.h:53
Definition: vlc_stream.h:165
module_t * p_module
Definition: vlc_stream.h:51
stream_t * vlc_stream_CommonNew(vlc_object_t *, void(*)(stream_t *))
Allocates a VLC stream object.
Definition: stream.c:67
ssize_t vlc_stream_Peek(stream_t *, const uint8_t **, size_t)
Peeks at data from a byte stream.
Internal module descriptor.
Definition: modules.h:79
stream_t * vlc_stream_fifo_New(vlc_object_t *parent)
Creates a FIFO stream.
Definition: stream_fifo.c:108
int(* pf_seek)(stream_t *, uint64_t)
Seek.
Definition: vlc_stream.h:114
char * psz_url
Full URL or MRL (can be NULL)
Definition: vlc_stream.h:54
#define vlc_stream_MemoryNew(a, b, c, d)
Definition: vlc_stream.h:395
int vlc_stream_FilterDefaultReadDir(stream_t *s, input_item_node_t *p_node)
Default ReadDir implementation for stream Filter.
Definition: stream_filter.c:117
int vlc_stream_ReadDir(stream_t *, input_item_node_t *)
Returns a node containing all the input_item of the directory pointer by this stream.
Definition: stream.c:721
static int vlc_stream_Control(stream_t *s, int query,...)
Definition: vlc_stream.h:287
input_thread_t * p_input
Definition: vlc_stream.h:131
stream_t definition
Definition: vlc_stream.h:46
arg1= vlc_meta_t * res=can fail
Definition: vlc_stream.h:153
int vlc_stream_Seek(stream_t *, uint64_t offset)
Sets the current stream position.
Definition: stream.c:593
ssize_t vlc_stream_Read(stream_t *, void *buf, size_t len)
Reads data from a byte stream.
Definition: stream.c:453
arg1= int64_t* res=cannot fail
Definition: vlc_stream.h:149
int(* pf_control)(stream_t *, int i_query, va_list)
Stream control.
Definition: vlc_stream.h:123
void vlc_stream_fifo_Close(stream_t *s)
Terminates a FIFO stream.
Definition: stream_fifo.c:170
stream_t * p_source
Definition: vlc_stream.h:60
int vlc_stream_fifo_Queue(stream_t *s, block_t *block)
Writes a block to a FIFO stream.
Definition: stream_fifo.c:138
arg1=unsigned * res=can fail
Definition: vlc_stream.h:152
The main vlc_object_t structure.
Definition: vlc_objects.h:39
block_t * vlc_stream_Block(stream_t *s, size_t)
Read data into a block.
Definition: stream.c:697
static char * stream_ContentType(stream_t *s)
Get the Content-Type of a stream, or NULL if unknown.
Definition: vlc_stream.h:342
#define VLC_USED
Definition: fourcc_gen.c:31
const char name[16]
Definition: httpd.c:1251
ssize_t(* pf_read)(stream_t *, void *buf, size_t len)
Read data.
Definition: vlc_stream.h:77
arg1= char ** res=can fail
Definition: vlc_stream.h:154
static int64_t stream_Size(stream_t *s)
Definition: vlc_stream.h:318
arg1= bool * res=cannot fail
Definition: vlc_stream.h:143
static char * stream_MimeType(stream_t *s)
Get the mime-type of a stream.
Definition: vlc_stream.h:357
Definition: vlc_stream.h:167
static bool stream_IsMimeType(stream_t *s, const char *type)
Checks for a MIME type.
Definition: vlc_stream.h:373
char * psz_filepath
Local file path (if applicable)
Definition: vlc_stream.h:56
arg1=double *pf_quality, arg2=double *pf_strength res=can fail
Definition: vlc_stream.h:155
uint64_t vlc_stream_Tell(const stream_t *)
Tells the current stream position.
Definition: stream.c:579
char * vlc_stream_ReadLine(stream_t *)
Definition: stream.c:172
arg1= uint64_t * res=can fail
Definition: vlc_stream.h:145
arg1=const block_t ** res=can fail
Definition: vlc_stream.h:156
arg1= bool * res=cannot fail
Definition: vlc_stream.h:141
void * p_sys
Private data pointer.
Definition: vlc_stream.h:128
Definition: vlc_block.h:111
stream_t * vlc_stream_FilterNew(stream_t *p_source, const char *psz_stream_filter)
Try to add a stream filter to an open stream.
Definition: stream_filter.c:38
void vlc_stream_Delete(stream_t *s)
Closes a byte stream.
Definition: stream.c:120