FFmpeg  4.0
Data Structures | Macros | Functions | Variables
codec2.c File Reference
#include <memory.h>
#include "libavcodec/codec2utils.h"
#include "libavutil/intreadwrite.h"
#include "avio_internal.h"
#include "avformat.h"
#include "internal.h"
#include "rawdec.h"
#include "rawenc.h"
#include "pcm.h"

Go to the source code of this file.

Data Structures

struct  Codec2Context
 

Macros

#define AVPRIV_CODEC2_HEADER_SIZE   7
 
#define AVPRIV_CODEC2_MAGIC   0xC0DEC2
 
#define EXPECTED_CODEC2_MAJOR_VERSION   0
 
#define EXPECTED_CODEC2_MINOR_VERSION   8
 
#define FRAMES_PER_PACKET
 

Functions

static int codec2_probe (AVProbeData *p)
 
static int codec2_read_header_common (AVFormatContext *s, AVStream *st)
 
static int codec2_read_header (AVFormatContext *s)
 
static int codec2_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int codec2_write_header (AVFormatContext *s)
 
static int codec2raw_read_header (AVFormatContext *s)
 

Variables

static const AVOption codec2_options []
 
static const AVOption codec2raw_options []
 
static const AVClass codec2_mux_class
 
static const AVClass codec2_demux_class
 
static const AVClass codec2raw_demux_class
 

Macro Definition Documentation

◆ AVPRIV_CODEC2_HEADER_SIZE

#define AVPRIV_CODEC2_HEADER_SIZE   7

Definition at line 32 of file codec2.c.

Referenced by codec2_read_header().

◆ AVPRIV_CODEC2_MAGIC

#define AVPRIV_CODEC2_MAGIC   0xC0DEC2

Definition at line 33 of file codec2.c.

Referenced by codec2_probe(), codec2_read_header(), and codec2_write_header().

◆ EXPECTED_CODEC2_MAJOR_VERSION

#define EXPECTED_CODEC2_MAJOR_VERSION   0

Definition at line 37 of file codec2.c.

Referenced by codec2_probe(), and codec2_read_header().

◆ EXPECTED_CODEC2_MINOR_VERSION

#define EXPECTED_CODEC2_MINOR_VERSION   8

Definition at line 38 of file codec2.c.

Referenced by codec2_probe().

◆ FRAMES_PER_PACKET

#define FRAMES_PER_PACKET
Value:
{ "frames_per_packet", "Number of frames to read at a time. Higher = faster decoding, lower granularity", \
offsetof(Codec2Context, frames_per_packet), AV_OPT_TYPE_INT, {.i64 = 1}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM}
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:277

Definition at line 204 of file codec2.c.

Function Documentation

◆ codec2_probe()

static int codec2_probe ( AVProbeData p)
static

Definition at line 46 of file codec2.c.

◆ codec2_read_header_common()

static int codec2_read_header_common ( AVFormatContext s,
AVStream st 
)
static

Definition at line 64 of file codec2.c.

Referenced by codec2_read_header(), and codec2raw_read_header().

◆ codec2_read_header()

static int codec2_read_header ( AVFormatContext s)
static

Definition at line 89 of file codec2.c.

◆ codec2_read_packet()

static int codec2_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 124 of file codec2.c.

◆ codec2_write_header()

static int codec2_write_header ( AVFormatContext s)
static

Definition at line 152 of file codec2.c.

◆ codec2raw_read_header()

static int codec2raw_read_header ( AVFormatContext s)
static

Definition at line 175 of file codec2.c.

Variable Documentation

◆ codec2_options

const AVOption codec2_options[]
static
Initial value:
= {
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define FRAMES_PER_PACKET
Definition: codec2.c:204

Definition at line 208 of file codec2.c.

◆ codec2raw_options

const AVOption codec2raw_options[]
static
Initial value:
= {
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define FRAMES_PER_PACKET
Definition: codec2.c:204
#define AVPRIV_CODEC2_AVOPTIONS(desc, classname, min_val, default_val, option_flags)
Definition: codec2utils.h:36
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:277

Definition at line 213 of file codec2.c.

◆ codec2_mux_class

const AVClass codec2_mux_class
static
Initial value:
= {
.class_name = "codec2 muxer",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191

Definition at line 219 of file codec2.c.

◆ codec2_demux_class

const AVClass codec2_demux_class
static
Initial value:
= {
.class_name = "codec2 demuxer",
.item_name = av_default_item_name,
.option = codec2_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 codec2_options[]
Definition: codec2.c:208

Definition at line 226 of file codec2.c.

◆ codec2raw_demux_class

const AVClass codec2raw_demux_class
static
Initial value:
= {
.class_name = "codec2raw demuxer",
.item_name = av_default_item_name,
.option = codec2raw_options,
}
static const AVOption codec2raw_options[]
Definition: codec2.c:213
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191

Definition at line 234 of file codec2.c.