Libav 0.7.1
Functions
libavformat/sdp.c File Reference
#include <string.h>
#include "libavutil/avstring.h"
#include "libavutil/base64.h"
#include "libavutil/dict.h"
#include "libavutil/parseutils.h"
#include "libavutil/opt.h"
#include "libavcodec/xiph.h"
#include "libavcodec/mpeg4audio.h"
#include "avformat.h"
#include "internal.h"
#include "avc.h"
#include "rtp.h"

Go to the source code of this file.

Functions

int av_sdp_create (AVFormatContext *ac[], int n_files, char *buf, int size)
 Generate an SDP for an RTP session.
void ff_sdp_write_media (char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl, AVFormatContext *fmt)
 Append the media-specific SDP fragment for the media stream c to the buffer buff.
int avf_sdp_create (AVFormatContext *ac[], int n_files, char *buff, int size)

Function Documentation

int av_sdp_create ( AVFormatContext ac[],
int  n_files,
char *  buf,
int  size 
)

Generate an SDP for an RTP session.

Parameters:
acarray 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_filesnumber of AVCodecContexts contained in ac
bufbuffer where the SDP will be stored (must be allocated by the caller)
sizethe size of the buffer
Returns:
0 if OK, AVERROR_xxx on error

Definition at line 614 of file sdp.c.

Referenced by avf_sdp_create(), ff_rtsp_setup_output_streams(), prepare_sdp_description(), print_sdp(), and sap_write_header().

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

Definition at line 625 of file sdp.c.

void ff_sdp_write_media ( char *  buff,
int  size,
AVCodecContext c,
const char *  dest_addr,
const char *  dest_type,
int  port,
int  ttl,
AVFormatContext fmt 
)

Append the media-specific SDP fragment for the media stream c to the buffer buff.

Note, the buffer needs to be initialized, since it is appended to existing content.

Parameters:
buffthe buffer to append the SDP fragment to
sizethe size of the buff buffer
cthe AVCodecContext of the media to describe
dest_addrthe destination address of the media stream, may be NULL
dest_typethe destination address type, may be NULL
portthe destination port of the media stream, 0 if unknown
ttlthe time to live of the stream, 0 if not multicast
fmtthe AVFormatContext, which might contain options modifying the generated SDP

Definition at line 619 of file sdp.c.

Referenced by mov_write_udta_sdp().