libavformat/rtpproto.c File Reference

#include "avformat.h"
#include "avstring.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,...)
static void build_udp_url (char *buf, int buf_size, const char *hostname, int port, int local_port, int multicast, int ttl)
static int rtp_open (URLContext *h, const char *uri, int flags)
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


Define Documentation

#define RTP_RX_BUF_SIZE   (128 * 1024)

Definition at line 31 of file rtpproto.c.

#define RTP_TX_BUF_SIZE   (64 * 1024)

Definition at line 30 of file rtpproto.c.


Function Documentation

static void build_udp_url ( char *  buf,
int  buf_size,
const char *  hostname,
int  port,
int  local_port,
int  multicast,
int  ttl 
) [static]

Definition at line 85 of file rtpproto.c.

Referenced by rtp_open().

static int rtp_close ( URLContext h  )  [static]

Definition at line 259 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.

Parameters:
h media file context

Definition at line 285 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.

Parameters:
s1 media file context
Returns:
the local port number

Definition at line 274 of file rtpproto.c.

Referenced by rtsp_cmd_setup(), and rtsp_read_header().

static int rtp_open ( URLContext h,
const char *  uri,
int  flags 
) [static]

Definition at line 105 of file rtpproto.c.

static int rtp_read ( URLContext h,
uint8_t buf,
int  size 
) [static]

Definition at line 170 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.

Parameters:
s1 media file context
uri of the remote server
Returns:
zero if no error.

Definition at line 47 of file rtpproto.c.

Referenced by rtsp_read_header().

static int rtp_write ( URLContext h,
uint8_t buf,
int  size 
) [static]

Definition at line 233 of file rtpproto.c.

static void url_add_option ( char *  buf,
int  buf_size,
const char *  fmt,
  ... 
) [static]

Definition at line 70 of file rtpproto.c.

Referenced by build_udp_url().


Variable Documentation

Initial value:

 {
    "rtp",
    rtp_open,
    rtp_read,
    rtp_write,
    NULL, 
    rtp_close,
}

Definition at line 293 of file rtpproto.c.


Generated on Wed Feb 9 19:10:13 2011 for ffmpeg by  doxygen 1.5.6