libavformat/sdp.c File Reference

#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "avformat.h"
#include "internal.h"
#include "avc.h"
#include "rtp.h"
#include "network.h"

Go to the source code of this file.

Data Structures

struct  sdp_session_level

Defines

#define MAX_EXTRADATA_SIZE   ((INT_MAX - 10) / 2)
#define MAX_PSET_SIZE   1024

Functions

static void sdp_write_address (char *buff, int size, const char *dest_addr, int ttl)
static void sdp_write_header (char *buff, int size, struct sdp_session_level *s)
static void resolve_destination (char *dest_addr, int size)
static int sdp_get_address (char *dest_addr, int size, int *ttl, const char *url)
static char * extradata2psets (AVCodecContext *c)
static char * extradata2config (AVCodecContext *c)
static char * sdp_write_media_attributes (char *buff, int size, AVCodecContext *c, int payload_type)
static void sdp_write_media (char *buff, int size, AVCodecContext *c, const char *dest_addr, int port, int ttl)
int avf_sdp_create (AVFormatContext *ac[], int n_files, char *buff, int size)
 Generates an SDP for an RTP session.


Define Documentation

#define MAX_EXTRADATA_SIZE   ((INT_MAX - 10) / 2)

Definition at line 33 of file sdp.c.

Referenced by extradata2config(), and extradata2psets().

#define MAX_PSET_SIZE   1024

Definition at line 140 of file sdp.c.

Referenced by extradata2psets().


Function Documentation

int avf_sdp_create ( AVFormatContext ac[],
int  n_files,
char *  buff,
int  size 
)

Generates an SDP for an RTP session.

Parameters:
ac array of AVFormatContexts describing the RTP streams. If the array is composed by only one context, such context can contain multiple AVStreams (one AVStream per RTP stream). Otherwise, all the contexts in the array (an AVCodecContext per RTP stream) must contain only one AVStream.
n_files number of AVCodecContexts contained in ac
buff buffer where the SDP will be stored (must be allocated by the caller)
size the size of the buffer
Returns:
0 if OK, AVERROR_xxx on error

Definition at line 323 of file sdp.c.

Referenced by prepare_sdp_description(), print_sdp(), and rtsp_setup_output_streams().

static char* extradata2config ( AVCodecContext c  )  [static]

Definition at line 189 of file sdp.c.

Referenced by sdp_write_media_attributes().

static char* extradata2psets ( AVCodecContext c  )  [static]

Definition at line 141 of file sdp.c.

Referenced by sdp_write_media_attributes().

static void resolve_destination ( char *  dest_addr,
int  size 
) [static]

Definition at line 76 of file sdp.c.

Referenced by avf_sdp_create().

static int sdp_get_address ( char *  dest_addr,
int  size,
int *  ttl,
const char *  url 
) [static]

Definition at line 106 of file sdp.c.

Referenced by avf_sdp_create().

static void sdp_write_address ( char *  buff,
int  size,
const char *  dest_addr,
int  ttl 
) [static]

Definition at line 50 of file sdp.c.

Referenced by sdp_write_header(), and sdp_write_media().

static void sdp_write_header ( char *  buff,
int  size,
struct sdp_session_level s 
) [static]

Definition at line 61 of file sdp.c.

Referenced by avf_sdp_create().

static void sdp_write_media ( char *  buff,
int  size,
AVCodecContext c,
const char *  dest_addr,
int  port,
int  ttl 
) [static]

Definition at line 297 of file sdp.c.

Referenced by avf_sdp_create().

static char* sdp_write_media_attributes ( char *  buff,
int  size,
AVCodecContext c,
int  payload_type 
) [static]

Definition at line 210 of file sdp.c.

Referenced by sdp_write_media().


Generated on Tue Apr 20 17:39:54 2010 for FFmpeg by  doxygen 1.5.6