FFmpeg
|
#include "avformat.h"
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/parseutils.h"
#include "libavutil/fifo.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/log.h"
#include "libavutil/time.h"
#include "network.h"
#include "os_support.h"
#include "url.h"
#include "ip.h"
Go to the source code of this file.
Data Structures | |
struct | UDPQueuedPacketHeader |
struct | UDPContext |
Macros | |
#define | _DEFAULT_SOURCE |
#define | _BSD_SOURCE /* Needed for using struct ip_mreq with recent glibc */ |
#define | UDPLITE_SEND_CSCOV 10 |
#define | UDPLITE_RECV_CSCOV 11 |
#define | IPPROTO_UDPLITE 136 |
#define | IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP |
#define | IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP |
#define | UDP_TX_BUF_SIZE 32768 |
#define | UDP_RX_BUF_SIZE 393216 |
#define | UDP_MAX_PKT_SIZE 65536 |
#define | UDP_HEADER_SIZE 8 |
#define | OFFSET(x) offsetof(UDPContext, x) |
#define | D AV_OPT_FLAG_DECODING_PARAM |
#define | E AV_OPT_FLAG_ENCODING_PARAM |
Functions | |
static int | udp_set_multicast_ttl (int sockfd, int mcastTTL, struct sockaddr *addr, void *logctx) |
static int | udp_join_multicast_group (int sockfd, struct sockaddr *addr, struct sockaddr *local_addr, void *logctx) |
static int | udp_leave_multicast_group (int sockfd, struct sockaddr *addr, struct sockaddr *local_addr, void *logctx) |
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) |
static int | udp_set_url (URLContext *h, struct sockaddr_storage *addr, const char *hostname, int port) |
static int | udp_socket_create (URLContext *h, struct sockaddr_storage *addr, socklen_t *addr_len, const char *localaddr) |
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, then you must call this function to set the remote server address. More... | |
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. More... | |
int | ff_udp_get_local_port (URLContext *h) |
Return the local port used by the UDP connection. More... | |
void | ff_udp_get_last_recv_addr (URLContext *h, struct sockaddr_storage *addr, socklen_t *addr_len) |
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. More... | |
static int | udp_open (URLContext *h, const char *uri, int flags) |
static int | udplite_open (URLContext *h, const char *uri, int flags) |
static int | udp_read (URLContext *h, uint8_t *buf, int size) |
static int | udp_write (URLContext *h, const uint8_t *buf, int size) |
static int | udp_close (URLContext *h) |
Variables | |
static const AVOption | options [] |
static const AVClass | udp_class |
static const AVClass | udplite_context_class |
const URLProtocol | ff_udp_protocol |
const URLProtocol | ff_udplite_protocol |
UDP protocol
Definition in file udp.c.
#define _BSD_SOURCE /* Needed for using struct ip_mreq with recent glibc */ |
#define OFFSET | ( | x | ) | offsetof(UDPContext, x) |
#define D AV_OPT_FLAG_DECODING_PARAM |
#define E AV_OPT_FLAG_ENCODING_PARAM |
|
static |
Definition at line 168 of file udp.c.
Referenced by udp_open().
|
static |
Definition at line 209 of file udp.c.
Referenced by udp_open().
|
static |
Definition at line 243 of file udp.c.
Referenced by udp_close().
|
static |
Definition at line 277 of file udp.c.
Referenced by udp_open().
|
static |
Definition at line 346 of file udp.c.
Referenced by ff_udp_set_remote_url().
|
static |
Definition at line 362 of file udp.c.
Referenced by udp_open().
|
static |
Definition at line 404 of file udp.c.
Referenced by udp_open().
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, then you must call this function to set the remote server address.
url syntax: udp://host:port[?option=val...] option: 'ttl=n' : set the ttl value (for multicast only) 'localport=n' : set the local port 'pkt_size=n' : set max packet size 'reuse=1' : enable reusing the socket 'overrun_nonfatal=1': survive in case of circular buffer overrun
h | media file context |
uri | of the remote server |
Definition at line 434 of file udp.c.
Referenced by ff_rtp_set_remote_url(), and udp_open().
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.
Definition at line 471 of file udp.c.
Referenced by tls_handshake_loop(), and url_bio_bread().
int ff_udp_get_local_port | ( | URLContext * | h | ) |
Return the local port used by the UDP connection.
h | media file context |
Definition at line 503 of file udp.c.
Referenced by ff_rtp_get_local_rtp_port(), and rtp_open().
void ff_udp_get_last_recv_addr | ( | URLContext * | h, |
struct sockaddr_storage * | addr, | ||
socklen_t * | addr_len | ||
) |
Definition at line 509 of file udp.c.
Referenced by tls_handshake_loop(), and url_bio_bread().
|
static |
|
static |
Definition at line 691 of file udp.c.
Referenced by udplite_open().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
const URLProtocol ff_udp_protocol |
const URLProtocol ff_udplite_protocol |