FFmpeg
Data Structures | Macros | Functions | Variables
prompeg.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.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 92 of file prompeg.c.

◆ PROMPEG_FEC_COL

#define PROMPEG_FEC_COL   0x0

Definition at line 93 of file prompeg.c.

◆ PROMPEG_FEC_ROW

#define PROMPEG_FEC_ROW   0x1

Definition at line 94 of file prompeg.c.

◆ OFFSET

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

Definition at line 120 of file prompeg.c.

◆ E

Definition at line 121 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 137 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 177 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 218 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 270 of file prompeg.c.

◆ prompeg_init()

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

Definition at line 321 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 386 of file prompeg.c.

◆ prompeg_close()

static int prompeg_close ( URLContext h)
static

Definition at line 454 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 123 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 130 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 473 of file prompeg.c.

URL_PROTOCOL_FLAG_NETWORK
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
prompeg_open
static int prompeg_open(URLContext *h, const char *uri, int flags)
Definition: prompeg.c:270
prompeg_class
static const AVClass prompeg_class
Definition: prompeg.c:130
PrompegContext
Definition: prompeg.c:102
OFFSET
#define OFFSET(x)
Definition: prompeg.c:120
options
static const AVOption options[]
Definition: prompeg.c:123
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:191
prompeg_close
static int prompeg_close(URLContext *h)
Definition: prompeg.c:454
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
E
#define E
Definition: prompeg.c:121
prompeg_write
static int prompeg_write(URLContext *h, const uint8_t *buf, int size)
Definition: prompeg.c:386
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565