VLC  4.0.0-dev
stream.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * stream.h: Input stream functions
3  *****************************************************************************
4  * Copyright (C) 1998-2008 VLC authors and VideoLAN
5  * Copyright (C) 2008 Laurent Aimar
6  *
7  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23 
24 #ifndef LIBVLC_INPUT_STREAM_H
25 #define LIBVLC_INPUT_STREAM_H 1
26 
27 #include <vlc_common.h>
28 #include <vlc_stream.h>
29 #include "input_internal.h"
30 
32  void (*destroy)(stream_t *), size_t extra_size,
33  const char *type_name);
34 void *vlc_stream_Private(stream_t *stream);
35 
36 /* */
37 void stream_CommonDelete( stream_t *s );
38 
40  input_attachment_t *attachement);
41 
42 /**
43  * This function creates a raw stream_t from an URL.
44  */
46  const char *);
47 
48 /**
49  * Probes stream filters automatically.
50  *
51  * This function automatically and repeatedly probes for applicable stream
52  * filters to append downstream of an existing stream. Any such filter will
53  * convert the stream into another stream, e.g. decompressing it or extracting
54  * the list of contained files (playlist).
55  *
56  * This function transfers ownership of the supplied stream to the following
57  * stream filter, of the first stream filter to the second stream filter, and
58  * so on. Any attempt to access the original stream filter directly is
59  * explicitly undefined.
60  *
61  * If, and only if, no filters were probed succesfully, a pointer to the
62  * unchanged source stream will be returned. Otherwise, this returns a stream
63  * filter. The return value is thus guaranteed to be non-NULL.
64  *
65  * @param source input stream around which to build a filter chain
66  *
67  * @return the last, most downstream stream object.
68  *
69  * @note The return value must be freed with vlc_stream_Delete() after use.
70  * This will automatically free the whole chain and the underlying stream.
71  */
73 
74 /**
75  * Builds an explicit chain of stream filters.
76  *
77  * This function creates a chain of filters according to a supplied list.
78  *
79  * See also stream_FilterAutoNew(). Those two functions have identical
80  * semantics; the only difference lies in how the list of probed filters is
81  * determined (manually versus automatically).
82  *
83  * If the list is empty, or if probing each of the requested filters failed,
84  * this function will return a pointer to the supplied source stream.
85  *
86  * @param source input stream around which to build a filter chain
87  * @param list colon-separated list of stream filters (upstream first)
88  *
89  * @return The last stream (filter) in the chain.
90  * The return value is always a valid (non-NULL) stream pointer.
91  */
92 stream_t *stream_FilterChainNew( stream_t *source, const char *list ) VLC_USED;
93 
94 /**
95  * Attach \ref stream_extractor%s according to specified data
96  *
97  * This function will parse the passed data, and try to attach a \ref
98  * stream_extractor for each specified entity as per the fragment specification
99  * associated with a \ref mrl,
100  *
101  * \warning The data in `*stream` can be modified even if this function only
102  * locates some of the entities specified in `psz_data`. It is up to
103  * the caller to free the resource referred to by `*stream`, no matter
104  * what this function returns.
105  *
106  * \warning Please see \ref vlc_stream_extractor_Attach for a function that
107  * will not modify the passed stream upon failure. \ref
108  * stream_extractor_AttachParsed shall only be used when the caller
109  * only cares about the stream on successful attachment of **all**
110  * stream-extractors referred to by `psz_data`, something which is not
111  * guaranteed.
112  *
113  * \param[out] source a pointer-to-pointer to stream where the attached
114  * stream-extractor will be applied. `*stream` will refer
115  * to the last successful attachment.
116  * \param[out] out_extra `*out_extra` will point to any additional data
117  * in `psz_data` that does not specify an entity (if any).
118  * \return VLC_SUCCESS on success, an error-code on failure
119  **/
120 int stream_extractor_AttachParsed( stream_t** stream, const char* psz_data,
121  char const** out_extra );
122 
123 char *get_path(const char *location);
124 
125 #endif
vlc_iconv_t
void * vlc_iconv_t
Definition: vlc_charset.h:140
vlc_sd_probe_Add
int vlc_sd_probe_Add(vlc_probe_t *probe, const char *name, const char *longname, int category)
Definition: services_discovery.c:40
vlc_mutex_init
void vlc_mutex_init(vlc_mutex_t *mtx)
Initializes a fast mutex.
Definition: threads.c:123
vlc_stream_vaControl
int vlc_stream_vaControl(stream_t *s, int cmd, va_list args)
Use to control the "stream_t *".
Definition: stream.c:687
vlc_stream_Tell
uint64_t vlc_stream_Tell(const stream_t *s)
Tells the current stream position.
Definition: stream.c:611
count
size_t count
Definition: core.c:401
vlc_stream_CustomNew
stream_t * vlc_stream_CustomNew(vlc_object_t *parent, void(*destroy)(stream_t *), size_t extra_size, const char *type_name)
Allocates a VLC stream object.
Definition: stream.c:68
stream_CommonDelete
void stream_CommonDelete(stream_t *s)
Definition: stream.c:114
vlc_stream_Block
block_t * vlc_stream_Block(stream_t *s, size_t size)
Read data into a block.
Definition: stream.c:729
vlc_tls_SocketOpenTCP
vlc_tls_t * vlc_tls_SocketOpenTCP(vlc_object_t *obj, const char *name, unsigned port)
Creates a transport-layer TCP stream from a name and port.
Definition: stream.c:431
input_attachment_t
Definition: vlc_input.h:159
input_stats::displayed_pictures
atomic_uintmax_t displayed_pictures
Definition: input_internal.h:739
services_discovery_t
Main service discovery structure to build a SD module.
Definition: vlc_services_discovery.h:59
stream_priv_t::peek
block_t * peek
Definition: stream.c:72
input_stats_Destroy
void input_stats_Destroy(struct input_stats *stats)
Definition: stats.c:74
unlikely
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:227
vlc_common.h
vlc_tls_SocketGetFD
static int vlc_tls_SocketGetFD(vlc_tls_t *tls, short *restrict events)
Definition: stream.c:174
vlc_sendmsg
ssize_t vlc_sendmsg(int fd, const struct msghdr *msg, int flags)
Sends a socket message.
Definition: filesystem.c:374
vlc_tls_Read
ssize_t vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)
Receives data through a socket.
Definition: stream.c:53
vlc_probe
#define vlc_probe(obj, cap, pcount)
Definition: vlc_probe.h:37
block_TryRealloc
block_t * block_TryRealloc(block_t *p_block, ssize_t i_prebody, size_t i_body)
Definition: block.c:144
stream_t::pf_block
block_t *(* pf_block)(stream_t *, bool *eof)
Read data block.
Definition: vlc_stream.h:103
vlc_probe_t
Definition: vlc_probe.h:40
stats_GetRate
static float stats_GetRate(const input_rate_t *rate)
Definition: stats.c:45
vlc_iconv_close
VLC_EXPORT int vlc_iconv_close(vlc_iconv_t)
block_t::i_buffer
size_t i_buffer
Payload length.
Definition: vlc_block.h:122
vlc_interrupt.h
VLC_ICONV_ERR
#define VLC_ICONV_ERR
Definition: vlc_charset.h:139
vlc_sd_Destroy
void vlc_sd_Destroy(services_discovery_t *sd)
Definition: services_discovery.c:130
vlc_tls_socket_t
struct vlc_tls_socket vlc_tls_socket_t
input_stats::demux_discontinuity
atomic_uintmax_t demux_discontinuity
Definition: input_internal.h:734
vlc_access.h
pollfd::fd
int fd
Definition: vlc_fixups.h:419
vlc_stream_ReadRaw
static ssize_t vlc_stream_ReadRaw(stream_t *s, void *buf, size_t len)
Definition: stream.c:419
input_stats::decoded_video
atomic_uintmax_t decoded_video
Definition: input_internal.h:736
vlc_socketpair
int vlc_socketpair(int pf, int type, int proto, int fds[2], bool nonblock)
Creates a pair of socket file descriptors.
Definition: filesystem.c:335
STREAM_SET_SEEKPOINT
@ STREAM_SET_SEEKPOINT
arg1= int res=can fail
Definition: vlc_stream.h:167
vlc_tls_GetPollFD
static int vlc_tls_GetPollFD(vlc_tls_t *tls, short *events)
Generates an event polling description.
Definition: vlc_tls.h:314
pollfd
Definition: vlc_fixups.h:417
vlc_charset.h
input_rate_t::value
uintmax_t value
Definition: input_internal.h:722
stream_FilterChainNew
stream_t * stream_FilterChainNew(stream_t *source, const char *list)
Builds an explicit chain of stream filters.
Definition: stream_filter.c:109
input_stats_Compute
void input_stats_Compute(struct input_stats *stats, input_stats_t *st)
Definition: stats.c:79
vlc_tls
Transport layer socket.
Definition: vlc_tls.h:65
vlc_tls::p
struct vlc_tls * p
Reserved.
Definition: vlc_tls.h:70
vlc_tls_ConnectWrite
static ssize_t vlc_tls_ConnectWrite(vlc_tls_t *tls, const struct iovec *iov, unsigned count)
Definition: stream.c:359
vlc_sd_probe_t::category
int category
Definition: services_discovery.c:57
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:106
vlc_stream_ReadLine
char * vlc_stream_ReadLine(stream_t *s)
Definition: stream.c:187
input_stats_Create
struct input_stats * input_stats_Create(void)
Definition: stats.c:54
input_stats::lost_abuffers
atomic_uintmax_t lost_abuffers
Definition: input_internal.h:738
vlc_stream_AttachmentNew
stream_t * vlc_stream_AttachmentNew(vlc_object_t *p_this, input_attachment_t *attachement)
Definition: stream_memory.c:90
STREAM_SET_TITLE
@ STREAM_SET_TITLE
arg1= int res=can fail
Definition: vlc_stream.h:166
input_stats_t::i_decoded_video
int64_t i_decoded_video
Definition: vlc_input_item.h:525
input_stats_t
Definition: vlc_input_item.h:507
STREAM_LINE_MAX
#define STREAM_LINE_MAX
Definition: stream.c:186
stream_priv_t
struct stream_priv_t stream_priv_t
input_rate_t::lock
vlc_mutex_t lock
Definition: input_internal.h:720
vlc_tls_SocketWrite
static ssize_t vlc_tls_SocketWrite(vlc_tls_t *tls, const struct iovec *iov, unsigned count)
Definition: stream.c:195
VLC_EGENERIC
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:474
input_stats_t::i_lost_pictures
int64_t i_lost_pictures
Definition: vlc_input_item.h:530
input_stats_t::i_played_abuffers
int64_t i_played_abuffers
Definition: vlc_input_item.h:533
stream_priv_t::conv
vlc_iconv_t conv
Definition: stream.c:78
vlc_tls_socket_ops
static const struct vlc_tls_operations vlc_tls_socket_ops
Definition: stream.c:223
input_stats
Definition: input_internal.h:730
U16_AT
static uint16_t U16_AT(const void *p)
Reads 16 bits in network byte order.
Definition: vlc_common.h:985
input_stats::demux_corrupted
atomic_uintmax_t demux_corrupted
Definition: input_internal.h:733
vlc_stream_Peek
ssize_t vlc_stream_Peek(stream_t *s, const uint8_t **restrict bufp, size_t len)
Definition: stream.c:507
vlc_sd_Create
services_discovery_t * vlc_sd_Create(vlc_object_t *parent, const char *cfg, const struct services_discovery_owner_t *restrict owner)
Definition: services_discovery.c:106
vlc_sd_probe_t
Definition: services_discovery.c:33
input_stats_t::f_input_bitrate
float f_input_bitrate
Definition: vlc_input_item.h:514
services_discovery_t::p_module
module_t * p_module
Loaded module.
Definition: vlc_services_discovery.h:62
vlc_tls_SocketOpen
vlc_tls_t * vlc_tls_SocketOpen(int fd)
Creates a transport-layer stream from a socket.
Definition: stream.c:252
vlc_tls_SocketOpenAddrInfo
vlc_tls_t * vlc_tls_SocketOpenAddrInfo(const struct addrinfo *restrict info, bool defer_connect)
Definition: stream.c:408
net_Close
#define net_Close(fd)
Definition: vlc_network.h:57
vlc_stream_NewURL
stream_t *() vlc_stream_NewURL(vlc_object_t *p_parent, const char *psz_url)
Create a stream_t reading from a URL.
Definition: stream.c:141
stream_t::pf_readdir
int(* pf_readdir)(stream_t *, input_item_node_t *)
Read directory.
Definition: vlc_stream.h:113
stream_priv_t::char_width
unsigned char char_width
Definition: stream.c:79
vlc_tls_SessionDelete
void vlc_tls_SessionDelete(vlc_tls_t *session)
Destroys a TLS session.
Definition: tls.c:135
stream_priv_t::little_endian
bool little_endian
Definition: stream.c:80
msg_Warn
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:104
stream_priv_t
Definition: stream.c:46
es_out_t
Definition: vlc_es_out.h:143
input_stats_t::f_demux_bitrate
float f_demux_bitrate
Definition: vlc_input_item.h:519
input_stats_t::i_displayed_pictures
int64_t i_displayed_pictures
Definition: vlc_input_item.h:528
services_discovery_t::description
const char * description
Human-readable name.
Definition: vlc_services_discovery.h:67
stream_extractor_AttachParsed
int stream_extractor_AttachParsed(stream_t **stream, const char *psz_data, char const **out_extra)
Attach Stream Extractors according to specified data.
Definition: stream_extractor.c:342
vlc_tls_socket::peer
struct sockaddr peer[]
Definition: stream.c:171
vlc_iconv
VLC_EXPORT size_t vlc_iconv(vlc_iconv_t, const char **, size_t *, char **, size_t *)
vlc_tls_socket
Definition: stream.c:166
vlc_tick_now
vlc_tick_t vlc_tick_now(void)
Precision monotonic clock.
Definition: thread.c:261
input_rate_Init
static void input_rate_Init(input_rate_t *rate)
Create a statistics counter.
Definition: stats.c:36
input_stats_t::i_demux_discontinuity
int64_t i_demux_discontinuity
Definition: vlc_input_item.h:521
input_rate_t::samples
struct input_rate_t::@46 samples[2]
vlc_stream_ReadDir
int vlc_stream_ReadDir(stream_t *s, input_item_node_t *p_node)
Reads a directory.
Definition: stream.c:749
vlc_tls_GetLine
char * vlc_tls_GetLine(vlc_tls_t *session)
Receives a text line through a socket.
Definition: stream.c:133
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
block_Alloc
block_t * block_Alloc(size_t size)
Allocates a block.
Definition: block.c:108
input_stats::input_bitrate
input_rate_t input_bitrate
Definition: input_internal.h:731
POLLOUT
#define POLLOUT
Definition: vlc_fixups.h:415
stream_t::pf_seek
int(* pf_seek)(stream_t *, uint64_t)
Seek.
Definition: vlc_stream.h:124
stream_priv_t::private_data
max_align_t private_data[]
Definition: stream.c:83
vlc_tls_SocketRead
static ssize_t vlc_tls_SocketRead(vlc_tls_t *tls, struct iovec *iov, unsigned count)
Definition: stream.c:182
vlc_stream_CustomNew
stream_t * vlc_stream_CustomNew(vlc_object_t *parent, void(*destroy)(stream_t *), size_t size, const char *type_name)
Allocates a VLC stream object.
Definition: stream.c:68
stream_t::psz_url
char * psz_url
Full URL or MRL (can be NULL)
Definition: vlc_stream.h:51
stream_FilterAutoNew
stream_t * stream_FilterAutoNew(stream_t *source)
Probes stream filters automatically.
Definition: stream_filter.c:93
vlc_tls_SocketClose
static void vlc_tls_SocketClose(vlc_tls_t *tls)
Definition: stream.c:215
vlc_strerror_c
const char * vlc_strerror_c(int errnum)
Definition: error.c:34
vlc_tls_SocketShutdown
static int vlc_tls_SocketShutdown(vlc_tls_t *tls, bool duplex)
Definition: stream.c:208
vlc_sd_GetNames
char ** vlc_sd_GetNames(vlc_object_t *obj, char ***pppsz_longnames, int **pp_categories)
Gets the list of available services discovery plugins.
Definition: services_discovery.c:60
vlc_tls_GetFD
static int vlc_tls_GetFD(vlc_tls_t *tls)
Returns the underlying file descriptor.
Definition: vlc_tls.h:325
vlc_stream_extractor.h
VLC_TICK_INVALID
#define VLC_TICK_INVALID
Definition: vlc_config.h:44
input_rate_t
Definition: input_internal.h:718
vlc_iconv_open
VLC_EXPORT vlc_iconv_t vlc_iconv_open(const char *, const char *)
stream.h
pollfd::events
short events
Definition: vlc_fixups.h:420
recvmsg
ssize_t recvmsg(int, struct msghdr *, int)
vlc_getaddrinfo_i11e
int vlc_getaddrinfo_i11e(const char *name, unsigned port, const struct addrinfo *hints, struct addrinfo **res)
Definition: getaddrinfo.c:39
vlc_services_discovery.h
mrl_helpers.h
input_stats_t::i_demux_corrupted
int64_t i_demux_corrupted
Definition: vlc_input_item.h:520
vlc_tls_Write
ssize_t vlc_tls_Write(vlc_tls_t *session, const void *buf, size_t len)
Sends data through a socket.
Definition: stream.c:94
vlc_socket
int vlc_socket(int pf, int type, int proto, bool nonblock)
Creates a socket file descriptor.
Definition: filesystem.c:327
stream_t
stream_t definition
Definition: vlc_stream.h:46
vlc_killed
bool vlc_killed(void)
Checks if the interruption context was "killed".
Definition: interrupt.c:185
input_stats::demux_bitrate
input_rate_t demux_bitrate
Definition: input_internal.h:732
stream_t::s
stream_t * s
Input stream.
Definition: vlc_stream.h:65
max_align_t
Definition: vlc_fixups.h:136
POLLIN
#define POLLIN
Definition: vlc_fixups.h:414
input_stats::played_abuffers
atomic_uintmax_t played_abuffers
Definition: input_internal.h:737
vlc_stream_Seek
int vlc_stream_Seek(stream_t *s, uint64_t offset)
Sets the current stream position.
Definition: stream.c:625
services_discovery_t::owner
struct services_discovery_owner_t owner
Owner callbacks.
Definition: vlc_services_discovery.h:76
vlc_sd_probe_t::name
char * name
Definition: services_discovery.c:55
vlc_sd_probe_t::longname
char * longname
Definition: services_discovery.c:56
vlc_stream_Read
ssize_t vlc_stream_Read(stream_t *s, void *buf, size_t len)
Reads data from a byte stream.
Definition: stream.c:485
stream_AccessNew
stream_t * stream_AccessNew(vlc_object_t *parent, input_thread_t *input, es_out_t *out, bool preparsing, const char *url)
This function creates a raw stream_t from an URL.
Definition: access.c:291
vlc_tls_operations::writev
ssize_t(* writev)(struct vlc_tls *, const struct iovec *iov, unsigned len)
Callback for sending data.
Definition: vlc_tls.h:107
stream_t::pf_control
int(* pf_control)(stream_t *, int i_query, va_list)
Stream control.
Definition: vlc_stream.h:133
stream_priv_t::stream
stream_t stream
Definition: stream.c:69
input_stats_t::i_late_pictures
int64_t i_late_pictures
Definition: vlc_input_item.h:529
services_discovery_owner_t
Definition: vlc_services_discovery.h:50
STREAM_PROBE_LINE
#define STREAM_PROBE_LINE
Read from the stream until first newline.
Definition: stream.c:185
stream_t::p_input_item
input_item_t * p_input_item
Input item (can be NULL)
Definition: vlc_stream.h:55
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
config_ChainCreate
char * config_ChainCreate(char **ppsz_name, config_chain_t **pp_cfg, const char *psz_chain)
This function will parse a configuration string (psz_string) and.
Definition: chain.c:225
VLC_ENOMEM
#define VLC_ENOMEM
Not enough memory.
Definition: vlc_common.h:476
vlc_probe.h
vlc_tls_SocketPair
int vlc_tls_SocketPair(int family, int protocol, vlc_tls_t *pair[2])
Creates a connected pair of transport-layer sockets.
Definition: stream.c:257
config_ChainDestroy
void config_ChainDestroy(config_chain_t *p_cfg)
This function will release a linked list of config_chain_t (Including the head)
Definition: chain.c:253
VLC_UNUSED
#define VLC_UNUSED(x)
Definition: vlc_common.h:1105
input_rate_Add
void input_rate_Add(input_rate_t *counter, uintmax_t val)
Update a counter element with new values.
Definition: stats.c:121
vlc_stream.h
vlc_tls_WaitConnect
static int vlc_tls_WaitConnect(vlc_tls_t *tls)
Waits for pending transport layer socket connection.
Definition: stream.c:307
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:472
strdup
char * strdup(const char *)
vlc_tls_socket::tls
struct vlc_tls tls
Definition: stream.c:168
VLC_USED
#define VLC_USED
Definition: fourcc_gen.c:32
vlc_custom_create
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:117
VLC_TICK_FROM_SEC
#define VLC_TICK_FROM_SEC(sec)
Definition: vlc_tick.h:52
stream_priv_t::text
struct stream_priv_t::@47 text
vlc_block.h
vlc_mutex_lock
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition: threads.c:158
list
module_config_t ** list
Definition: core.c:400
name
const char name[16]
Definition: httpd.c:1268
stream_t::pf_read
ssize_t(* pf_read)(stream_t *, void *buf, size_t len)
Read data.
Definition: vlc_stream.h:85
services_discovery_t::p_cfg
config_chain_t * p_cfg
Configuration for the SD.
Definition: vlc_services_discovery.h:65
vlc_tls_socket_fastopen_ops
static const struct vlc_tls_operations vlc_tls_socket_fastopen_ops
Definition: stream.c:399
SOL_TCP
#define SOL_TCP
Definition: stream.c:46
VLC_PROBE_CONTINUE
#define VLC_PROBE_CONTINUE
Definition: vlc_probe.h:63
vlc_stream_ReadBlock
block_t * vlc_stream_ReadBlock(stream_t *s)
Reads a data block from a byte stream.
Definition: stream.c:561
input_stats::decoded_audio
atomic_uintmax_t decoded_audio
Definition: input_internal.h:735
vlc_tls_SocketAlloc
static vlc_tls_t * vlc_tls_SocketAlloc(int fd, const struct sockaddr *restrict peer, socklen_t peerlen)
Definition: stream.c:232
vlc_tls_socket::peerlen
socklen_t peerlen
Definition: stream.c:170
vlc_stream_Private
void * vlc_stream_Private(stream_t *stream)
Definition: stream.c:103
vlc_tls.h
vlc_poll_i11e
int vlc_poll_i11e(struct pollfd *fds, unsigned nfds, int timeout)
Interruptible variant of poll().
Definition: interrupt.c:367
vlc_tls_SocketAddrInfo
static vlc_tls_t * vlc_tls_SocketAddrInfo(const struct addrinfo *restrict info)
Allocates an unconnected transport layer socket.
Definition: stream.c:286
input_stats::lost_pictures
atomic_uintmax_t lost_pictures
Definition: input_internal.h:741
vlc_stream_CommonNew
stream_t * vlc_stream_CommonNew(vlc_object_t *parent, void(*destroy)(stream_t *))
Definition: stream.c:108
services_discovery_t::psz_name
char * psz_name
Main name of the SD.
Definition: vlc_services_discovery.h:64
vlc_stream_Delete
void vlc_stream_Delete(stream_t *s)
Destroy a stream.
Definition: stream.c:133
input_stats::late_pictures
atomic_uintmax_t late_pictures
Definition: input_internal.h:740
input_stats_t::i_read_bytes
int64_t i_read_bytes
Definition: vlc_input_item.h:513
stream_priv_t::offset
uint64_t offset
Definition: stream.c:73
vlc_tls_Connect
static ssize_t vlc_tls_Connect(vlc_tls_t *tls)
Connects a transport layer socket.
Definition: stream.c:342
input_rate_t::updates
uintmax_t updates
Definition: input_internal.h:721
get_path
char * get_path(const char *location)
Definition: access.c:51
libvlc.h
vlc_stream_NewMRL
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).
Definition: stream.c:154
vlc_object_delete
#define vlc_object_delete(obj)
Definition: vlc_objects.h:136
stream_CommonDelete
void stream_CommonDelete(stream_t *s)
Definition: stream.c:114
vlc_tls_operations
Definition: vlc_tls.h:73
likely
#define likely(p)
Predicted true condition.
Definition: vlc_common.h:218
vlc_tls_operations::readv
ssize_t(* readv)(struct vlc_tls *, struct iovec *iov, unsigned len)
Callback for receiving data.
Definition: vlc_tls.h:93
input_stats_t::i_lost_abuffers
int64_t i_lost_abuffers
Definition: vlc_input_item.h:534
stream_AccessNew
stream_t * stream_AccessNew(vlc_object_t *, input_thread_t *, es_out_t *, bool, const char *)
This function creates a raw stream_t from an URL.
Definition: access.c:291
vlc_stream_Eof
bool vlc_stream_Eof(const stream_t *s)
Checks for end of stream.
Definition: stream.c:618
block_t::p_buffer
uint8_t * p_buffer
Payload start.
Definition: vlc_block.h:121
stream_priv_t::block
block_t * block
Definition: stream.c:71
vlc_tls_socket::fd
int fd
Definition: stream.c:169
vlc_probe_add
static int vlc_probe_add(vlc_probe_t *obj, const void *data, size_t len)
Definition: vlc_probe.h:50
input_thread_t
Main structure representing an input thread.
Definition: input_internal.h:48
input_item_node_t
Definition: vlc_input_item.h:194
vlc_stream_Private
void * vlc_stream_Private(stream_t *stream)
Definition: stream.c:103
vlc_alloc
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1144
stream_priv_t::destroy
void(* destroy)(stream_t *)
Definition: stream.c:70
module_unneed
#define module_unneed(a, b)
Definition: vlc_modules.h:126
input_stats_t::i_read_packets
int64_t i_read_packets
Definition: vlc_input_item.h:512
vlc_stream_CopyBlock
static ssize_t vlc_stream_CopyBlock(block_t **restrict pp, void *buf, size_t len)
Definition: stream.c:393
input_internal.h
block_Release
void block_Release(block_t *block)
Releases a block.
Definition: block.c:135
input_stats_t::i_demux_read_bytes
int64_t i_demux_read_bytes
Definition: vlc_input_item.h:518
vlc_mutex_unlock
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition: threads.c:209
stream_t::p_sys
void * p_sys
Private data pointer.
Definition: vlc_stream.h:138
input_rate_t::date
vlc_tick_t date
Definition: input_internal.h:726
block_t
Definition: vlc_block.h:117
vlc_tls::ops
const struct vlc_tls_operations * ops
Callbacks to operate on the stream.
Definition: vlc_tls.h:68
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:102
input_stats_t::i_decoded_audio
int64_t i_decoded_audio
Definition: vlc_input_item.h:524
vlc_stream_ReadPartial
ssize_t vlc_stream_ReadPartial(stream_t *s, void *buf, size_t len)
Reads partial data from a byte stream.
Definition: stream.c:463
module_need
#define module_need(a, b, c, d)
Definition: vlc_modules.h:111
stream_priv_t::eof
bool eof
Definition: stream.c:74
p
#define p(t)
vlc_modules.h