FFmpeg
Data Structures | Macros | Functions | Variables
s302m.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/log.h"
#include "libavutil/reverse.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  S302Context
 

Macros

#define AES3_HEADER_LEN   4
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int s302m_parse_frame_header (AVCodecContext *avctx, const uint8_t *buf, int buf_size)
 
static int s302m_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 

Variables

static const AVOption s302m_options []
 
static const AVClass s302m_class
 
const FFCodec ff_s302m_decoder
 

Macro Definition Documentation

◆ AES3_HEADER_LEN

#define AES3_HEADER_LEN   4

Definition at line 32 of file s302m.c.

◆ FLAGS

Definition at line 212 of file s302m.c.

Function Documentation

◆ s302m_parse_frame_header()

static int s302m_parse_frame_header ( AVCodecContext avctx,
const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 39 of file s302m.c.

Referenced by s302m_decode_frame().

◆ s302m_decode_frame()

static int s302m_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 100 of file s302m.c.

Variable Documentation

◆ s302m_options

const AVOption s302m_options[]
static
Initial value:
= {
{"non_pcm_mode", "Chooses what to do with NON-PCM", 0x42, AV_OPT_TYPE_INT, {.i64 = 3}, 0, 3, FLAGS, .unit = "non_pcm_mode"},
{"copy" , "Pass NON-PCM through unchanged" , 0, AV_OPT_TYPE_CONST, {.i64 = 0}, 0, 3, FLAGS, .unit = "non_pcm_mode"},
{"drop" , "Drop NON-PCM" , 0, AV_OPT_TYPE_CONST, {.i64 = 1}, 0, 3, FLAGS, .unit = "non_pcm_mode"},
{"decode_copy" , "Decode if possible else passthrough", 0, AV_OPT_TYPE_CONST, {.i64 = 2}, 0, 3, FLAGS, .unit = "non_pcm_mode"},
{"decode_drop" , "Decode if possible else drop" , 0, AV_OPT_TYPE_CONST, {.i64 = 3}, 0, 3, FLAGS, .unit = "non_pcm_mode"},
{NULL}
}

Definition at line 213 of file s302m.c.

◆ s302m_class

const AVClass s302m_class
static
Initial value:
= {
.class_name = "SMPTE 302M Decoder",
.item_name = av_default_item_name,
.option = s302m_options,
}

Definition at line 222 of file s302m.c.

◆ ff_s302m_decoder

const FFCodec ff_s302m_decoder
Initial value:
= {
.p.name = "s302m",
CODEC_LONG_NAME("SMPTE 302M"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.priv_class = &s302m_class,
.priv_data_size = sizeof(S302Context),
.p.capabilities = AV_CODEC_CAP_CHANNEL_CONF |
}

Definition at line 229 of file s302m.c.

s302m_class
static const AVClass s302m_class
Definition: s302m.c:222
AV_CODEC_ID_S302M
@ AV_CODEC_ID_S302M
Definition: codec_id.h:360
FLAGS
#define FLAGS
Definition: s302m.c:212
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:311
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
S302Context
Definition: s302m.c:34
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:106
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
s302m_decode_frame
static int s302m_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Definition: s302m.c:100
s302m_options
static const AVOption s302m_options[]
Definition: s302m.c:213
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299