#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"
#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, const char *dest_type, int ttl) |
static void | sdp_write_header (char *buff, int size, struct sdp_session_level *s) |
static int | resolve_destination (char *dest_addr, int size, char *type, int type_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 * | xiph_extradata2config (AVCodecContext *c) |
static int | latm_context2profilelevel (AVCodecContext *c) |
static char * | latm_context2config (AVCodecContext *c) |
static char * | sdp_write_media_attributes (char *buff, int size, AVCodecContext *c, int payload_type, AVFormatContext *fmt) |
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 | av_sdp_create (AVFormatContext *ac[], int n_files, char *buf, int size) |
Generate an SDP for an RTP session. | |
int | avf_sdp_create (AVFormatContext *ac[], int n_files, char *buff, int size) |
#define MAX_EXTRADATA_SIZE ((INT_MAX - 10) / 2) |
Definition at line 38 of file sdp.c.
Referenced by extradata2config(), and extradata2psets().
#define MAX_PSET_SIZE 1024 |
Definition at line 153 of file sdp.c.
Referenced by extradata2psets().
int av_sdp_create | ( | AVFormatContext * | ac[], | |
int | n_files, | |||
char * | buf, | |||
int | size | |||
) |
Generate an SDP for an RTP session.
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 | |
buf | buffer where the SDP will be stored (must be allocated by the caller) | |
size | the size of the buffer |
Definition at line 556 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 | |||
) |
static char* extradata2config | ( | AVCodecContext * | c | ) | [static] |
Definition at line 215 of file sdp.c.
Referenced by sdp_write_media_attributes().
static char* extradata2psets | ( | AVCodecContext * | c | ) | [static] |
Definition at line 154 of file sdp.c.
Referenced by sdp_write_media_attributes().
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.
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 | |
fmt | the AVFormatContext, which might contain options modifying the generated SDP |
Definition at line 530 of file sdp.c.
Referenced by av_sdp_create(), and mov_write_udta_sdp().
static char* latm_context2config | ( | AVCodecContext * | c | ) | [static] |
Definition at line 334 of file sdp.c.
Referenced by sdp_write_media_attributes().
static int latm_context2profilelevel | ( | AVCodecContext * | c | ) | [static] |
Definition at line 305 of file sdp.c.
Referenced by sdp_write_media_attributes().
static int resolve_destination | ( | char * | dest_addr, | |
int | size, | |||
char * | type, | |||
int | type_size | |||
) | [static] |
Definition at line 88 of file sdp.c.
Referenced by av_sdp_create().
static int sdp_get_address | ( | char * | dest_addr, | |
int | size, | |||
int * | ttl, | |||
const char * | url | |||
) | [static] |
Definition at line 122 of file sdp.c.
Referenced by av_sdp_create().
static void sdp_write_address | ( | char * | buff, | |
int | size, | |||
const char * | dest_addr, | |||
const char * | dest_type, | |||
int | ttl | |||
) | [static] |
Definition at line 57 of file sdp.c.
Referenced by ff_sdp_write_media(), and sdp_write_header().
static void sdp_write_header | ( | char * | buff, | |
int | size, | |||
struct sdp_session_level * | s | |||
) | [static] |
Definition at line 73 of file sdp.c.
Referenced by av_sdp_create().
static char* sdp_write_media_attributes | ( | char * | buff, | |
int | size, | |||
AVCodecContext * | c, | |||
int | payload_type, | |||
AVFormatContext * | fmt | |||
) | [static] |
Definition at line 370 of file sdp.c.
Referenced by ff_sdp_write_media().
static char* xiph_extradata2config | ( | AVCodecContext * | c | ) | [static] |
Definition at line 236 of file sdp.c.
Referenced by sdp_write_media_attributes().