rtpenc.c File Reference
#include "avformat.h"
#include "mpegts.h"
#include "internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/random_seed.h"
#include "libavutil/opt.h"
#include "rtpenc.h"
Include dependency graph for rtpenc.c:

Go to the source code of this file.

Macros

#define RTCP_SR_SIZE   28
 

Functions

static int is_supported (enum AVCodecID id)
 
static int rtp_write_header (AVFormatContext *s1)
 
static void rtcp_send_sr (AVFormatContext *s1, int64_t ntp_time)
 
void ff_rtp_send_data (AVFormatContext *s1, const uint8_t *buf1, int len, int m)
 
static int rtp_send_samples (AVFormatContext *s1, const uint8_t *buf1, int size, int sample_size_bits)
 
static void rtp_send_mpegaudio (AVFormatContext *s1, const uint8_t *buf1, int size)
 
static void rtp_send_raw (AVFormatContext *s1, const uint8_t *buf1, int size)
 
static void rtp_send_mpegts_raw (AVFormatContext *s1, const uint8_t *buf1, int size)
 
static int rtp_send_ilbc (AVFormatContext *s1, const uint8_t *buf, int size)
 
static int rtp_write_packet (AVFormatContext *s1, AVPacket *pkt)
 
static int rtp_write_trailer (AVFormatContext *s1)
 

Variables

static const AVOption options []
 
static const AVClass rtp_muxer_class
 
AVOutputFormat ff_rtp_muxer
 

Macro Definition Documentation

#define RTCP_SR_SIZE   28

Definition at line 49 of file rtpenc.c.

Referenced by rtp_write_packet().

Function Documentation

static int is_supported ( enum AVCodecID  id)
static

Definition at line 51 of file rtpenc.c.

Referenced by rtp_write_header().

static void rtcp_send_sr ( AVFormatContext s1,
int64_t  ntp_time 
)
static

Definition at line 267 of file rtpenc.c.

Referenced by rtp_write_packet().

static int rtp_send_ilbc ( AVFormatContext s1,
const uint8_t buf,
int  size 
)
static

Definition at line 456 of file rtpenc.c.

Referenced by rtp_write_packet().

static void rtp_send_mpegaudio ( AVFormatContext s1,
const uint8_t buf1,
int  size 
)
static

Definition at line 359 of file rtpenc.c.

Referenced by rtp_write_packet().

static void rtp_send_mpegts_raw ( AVFormatContext s1,
const uint8_t buf1,
int  size 
)
static

Definition at line 433 of file rtpenc.c.

Referenced by rtp_write_packet().

static void rtp_send_raw ( AVFormatContext s1,
const uint8_t buf1,
int  size 
)
static

Definition at line 411 of file rtpenc.c.

Referenced by rtp_write_packet().

static int rtp_send_samples ( AVFormatContext s1,
const uint8_t buf1,
int  size,
int  sample_size_bits 
)
static

Definition at line 330 of file rtpenc.c.

Referenced by rtp_write_packet().

static int rtp_write_header ( AVFormatContext s1)
static

Definition at line 89 of file rtpenc.c.

static int rtp_write_packet ( AVFormatContext s1,
AVPacket pkt 
)
static

Definition at line 486 of file rtpenc.c.

static int rtp_write_trailer ( AVFormatContext s1)
static

Definition at line 592 of file rtpenc.c.

Variable Documentation

AVOutputFormat ff_rtp_muxer
Initial value:
= {
.name = "rtp",
.long_name = NULL_IF_CONFIG_SMALL("RTP output"),
.priv_data_size = sizeof(RTPMuxContext),
.audio_codec = AV_CODEC_ID_PCM_MULAW,
.video_codec = AV_CODEC_ID_MPEG4,
.priv_class = &rtp_muxer_class,
}
static int write_packet(AVFormatContext *s, AVPacket *pkt)
static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: rtpenc.c:486
static const AVClass rtp_muxer_class
Definition: rtpenc.c:42
static int rtp_write_header(AVFormatContext *s1)
Definition: rtpenc.c:89
static int write_trailer(AVFormatContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
struct RTPMuxContext RTPMuxContext
Definition: rtpenc.h:67
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:470
static int rtp_write_trailer(AVFormatContext *s1)
Definition: rtpenc.c:592

Definition at line 601 of file rtpenc.c.

const AVOption options[]
static
Initial value:
= {
{ "payload_type", "Specify RTP payload type", offsetof(RTPMuxContext, payload_type), AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 127, AV_OPT_FLAG_ENCODING_PARAM },
{ "ssrc", "Stream identifier", offsetof(RTPMuxContext, ssrc), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ "cname", "CNAME to include in RTCP SR packets", offsetof(RTPMuxContext, cname), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM },
{ "seq", "Starting sequence number", offsetof(RTPMuxContext, seq), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 65535, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
NULL
Definition: eval.c:55
#define FF_RTP_FLAG_OPTS(ctx, fieldname)
Definition: rtpenc.h:74
static int flags
Definition: cpu.c:23

Definition at line 33 of file rtpenc.c.

const AVClass rtp_muxer_class
static
Initial value:
= {
.class_name = "RTP muxer",
.item_name = av_default_item_name,
.option = options,
}
av_default_item_name
static const AVOption options[]
Definition: rtpenc.c:33
LIBAVUTIL_VERSION_INT
Definition: eval.c:55

Definition at line 42 of file rtpenc.c.