RTP protocol. More...
#include "libavutil/parseutils.h"
#include "libavutil/avstring.h"
#include "avformat.h"
#include "avio_internal.h"
#include "rtpdec.h"
#include "url.h"
#include <unistd.h>
#include <stdarg.h>
#include "internal.h"
#include "network.h"
#include "os_support.h"
#include <fcntl.h>
#include <sys/poll.h>
#include <sys/time.h>
Go to the source code of this file.
Data Structures | |
struct | RTPContext |
Defines | |
#define | RTP_TX_BUF_SIZE (64 * 1024) |
#define | RTP_RX_BUF_SIZE (128 * 1024) |
Typedefs | |
typedef struct RTPContext | RTPContext |
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. | |
static | av_printf_format (3, 4) |
add option to url of the form: "http://host:port/path?option1=val1&option2=val2... | |
static void | build_udp_url (char *buf, int buf_size, const char *hostname, int port, int local_port, int ttl, int max_packet_size, int connect) |
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 deprecated option: 'localport=n' : set the local port to n | |
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. | |
int | ff_rtp_get_local_rtcp_port (URLContext *h) |
Return the local rtcp port used by the RTP connection. | |
static int | rtp_get_file_handle (URLContext *h) |
int | ff_rtp_get_rtcp_file_handle (URLContext *h) |
Get the file handle for the RTCP socket. | |
Variables | |
URLProtocol | ff_rtp_protocol |
RTP protocol.
Definition in file rtpproto.c.
#define RTP_RX_BUF_SIZE (128 * 1024) |
Definition at line 46 of file rtpproto.c.
#define RTP_TX_BUF_SIZE (64 * 1024) |
Definition at line 45 of file rtpproto.c.
typedef struct RTPContext RTPContext |
static av_printf_format | ( | 3 | , | |
4 | ||||
) | [static] |
add option to url of the form: "http://host:port/path?option1=val1&option2=val2...
Definition at line 89 of file rtpproto.c.
static void build_udp_url | ( | char * | buf, | |
int | buf_size, | |||
const char * | hostname, | |||
int | port, | |||
int | local_port, | |||
int | ttl, | |||
int | max_packet_size, | |||
int | connect | |||
) | [static] |
Definition at line 104 of file rtpproto.c.
Referenced by rtp_open().
int ff_rtp_get_local_rtcp_port | ( | URLContext * | h | ) |
Return the local rtcp port used by the RTP connection.
h | media file context |
Definition at line 308 of file rtpproto.c.
Referenced by rtsp_cmd_setup().
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 296 of file rtpproto.c.
Referenced by ff_rtsp_make_setup_request(), and rtsp_cmd_setup().
int ff_rtp_get_rtcp_file_handle | ( | URLContext * | h | ) |
Get the file handle for the RTCP socket.
Definition at line 320 of file rtpproto.c.
Referenced by udp_read_packet().
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 63 of file rtpproto.c.
Referenced by ff_rtsp_make_setup_request().
static int rtp_close | ( | URLContext * | h | ) | [static] |
Definition at line 281 of file rtpproto.c.
static int rtp_get_file_handle | ( | URLContext * | h | ) | [static] |
Definition at line 314 of file rtpproto.c.
static int rtp_open | ( | URLContext * | h, | |
const char * | uri, | |||
int | flags | |||
) | [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 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 137 of file rtpproto.c.
static int rtp_read | ( | URLContext * | h, | |
uint8_t * | buf, | |||
int | size | |||
) | [static] |
Definition at line 214 of file rtpproto.c.
static int rtp_write | ( | URLContext * | h, | |
const uint8_t * | buf, | |||
int | size | |||
) | [static] |
Definition at line 263 of file rtpproto.c.
{ .name = "rtp", .url_open = rtp_open, .url_read = rtp_read, .url_write = rtp_write, .url_close = rtp_close, .url_get_file_handle = rtp_get_file_handle, .priv_data_size = sizeof(RTPContext), .flags = URL_PROTOCOL_FLAG_NETWORK, }
Definition at line 325 of file rtpproto.c.