VLC  4.0.0-dev
Data Fields
stream_t Struct Reference

stream_t definition More...

Collaboration diagram for stream_t:
Collaboration graph

Data Fields

struct vlc_object_t obj
char * psz_name
char * psz_url
 Full URL or MRL (can be NULL) More...
const char * psz_location
 Location (URL with the scheme stripped) More...
char * psz_filepath
 Local file path (if applicable) More...
bool b_preparsing
 True if this access is used to preparse. More...
 Input item (can be NULL) More...
 Input stream. More...
ssize_t(* pf_read )(stream_t *, void *buf, size_t len)
 Read data. More...
block_t *(* pf_block )(stream_t *, bool *eof)
 Read data block. More...
int(* pf_readdir )(stream_t *, input_item_node_t *)
 Read directory. More...
int(* pf_demux )(stream_t *)
int(* pf_seek )(stream_t *, uint64_t)
 Seek. More...
int(* pf_control )(stream_t *, int i_query, va_list)
 Stream control. More...
void * p_sys
 Private data pointer. More...

Detailed Description

stream_t definition

Field Documentation

◆ b_preparsing

bool stream_t::b_preparsing

True if this access is used to preparse.

Referenced by access_New(), and demux_NewAdvanced().

◆ obj

struct vlc_object_t stream_t::obj

Referenced by demux_Probe().

◆ out

es_out_t* stream_t::out

◆ p_input_item

input_item_t* stream_t::p_input_item

◆ p_sys

void* stream_t::p_sys

◆ pf_block

block_t*(* stream_t::pf_block) (stream_t *, bool *eof)

Read data block.

Callback to read a block of data. The data is read into a block of memory allocated by the stream. For some streams, data can be read more efficiently in block of a certain size, and/or using a custom allocator for buffers. In such case, this callback should be provided instead of stream_t::pf_read; otherwise, this should be NULL.

eofstorage space for end-of-stream flag [OUT] (*eof is always false when invoking pf_block(); pf_block() should set *eof to true if it detects the end of the stream)
a data block, NULL if no data available yet, on error and at end-of-stream

Referenced by InputDemuxNew(), Open(), se_InitStream(), stream_AccessNew(), vlc_stream_fifo_New(), vlc_stream_FilterNew(), vlc_stream_ReadBlock(), vlc_stream_ReadLine(), and vlc_stream_ReadRaw().

◆ pf_control

int(* stream_t::pf_control) (stream_t *, int i_query, va_list)

◆ pf_demux

int(* stream_t::pf_demux) (stream_t *)

◆ pf_read

ssize_t(* stream_t::pf_read) (stream_t *, void *buf, size_t len)

Read data.

Callback to read data from the stream into a caller-supplied buffer.

This may be NULL if the stream is actually a directory rather than a byte stream, or if stream_t::pf_block is non-NULL.

bufbuffer to read data into
lenbuffer length (in bytes)
Return values
-1no data available yet
0end of stream (incl. fatal error)
positivenumber of bytes read (no more than len)

Referenced by InputDemuxNew(), Open(), se_InitStream(), stream_AccessNew(), vlc_stream_AttachmentNew(), vlc_stream_FilterNew(), vlc_stream_MemoryNew(), vlc_stream_ReadBlock(), vlc_stream_ReadLine(), and vlc_stream_ReadRaw().

◆ pf_readdir

int(* stream_t::pf_readdir) (stream_t *, input_item_node_t *)

Read directory.

Callback to fill an item node from a directory (see doc/browsing.txt for details).

NULL if the stream is not a directory.

Referenced by demux_Demux(), demux_NewAdvanced(), InputDemuxNew(), MainLoop(), Preparse(), se_InitDirectory(), and vlc_stream_ReadDir().

◆ pf_seek

int(* stream_t::pf_seek) (stream_t *, uint64_t)


Callback to set the stream pointer (in bytes from start).

May be NULL if seeking is not supported.

Referenced by Open(), se_InitStream(), stream_AccessNew(), vlc_stream_AttachmentNew(), vlc_stream_fifo_New(), vlc_stream_MemoryNew(), and vlc_stream_Seek().

◆ psz_filepath

char* stream_t::psz_filepath

◆ psz_location

const char* stream_t::psz_location

Location (URL with the scheme stripped)

Referenced by access_New(), accessNewAttachment(), demux_FilterNew(), demux_IsPathExtension(), demux_NewAdvanced(), and OpenURL().

◆ psz_name

char* stream_t::psz_name

◆ psz_url

char* stream_t::psz_url

◆ s

stream_t* stream_t::s

Input stream.

Depending on the module capability:

  • "stream filter" or "demux": input byte stream (not NULL)
  • "access": a NULL pointer
  • "demux_filter": upstream demuxer or demux filter

Referenced by demux_DestroyDemux(), demux_FilterNew(), demux_IsContentType(), demux_NewAdvanced(), demux_Probe(), demux_UpdateTitleFromStream(), OpenSDP(), and StreamDelete().

The documentation for this struct was generated from the following file: