FFmpeg
Data Structures | Macros | Functions | Variables
prompeg.c File Reference

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

#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

#define PROMPEG_RTP_PT   0x60

Definition at line 92 of file prompeg.c.

Referenced by prompeg_write_fec().

#define PROMPEG_FEC_COL   0x0

Definition at line 93 of file prompeg.c.

Referenced by prompeg_write(), and prompeg_write_fec().

#define PROMPEG_FEC_ROW   0x1

Definition at line 94 of file prompeg.c.

Referenced by prompeg_write().

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

Definition at line 120 of file prompeg.c.

Definition at line 121 of file prompeg.c.

Function Documentation

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().

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().

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().

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

Definition at line 270 of file prompeg.c.

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().

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

Definition at line 386 of file prompeg.c.

static int prompeg_close ( URLContext h)
static

Definition at line 454 of file prompeg.c.

Variable Documentation

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 }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: prompeg.c:120
#define E
Definition: prompeg.c:121

Definition at line 123 of file prompeg.c.

const AVClass prompeg_class
static
Initial value:
= {
.class_name = "prompeg",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
static const AVOption options[]
Definition: prompeg.c:123

Definition at line 130 of file prompeg.c.

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,
}
#define URL_PROTOCOL_FLAG_NETWORK
Definition: url.h:34
static int prompeg_open(URLContext *h, const char *uri, int flags)
Definition: prompeg.c:270
static const AVClass prompeg_class
Definition: prompeg.c:130
static int prompeg_close(URLContext *h)
Definition: prompeg.c:454
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int prompeg_write(URLContext *h, const uint8_t *buf, int size)
Definition: prompeg.c:386

Definition at line 473 of file prompeg.c.