Go to the documentation of this file.
27 #define _DEFAULT_SOURCE
46 #include "TargetConditionals.h"
55 #define UDPLITE_SEND_CSCOV 10
56 #define UDPLITE_RECV_CSCOV 11
59 #ifndef IPPROTO_UDPLITE
60 #define IPPROTO_UDPLITE 136
64 #undef HAVE_PTHREAD_CANCEL
65 #define HAVE_PTHREAD_CANCEL 1
68 #if HAVE_PTHREAD_CANCEL
72 #ifndef IPV6_ADD_MEMBERSHIP
73 #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
74 #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
77 #define UDP_TX_BUF_SIZE 32768
78 #define UDP_RX_BUF_SIZE 393216
79 #define UDP_MAX_PKT_SIZE 65536
80 #define UDP_HEADER_SIZE 8
112 #if HAVE_PTHREAD_CANCEL
131 #define OFFSET(x) offsetof(UDPContext, x)
132 #define D AV_OPT_FLAG_DECODING_PARAM
133 #define E AV_OPT_FLAG_ENCODING_PARAM
135 {
"buffer_size",
"System data size (in bytes)",
OFFSET(buffer_size),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags =
D|
E },
137 {
"burst_bits",
"Max length of bursts in bits (when using bitrate)",
OFFSET(burst_bits),
AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, .flags =
E },
141 {
"udplite_coverage",
"choose UDPLite head size which should be validated by checksum",
OFFSET(udplite_coverage),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX,
D|
E },
142 {
"pkt_size",
"Maximum UDP packet size",
OFFSET(pkt_size),
AV_OPT_TYPE_INT, { .i64 = 1472 }, -1, INT_MAX, .flags =
D|
E },
143 {
"reuse",
"explicitly allow reusing UDP sockets",
OFFSET(reuse_socket),
AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1,
D|
E },
144 {
"reuse_socket",
"explicitly allow reusing UDP sockets",
OFFSET(reuse_socket),
AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, .flags =
D|
E },
145 {
"broadcast",
"explicitly allow or disallow broadcast destination",
OFFSET(is_broadcast),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
E },
148 {
"connect",
"set if connect() should be called on socket",
OFFSET(is_connected),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, .flags =
D|
E },
149 {
"fifo_size",
"set the UDP circular buffer size (in 188-byte packets)",
OFFSET(circular_buffer_size),
AV_OPT_TYPE_INT, {.i64 = HAVE_PTHREAD_CANCEL ? 7*4096 : 0}, 0, INT_MAX,
D },
150 {
"overrun_nonfatal",
"survive in case of UDP receiving circular buffer overrun",
OFFSET(overrun_nonfatal),
AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1,
D },
151 {
"timeout",
"set raise error timeout, in microseconds (only in read mode)",
OFFSET(timeout),
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX,
D },
172 struct sockaddr *addr,
181 switch (addr->sa_family) {
182 #ifdef IP_MULTICAST_TTL
184 protocol = IPPROTO_IP;
185 cmd = IP_MULTICAST_TTL;
188 #ifdef IPV6_MULTICAST_HOPS
190 protocol = IPPROTO_IPV6;
191 cmd = IPV6_MULTICAST_HOPS;
198 if (setsockopt(sockfd, protocol, cmd, &mcastTTL,
sizeof(mcastTTL)) < 0) {
200 unsigned char ttl = (
unsigned char) mcastTTL;
203 if (setsockopt(sockfd, protocol, cmd, &ttl,
sizeof(ttl)) < 0) {
213 struct sockaddr *local_addr,
void *logctx)
215 #ifdef IP_ADD_MEMBERSHIP
216 if (addr->sa_family == AF_INET) {
219 mreq.imr_multiaddr.s_addr = ((
struct sockaddr_in *)addr)->sin_addr.s_addr;
221 mreq.imr_interface= ((
struct sockaddr_in *)local_addr)->sin_addr;
223 mreq.imr_interface.s_addr = INADDR_ANY;
224 if (setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (
const void *)&mreq,
sizeof(mreq)) < 0) {
230 #if HAVE_STRUCT_IPV6_MREQ && defined(IPPROTO_IPV6)
231 if (addr->sa_family == AF_INET6) {
232 struct ipv6_mreq mreq6;
234 memcpy(&mreq6.ipv6mr_multiaddr, &(((
struct sockaddr_in6 *)addr)->sin6_addr),
sizeof(
struct in6_addr));
236 mreq6.ipv6mr_interface = 0;
247 struct sockaddr *local_addr,
void *logctx)
249 #ifdef IP_DROP_MEMBERSHIP
250 if (addr->sa_family == AF_INET) {
253 mreq.imr_multiaddr.s_addr = ((
struct sockaddr_in *)addr)->sin_addr.s_addr;
255 mreq.imr_interface = ((
struct sockaddr_in *)local_addr)->sin_addr;
257 mreq.imr_interface.s_addr = INADDR_ANY;
258 if (setsockopt(sockfd, IPPROTO_IP, IP_DROP_MEMBERSHIP, (
const void *)&mreq,
sizeof(mreq)) < 0) {
264 #if HAVE_STRUCT_IPV6_MREQ && defined(IPPROTO_IPV6)
265 if (addr->sa_family == AF_INET6) {
266 struct ipv6_mreq mreq6;
268 memcpy(&mreq6.ipv6mr_multiaddr, &(((
struct sockaddr_in6 *)addr)->sin6_addr),
sizeof(
struct in6_addr));
270 mreq6.ipv6mr_interface = 0;
281 int sockfd,
struct sockaddr *addr,
284 int nb_sources,
int include)
286 if (addr->sa_family != AF_INET) {
287 #if HAVE_STRUCT_GROUP_SOURCE_REQ && defined(MCAST_BLOCK_SOURCE)
291 for (
int i = 0;
i < nb_sources;
i++) {
292 struct group_source_req mreqs;
293 int level = addr->sa_family == AF_INET ? IPPROTO_IP : IPPROTO_IPV6;
296 mreqs.gsr_interface = 0;
297 memcpy(&mreqs.gsr_group, addr, addr_len);
300 if (setsockopt(sockfd,
level,
301 include ? MCAST_JOIN_SOURCE_GROUP : MCAST_BLOCK_SOURCE,
302 (
const void *)&mreqs,
sizeof(mreqs)) < 0) {
313 "Setting multicast sources only supported for IPv4\n");
317 #if HAVE_STRUCT_IP_MREQ_SOURCE && defined(IP_BLOCK_SOURCE)
318 for (
int i = 0;
i < nb_sources;
i++) {
319 struct ip_mreq_source mreqs;
320 if (
sources[
i].ss_family != AF_INET) {
325 mreqs.imr_multiaddr.s_addr = ((
struct sockaddr_in *)addr)->sin_addr.s_addr;
327 mreqs.imr_interface = ((
struct sockaddr_in *)local_addr)->sin_addr;
329 mreqs.imr_interface.s_addr = INADDR_ANY;
330 mreqs.imr_sourceaddr.s_addr = ((
struct sockaddr_in *)&
sources[
i])->sin_addr.s_addr;
332 if (setsockopt(sockfd, IPPROTO_IP,
333 include ? IP_ADD_SOURCE_MEMBERSHIP : IP_BLOCK_SOURCE,
334 (
const void *)&mreqs,
sizeof(mreqs)) < 0) {
349 const char *hostname,
int port)
355 if (!res0)
return AVERROR(EIO);
364 socklen_t *addr_len,
const char *localaddr)
369 int family = AF_UNSPEC;
371 if (((
struct sockaddr *) &
s->dest_addr)->sa_family)
372 family = ((
struct sockaddr *) &
s->dest_addr)->sa_family;
378 for (res = res0; res; res=res->
ai_next) {
379 if (
s->udplite_coverage)
383 if (udp_fd != -1)
break;
407 char sbuf[
sizeof(int)*3+1];
415 return strtol(sbuf,
NULL, 10);
438 char hostname[256], buf[10];
446 if (
s->dest_addr_len < 0) {
450 p = strchr(uri,
'?');
453 int was_connected =
s->is_connected;
454 s->is_connected = strtol(buf,
NULL, 10);
455 if (
s->is_connected && !was_connected) {
456 if (connect(
s->udp_fd, (
struct sockaddr *) &
s->dest_addr,
477 if ((
size_t)dest_addr_len >
sizeof(
s->dest_addr))
479 s->dest_addr_len = dest_addr_len;
480 memcpy(&
s->dest_addr, dest_addr, dest_addr_len);
483 if (do_connect >= 0) {
484 int was_connected =
s->is_connected;
485 s->is_connected = do_connect;
486 if (
s->is_connected && !was_connected) {
487 if (connect(
s->udp_fd, (
struct sockaddr *) &
s->dest_addr,
507 return s->local_port;
513 *addr =
s->last_recv_addr;
514 *addr_len =
s->last_recv_addr_len;
528 #if HAVE_PTHREAD_CANCEL
529 static void *circular_buffer_task_rx(
void *_URLContext)
541 s->circular_buffer_error =
AVERROR(EIO);
552 pkt_header.
pkt_size = recvfrom(
s->udp_fd,
s->tmp +
sizeof(pkt_header),
sizeof(
s->tmp) -
sizeof(pkt_header), 0, (
struct sockaddr *)&pkt_header.
addr, &pkt_header.
addr_len);
564 memcpy(
s->tmp, &pkt_header,
sizeof(pkt_header));
568 if (
s->overrun_nonfatal) {
570 "Surviving due to overrun_nonfatal option\n");
574 "To avoid, increase fifo_size URL option. "
575 "To survive in such case, use overrun_nonfatal option\n");
576 s->circular_buffer_error =
AVERROR(EIO);
590 static void *circular_buffer_task_tx(
void *_URLContext)
597 int64_t burst_interval =
s->bitrate ? (
s->burst_bits * 1000000 /
s->bitrate) : 0;
598 int64_t max_delay =
s->bitrate ? ((
int64_t)
h->max_packet_size * 8 * 1000000 /
s->bitrate + 1) : 0;
606 s->circular_buffer_error =
AVERROR(EIO);
637 if (timestamp < target_timestamp) {
638 int64_t delay = target_timestamp - timestamp;
639 if (delay > max_delay) {
641 start_timestamp = timestamp + delay;
646 if (timestamp - burst_interval > target_timestamp) {
647 start_timestamp = timestamp - burst_interval;
651 sent_bits +=
len * 8;
652 target_timestamp = start_timestamp + sent_bits * 1000000 /
s->bitrate;
659 if (!
s->is_connected) {
661 (
struct sockaddr *) &
s->dest_addr,
672 s->circular_buffer_error =
ret;
695 int port, udp_fd = -1,
tmp, bind_ret = -1;
706 if (
s->buffer_size < 0)
709 p = strchr(uri,
'?');
715 if (!HAVE_PTHREAD_CANCEL) {
716 int64_t optvals[] = {
s->overrun_nonfatal,
s->bitrate,
s->circular_buffer_size};
717 const char* optnames[] = {
"overrun_nonfatal",
"bitrate",
"fifo_size"};
721 "'%s' option was set but it is not supported "
722 "on this build (pthread support is required)\n", optnames[
i]);
735 s->circular_buffer_size *= 188;
737 h->max_packet_size =
s->pkt_size;
741 h->rw_timeout =
s->timeout;
747 if (hostname[0] ==
'\0' || hostname[0] ==
'?') {
759 s->local_port = port;
767 s->local_addr_storage=my_addr;
772 if (
s->reuse_socket > 0 || (
s->is_multicast &&
s->reuse_socket < 0)) {
774 if (setsockopt (udp_fd, SOL_SOCKET, SO_REUSEADDR, &(
s->reuse_socket),
sizeof(
s->reuse_socket)) != 0) {
780 if (
s->is_broadcast) {
782 if (setsockopt (udp_fd, SOL_SOCKET, SO_BROADCAST, &(
s->is_broadcast),
sizeof(
s->is_broadcast)) != 0) {
796 if (
s->udplite_coverage) {
805 int dscp =
s->dscp << 2;
806 if (setsockopt (udp_fd, IPPROTO_IP, IP_TOS, &dscp,
sizeof(dscp)) != 0) {
817 bind_ret = bind(udp_fd,(
struct sockaddr *)&
s->dest_addr,
len);
822 if (bind_ret < 0 && bind(udp_fd,(
struct sockaddr *)&my_addr,
len) < 0) {
828 len =
sizeof(my_addr);
829 getsockname(udp_fd, (
struct sockaddr *)&my_addr, &
len);
832 if (
s->is_multicast) {
840 if (
s->filters.nb_include_addrs) {
842 (
struct sockaddr *)&
s->dest_addr,
843 s->dest_addr_len, &
s->local_addr_storage,
844 s->filters.include_addrs,
845 s->filters.nb_include_addrs, 1)) < 0)
849 (
struct sockaddr *)&
s->local_addr_storage,
h)) < 0)
852 if (
s->filters.nb_exclude_addrs) {
854 (
struct sockaddr *)&
s->dest_addr,
855 s->dest_addr_len, &
s->local_addr_storage,
856 s->filters.exclude_addrs,
857 s->filters.nb_exclude_addrs, 0)) < 0)
865 tmp =
s->buffer_size;
866 if (setsockopt(udp_fd, SOL_SOCKET, SO_SNDBUF, &
tmp,
sizeof(
tmp)) < 0) {
873 tmp =
s->buffer_size;
874 if (setsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &
tmp,
sizeof(
tmp)) < 0) {
878 if (getsockopt(udp_fd, SOL_SOCKET, SO_RCVBUF, &
tmp, &
len) < 0) {
882 if(tmp < s->buffer_size)
883 av_log(
h,
AV_LOG_WARNING,
"attempted to set receive buffer to size %d but it only ended up set as %d\n",
s->buffer_size,
tmp);
889 if (
s->is_connected) {
890 if (connect(udp_fd, (
struct sockaddr *) &
s->dest_addr,
s->dest_addr_len)) {
899 #if HAVE_PTHREAD_CANCEL
906 if (is_output &&
s->bitrate && !
s->circular_buffer_size) {
908 av_log(
h,
AV_LOG_WARNING,
"'bitrate' option was set but 'circular_buffer_size' is not, but required\n");
911 if ((!is_output &&
s->circular_buffer_size) || (is_output &&
s->bitrate &&
s->circular_buffer_size)) {
934 ret =
pthread_create(&
s->circular_buffer_thread,
NULL, is_output?circular_buffer_task_tx:circular_buffer_task_rx,
h);
940 s->thread_started = 1;
945 #if HAVE_PTHREAD_CANCEL
974 #if HAVE_PTHREAD_CANCEL
986 s->last_recv_addr =
header.addr;
987 s->last_recv_addr_len =
header.addr_len;
999 }
else if(
s->circular_buffer_error){
1000 int err =
s->circular_buffer_error;
1003 }
else if(nonblock) {
1010 struct timespec tv = { .tv_sec = t / 1000000,
1011 .tv_nsec = (t % 1000000) * 1000 };
1015 return AVERROR(err == ETIMEDOUT ? EAGAIN : err);
1028 s->last_recv_addr_len =
sizeof(
s->last_recv_addr);
1029 ret = recvfrom(
s->udp_fd, buf,
size, 0, (
struct sockaddr *)&
s->last_recv_addr, &
s->last_recv_addr_len);
1042 #if HAVE_PTHREAD_CANCEL
1052 if (
s->circular_buffer_error<0) {
1053 int err =
s->circular_buffer_error;
1077 if (!
s->is_connected) {
1078 ret = sendto (
s->udp_fd, buf,
size, 0,
1079 (
struct sockaddr *) &
s->dest_addr,
1082 ret = send(
s->udp_fd, buf,
size, 0);
1091 #if HAVE_PTHREAD_CANCEL
1103 (
struct sockaddr *)&
s->local_addr_storage,
h);
1104 #if HAVE_PTHREAD_CANCEL
1105 if (
s->thread_started) {
1113 shutdown(
s->udp_fd, SD_RECEIVE);
1114 CancelIoEx((HANDLE)(SOCKET)
s->udp_fd,
NULL);
1116 pthread_cancel(
s->circular_buffer_thread);
1126 closesocket(
s->udp_fd);
static void error(const char *err)
#define PTHREAD_CANCEL_ENABLE
void av_fifo_drain2(AVFifo *f, size_t size)
Discard the specified amount of data from an AVFifo.
static av_always_inline int pthread_join(pthread_t thread, void **value_ptr)
int64_t av_gettime_relative(void)
Get the current time in microseconds since some unspecified starting point.
int ff_udp_get_local_port(URLContext *h)
Return the local port used by the UDP connection.
#define AV_LOG_WARNING
Something somehow does not look correct.
size_t av_fifo_can_write(const AVFifo *f)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int av_find_info_tag(char *arg, int arg_size, const char *tag1, const char *info)
Attempt to find a specific tag in a URL.
#define PTHREAD_CANCEL_DISABLE
#define URL_PROTOCOL_FLAG_NETWORK
int ff_ip_parse_sources(void *log_ctx, const char *buf, IPSourceFilters *filters)
Parses the address[,address] source list in buf and adds it to the filters in the IPSourceFilters str...
static int udp_socket_create(URLContext *h, struct sockaddr_storage *addr, socklen_t *addr_len, const char *localaddr)
uint8_t tmp[UDP_MAX_PKT_SIZE+sizeof(UDPQueuedPacketHeader)]
static av_always_inline int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
static int udp_set_multicast_ttl(int sockfd, int mcastTTL, struct sockaddr *addr, void *logctx)
Note except for filters that can have queued frames and sources
static av_always_inline int pthread_mutex_lock(pthread_mutex_t *mutex)
void ff_log_net_error(void *ctx, int level, const char *prefix)
static int udp_port(struct sockaddr_storage *addr, int addr_len)
int ff_udp_set_remote_url(URLContext *h, const char *uri)
If no filename is given to av_open_input_file because you want to get the local port first,...
#define UDPLITE_RECV_CSCOV
static const AVClass udplite_context_class
struct sockaddr_storage local_addr_storage
int ff_udp_set_remote_addr(URLContext *h, const struct sockaddr *dest_addr, socklen_t dest_addr_len, int do_connect)
This function is identical to ff_udp_set_remote_url, except that it takes a sockaddr directly.
void ff_ip_reset_filters(IPSourceFilters *filters)
Resets the IP filter list and frees the internal fields of an IPSourceFilters structure.
const URLProtocol ff_udp_protocol
static int udp_leave_multicast_group(int sockfd, struct sockaddr *addr, struct sockaddr *local_addr, void *logctx)
int av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems)
Write data into a FIFO.
static int udp_set_url(URLContext *h, struct sockaddr_storage *addr, const char *hostname, int port)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_ARRAY_ELEMS(a)
int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems)
Read data from a FIFO.
static av_always_inline int pthread_mutex_unlock(pthread_mutex_t *mutex)
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define AVIO_FLAG_WRITE
write-only
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
int av_usleep(unsigned usec)
Sleep for a period of time.
static av_always_inline int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
int ff_ip_parse_blocks(void *log_ctx, const char *buf, IPSourceFilters *filters)
Parses the address[,address] source block list in buf and adds it to the filters in the IPSourceFilte...
const char * av_default_item_name(void *ptr)
Return the context name.
int ff_is_multicast_address(struct sockaddr *addr)
size_t av_fifo_can_read(const AVFifo *f)
struct sockaddr * ai_addr
struct addrinfo * ff_ip_resolve_host(void *log_ctx, const char *hostname, int port, int type, int family, int flags)
Resolves hostname into an addrinfo structure.
static const AVOption options[]
int circular_buffer_error
int ff_socket_nonblock(int socket, int enable)
static const uint8_t header[24]
void ff_udp_get_last_recv_addr(URLContext *h, struct sockaddr_storage *addr, socklen_t *addr_len)
static int udplite_open(URLContext *h, const char *uri, int flags)
struct sockaddr_storage last_recv_addr
static av_always_inline int pthread_cond_destroy(pthread_cond_t *cond)
struct addrinfo * ai_next
static av_always_inline int pthread_mutex_destroy(pthread_mutex_t *mutex)
static int udp_close(URLContext *h)
#define i(width, name, range_min, range_max)
struct sockaddr_storage dest_addr
void av_url_split(char *proto, int proto_size, char *authorization, int authorization_size, char *hostname, int hostname_size, int *port_ptr, char *path, int path_size, const char *url)
Split a URL string into components.
static int udp_join_multicast_group(int sockfd, struct sockaddr *addr, struct sockaddr *local_addr, void *logctx)
const URLProtocol ff_udplite_protocol
static int pthread_setcancelstate(int state, int *oldstate)
static int udp_read(URLContext *h, uint8_t *buf, int size)
static int udp_set_multicast_sources(URLContext *h, int sockfd, struct sockaddr *addr, int addr_len, struct sockaddr_storage *local_addr, struct sockaddr_storage *sources, int nb_sources, int include)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
AVFifo * av_fifo_alloc2(size_t nb_elems, size_t elem_size, unsigned int flags)
Allocate and initialize an AVFifo with a given element size.
static av_always_inline int pthread_cond_signal(pthread_cond_t *cond)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Structure for storing IP (UDP) source filters or block lists.
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define IPV6_DROP_MEMBERSHIP
static int udp_write(URLContext *h, const uint8_t *buf, int size)
int ff_ip_check_source_lists(struct sockaddr_storage *source_addr_ptr, IPSourceFilters *s)
Checks the source address against a given IP source filter.
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
static int udp_open(URLContext *h, const char *uri, int flags)
static av_always_inline int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
int64_t av_gettime(void)
Get the current time in microseconds.
#define AVIO_FLAG_READ
read-only
static int udp_get_file_handle(URLContext *h)
Return the udp file handle for select() usage to wait for several RTP streams at the same time.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
#define AVIO_FLAG_NONBLOCK
Use non-blocking mode.
socklen_t last_recv_addr_len
static av_always_inline int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
The exact code depends on how similar the blocks are and how related they are to the block
void av_fifo_freep2(AVFifo **f)
Free an AVFifo and reset pointer to NULL.
static av_always_inline int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
int ff_socket(int af, int type, int proto, void *logctx)
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
#define IPV6_ADD_MEMBERSHIP
int(* cond)(enum AVPixelFormat pix_fmt)
static const AVClass udp_class
#define UDPLITE_SEND_CSCOV
static int ff_thread_setname(const char *name)
int ff_network_wait_fd(int fd, int write)