FFmpeg
|
#include "libavutil/mem.h"
#include "libavutil/parseutils.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "rtp.h"
#include "rtpproto.h"
#include "url.h"
#include "ip.h"
#include <stdarg.h>
#include "network.h"
#include "os_support.h"
#include <fcntl.h>
Go to the source code of this file.
Data Structures | |
struct | RTPContext |
Macros | |
#define | OFFSET(x) offsetof(RTPContext, x) |
#define | D AV_OPT_FLAG_DECODING_PARAM |
#define | E AV_OPT_FLAG_ENCODING_PARAM |
Functions | |
int | ff_rtp_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... | |
static int | get_port (const struct sockaddr_storage *ss) |
static void | set_port (struct sockaddr_storage *ss, int port) |
static | av_printf_format (3, 4) |
add option to url of the form: "http://host:port/path?option1=val1&option2=val2... More... | |
static void | build_udp_url (RTPContext *s, char *buf, int buf_size, const char *hostname, const char *localaddr, int port, int local_port, const char *include_sources, const char *exclude_sources) |
static int | rtp_open (URLContext *h, const char *uri, int flags) |
url syntax: rtp://host:port[?option=val...] option: 'ttl=n' : set the ttl value (for multicast only) 'rtcpport=n' : set the remote rtcp port to n 'localrtpport=n' : set the local rtp port to n 'localrtcpport=n' : set the local rtcp port to n 'pkt_size=n' : set max packet size 'connect=0/1' : do a connect() on the UDP socket 'sources=ip[,ip]' : list allowed source IP addresses 'block=ip[,ip]' : list disallowed source IP addresses 'write_to_source=0/1' : send packets to the source address of the latest received packet 'dscp=n' : set DSCP value to n (QoS) deprecated option: 'localport=n' : set the local port to n More... | |
static int | rtp_read (URLContext *h, uint8_t *buf, int size) |
static int | rtp_write (URLContext *h, const uint8_t *buf, int size) |
static int | rtp_close (URLContext *h) |
int | ff_rtp_get_local_rtp_port (URLContext *h) |
Return the local rtp port used by the RTP connection. More... | |
static int | rtp_get_file_handle (URLContext *h) |
Return the local rtcp port used by the RTP connection. More... | |
static int | rtp_get_multi_file_handle (URLContext *h, int **handles, int *numhandles) |
Variables | |
static const AVOption | options [] |
static const AVClass | rtp_class |
const URLProtocol | ff_rtp_protocol |
RTP protocol
Definition in file rtpproto.c.
#define OFFSET | ( | x | ) | offsetof(RTPContext, x) |
Definition at line 66 of file rtpproto.c.
#define D AV_OPT_FLAG_DECODING_PARAM |
Definition at line 67 of file rtpproto.c.
#define E AV_OPT_FLAG_ENCODING_PARAM |
Definition at line 68 of file rtpproto.c.
int ff_rtp_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.
h | media file context |
uri | of the remote server |
Definition at line 104 of file rtpproto.c.
|
static |
Definition at line 133 of file rtpproto.c.
Referenced by rtp_write().
|
static |
Definition at line 144 of file rtpproto.c.
Referenced by rtp_write().
|
static |
add option to url of the form: "http://host:port/path?option1=val1&option2=val2...
Definition at line 159 of file rtpproto.c.
|
static |
Definition at line 174 of file rtpproto.c.
Referenced by rtp_open().
|
static |
url syntax: rtp://host:port[?option=val...] option: 'ttl=n' : set the ttl value (for multicast only) 'rtcpport=n' : set the remote rtcp port to n 'localrtpport=n' : set the local rtp port to n 'localrtcpport=n' : set the local rtcp port to n 'pkt_size=n' : set max packet size 'connect=0/1' : do a connect() on the UDP socket 'sources=ip[,ip]' : list allowed source IP addresses 'block=ip[,ip]' : list disallowed source IP addresses 'write_to_source=0/1' : send packets to the source address of the latest received packet 'dscp=n' : set DSCP value to n (QoS) deprecated option: 'localport=n' : set the local port to n
if rtcpport isn't set the rtcp port will be the rtp port + 1 if local rtp port isn't set any available port will be used for the local rtp and rtcp ports if the local rtcp port is not set it will be the local rtp port + 1
Definition at line 225 of file rtpproto.c.
|
static |
Definition at line 391 of file rtpproto.c.
|
static |
Definition at line 435 of file rtpproto.c.
|
static |
Definition at line 521 of file rtpproto.c.
int ff_rtp_get_local_rtp_port | ( | URLContext * | h | ) |
Return the local rtp port used by the RTP connection.
h | media file context |
Definition at line 539 of file rtpproto.c.
Referenced by rtsp_read_setup().
|
static |
Return the local rtcp port used by the RTP connection.
h | media file context |
Definition at line 551 of file rtpproto.c.
|
static |
Definition at line 557 of file rtpproto.c.
Definition at line 69 of file rtpproto.c.
|
static |
Definition at line 87 of file rtpproto.c.
const URLProtocol ff_rtp_protocol |
Definition at line 570 of file rtpproto.c.