Libav
Functions

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"

Go to the source code of this file.

Functions

int avf_sdp_create (AVFormatContext *ac[], int n_files, char *buff, int size)
 Generates an SDP for an RTP session.
void ff_sdp_write_media (char *buff, int size, AVCodecContext *c, const char *dest_addr, int port, int ttl)
 Appends 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 
)

Generates 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
buffbuffer 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 368 of file sdp.c.

Referenced by prepare_sdp_description(), and print_sdp().

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

Appends 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
portthe destination port of the media stream, 0 if unknown
ttlthe time to live of the stream, 0 if not multicast

Definition at line 373 of file sdp.c.

Referenced by mov_write_udta_sdp().