#include "libavutil/avstring.h"
#include "avformat.h"
#include <unistd.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 |
Defines | |
#define | RTP_TX_BUF_SIZE (64 * 1024) |
#define | RTP_RX_BUF_SIZE (128 * 1024) |
Functions | |
int | 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 void | url_add_option (char *buf, int buf_size, const char *fmt,...) |
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) |
static int | rtp_open (URLContext *h, const char *uri, int flags) |
url syntax: rtp://host:port[?option=val. | |
static int | rtp_read (URLContext *h, uint8_t *buf, int size) |
static int | rtp_write (URLContext *h, uint8_t *buf, int size) |
static int | rtp_close (URLContext *h) |
int | rtp_get_local_port (URLContext *h) |
Return the local port used by the RTP connection. | |
void | rtp_get_file_handles (URLContext *h, int *prtp_fd, int *prtcp_fd) |
Return the rtp and rtcp file handles for select() usage to wait for several RTP streams at the same time. | |
Variables | |
URLProtocol | rtp_protocol |
Definition in file rtpproto.c.
#define RTP_RX_BUF_SIZE (128 * 1024) |
Definition at line 40 of file rtpproto.c.
#define RTP_TX_BUF_SIZE (64 * 1024) |
Definition at line 39 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 | |||
) | [static] |
static int rtp_close | ( | URLContext * | h | ) | [static] |
Definition at line 277 of file rtpproto.c.
void rtp_get_file_handles | ( | URLContext * | h, | |
int * | prtp_fd, | |||
int * | prtcp_fd | |||
) |
Return the rtp and rtcp file handles for select() usage to wait for several RTP streams at the same time.
h | media file context |
Definition at line 305 of file rtpproto.c.
Referenced by udp_read_packet().
int rtp_get_local_port | ( | URLContext * | h | ) |
Return the local port used by the RTP connection.
s1 | media file context |
Definition at line 293 of file rtpproto.c.
Referenced by make_setup_request(), and rtsp_cmd_setup().
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) 'localport=n' : set the local port to n 'pkt_size=n' : set max packet size
Definition at line 120 of file rtpproto.c.
static int rtp_read | ( | URLContext * | h, | |
uint8_t * | buf, | |||
int | size | |||
) | [static] |
Definition at line 188 of file rtpproto.c.
int 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.
s1 | media file context | |
uri | of the remote server |
Definition at line 57 of file rtpproto.c.
Referenced by make_setup_request().
static int rtp_write | ( | URLContext * | h, | |
uint8_t * | buf, | |||
int | size | |||
) | [static] |
Definition at line 251 of file rtpproto.c.
static void url_add_option | ( | char * | buf, | |
int | buf_size, | |||
const char * | fmt, | |||
... | ||||
) | [static] |
add option to url of the form: "http://host:port/path?option1=val1&option2=val2.
..
Definition at line 83 of file rtpproto.c.
Referenced by build_udp_url().