FFmpeg
Data Structures | Macros | Functions | Variables
prompeg.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/random_seed.h"
#include "avformat.h"
#include "config.h"
#include "url.h"

Go to the source code of this file.

Data Structures

struct  PrompegFec
 
struct  PrompegContext
 

Macros

#define PROMPEG_RTP_PT   0x60
 
#define PROMPEG_FEC_COL   0x0
 
#define PROMPEG_FEC_ROW   0x1
 
#define OFFSET(x)   offsetof(PrompegContext, x)
 
#define E   AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static void xor_fast (const uint8_t *in1, const uint8_t *in2, uint8_t *out, int size)
 
static int prompeg_create_bitstring (URLContext *h, const uint8_t *buf, int size, uint8_t **bitstring)
 
static int prompeg_write_fec (URLContext *h, PrompegFec *fec, uint8_t type)
 
static int prompeg_open (URLContext *h, const char *uri, int flags)
 
static int prompeg_init (URLContext *h, const uint8_t *buf, int size)
 
static int prompeg_write (URLContext *h, const uint8_t *buf, int size)
 
static int prompeg_close (URLContext *h)
 

Variables

static const AVOption options []
 
static const AVClass prompeg_class
 
const URLProtocol ff_prompeg_protocol
 

Detailed Description

Pro-MPEG Code of Practice #3 Release 2 FEC protocol

Author
Vlad Tarca vlad..nosp@m.tarc.nosp@m.a@gma.nosp@m.il.c.nosp@m.om

Definition in file prompeg.c.

Macro Definition Documentation

◆ PROMPEG_RTP_PT

#define PROMPEG_RTP_PT   0x60

Definition at line 91 of file prompeg.c.

◆ PROMPEG_FEC_COL

#define PROMPEG_FEC_COL   0x0

Definition at line 92 of file prompeg.c.

◆ PROMPEG_FEC_ROW

#define PROMPEG_FEC_ROW   0x1

Definition at line 93 of file prompeg.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(PrompegContext, x)

Definition at line 119 of file prompeg.c.

◆ E

Definition at line 120 of file prompeg.c.

Function Documentation

◆ xor_fast()

static void xor_fast ( const uint8_t *  in1,
const uint8_t *  in2,
uint8_t *  out,
int  size 
)
static

Definition at line 136 of file prompeg.c.

Referenced by prompeg_write().

◆ prompeg_create_bitstring()

static int prompeg_create_bitstring ( URLContext h,
const uint8_t *  buf,
int  size,
uint8_t **  bitstring 
)
static

Definition at line 176 of file prompeg.c.

Referenced by prompeg_write().

◆ prompeg_write_fec()

static int prompeg_write_fec ( URLContext h,
PrompegFec fec,
uint8_t  type 
)
static

Definition at line 217 of file prompeg.c.

Referenced by prompeg_write().

◆ prompeg_open()

static int prompeg_open ( URLContext h,
const char *  uri,
int  flags 
)
static

Definition at line 269 of file prompeg.c.

◆ prompeg_init()

static int prompeg_init ( URLContext h,
const uint8_t *  buf,
int  size 
)
static

Definition at line 319 of file prompeg.c.

Referenced by prompeg_write().

◆ prompeg_write()

static int prompeg_write ( URLContext h,
const uint8_t *  buf,
int  size 
)
static

Definition at line 384 of file prompeg.c.

◆ prompeg_close()

static int prompeg_close ( URLContext h)
static

Definition at line 450 of file prompeg.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "ttl", "Time to live (in milliseconds, multicast only)", OFFSET(ttl), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, .flags = E },
{ "l", "FEC L", OFFSET(l), AV_OPT_TYPE_INT, { .i64 = 5 }, 4, 20, .flags = E },
{ "d", "FEC D", OFFSET(d), AV_OPT_TYPE_INT, { .i64 = 5 }, 4, 20, .flags = E },
{ NULL }
}

Definition at line 122 of file prompeg.c.

◆ prompeg_class

const AVClass prompeg_class
static
Initial value:
= {
.class_name = "prompeg",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 129 of file prompeg.c.

◆ ff_prompeg_protocol

const URLProtocol ff_prompeg_protocol
Initial value:
= {
.name = "prompeg",
.url_open = prompeg_open,
.url_write = prompeg_write,
.url_close = prompeg_close,
.priv_data_size = sizeof(PrompegContext),
.priv_data_class = &prompeg_class,
}

Definition at line 469 of file prompeg.c.

URL_PROTOCOL_FLAG_NETWORK
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:33
prompeg_open
static int prompeg_open(URLContext *h, const char *uri, int flags)
Definition: prompeg.c:269
prompeg_class
static const AVClass prompeg_class
Definition: prompeg.c:129
PrompegContext
Definition: prompeg.c:101
OFFSET
#define OFFSET(x)
Definition: prompeg.c:119
options
static const AVOption options[]
Definition: prompeg.c:122
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
prompeg_close
static int prompeg_close(URLContext *h)
Definition: prompeg.c:450
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
E
#define E
Definition: prompeg.c:120
prompeg_write
static int prompeg_write(URLContext *h, const uint8_t *buf, int size)
Definition: prompeg.c:384
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:482