libavformat/sdp.c File Reference

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

Go to the source code of this file.

Functions

int avf_sdp_create (AVFormatContext *ac[], int n_files, char *buff, 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)
 Append the media-specific SDP fragment for the media stream c to the buffer buff.


Function Documentation

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

Generate 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 534 of file sdp.c.

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

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

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:
buff the buffer to append the SDP fragment to
size the size of the buff buffer
c the AVCodecContext of the media to describe
dest_addr the destination address of the media stream, may be NULL
dest_type the destination address type, may be NULL
port the destination port of the media stream, 0 if unknown
ttl the time to live of the stream, 0 if not multicast

Definition at line 539 of file sdp.c.

Referenced by mov_write_udta_sdp().


Generated on Mon May 2 19:50:28 2011 for FFmpeg by  doxygen 1.5.6