FFmpeg
Data Structures | Macros | Functions | Variables
av1dec.c File Reference
#include "config.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavcodec/av1_parse.h"
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AnnexBContext
 

Macros

#define OFFSET(x)   offsetof(AnnexBContext, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int leb (AVIOContext *pb, uint32_t *len)
 
static int read_obu (const uint8_t *buf, int size, int64_t *obu_size, int *type)
 
static int annexb_probe (const AVProbeData *p)
 
static int annexb_read_header (AVFormatContext *s)
 
static int annexb_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int annexb_read_close (AVFormatContext *s)
 

Variables

static const AVOption annexb_options []
 
static const AVClass annexb_demuxer_class
 
AVInputFormat ff_av1_demuxer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 254 of file av1dec.c.

◆ DEC

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 255 of file av1dec.c.

Function Documentation

◆ leb()

static int leb ( AVIOContext pb,
uint32_t *  len 
)
static

Definition at line 39 of file av1dec.c.

Referenced by annexb_probe(), and annexb_read_packet().

◆ read_obu()

static int read_obu ( const uint8_t buf,
int  size,
int64_t *  obu_size,
int type 
)
static

Definition at line 60 of file av1dec.c.

Referenced by annexb_probe().

◆ annexb_probe()

static int annexb_probe ( const AVProbeData p)
static

Definition at line 73 of file av1dec.c.

◆ annexb_read_header()

static int annexb_read_header ( AVFormatContext s)
static

Definition at line 147 of file av1dec.c.

◆ annexb_read_packet()

static int annexb_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 189 of file av1dec.c.

◆ annexb_read_close()

static int annexb_read_close ( AVFormatContext s)
static

Definition at line 246 of file av1dec.c.

Variable Documentation

◆ annexb_options

const AVOption annexb_options[]
static
Initial value:
= {
{ "framerate", "", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC},
{ NULL },
}

Definition at line 256 of file av1dec.c.

◆ annexb_demuxer_class

const AVClass annexb_demuxer_class
static
Initial value:
= {
.class_name = "AV1 Annex B demuxer",
.item_name = av_default_item_name,
.option = annexb_options,
}

Definition at line 261 of file av1dec.c.

◆ ff_av1_demuxer

AVInputFormat ff_av1_demuxer
Initial value:
= {
.name = "av1",
.long_name = NULL_IF_CONFIG_SMALL("AV1 Annex B"),
.priv_data_size = sizeof(AnnexBContext),
.extensions = "obu",
.priv_class = &annexb_demuxer_class,
}

Definition at line 268 of file av1dec.c.

annexb_read_header
static int annexb_read_header(AVFormatContext *s)
Definition: av1dec.c:147
OFFSET
#define OFFSET(x)
Definition: av1dec.c:254
annexb_probe
static int annexb_probe(const AVProbeData *p)
Definition: av1dec.c:73
AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
Definition: opt.h:236
annexb_options
static const AVOption annexb_options[]
Definition: av1dec.c:256
framerate
int framerate
Definition: h264_levels.c:65
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:463
annexb_read_packet
static int annexb_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: av1dec.c:189
AnnexBContext
Definition: av1dec.c:31
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
NULL
#define NULL
Definition: coverity.c:32
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
annexb_read_close
static int annexb_read_close(AVFormatContext *s)
Definition: av1dec.c:246
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
annexb_demuxer_class
static const AVClass annexb_demuxer_class
Definition: av1dec.c:261
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
DEC
#define DEC
Definition: av1dec.c:255
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565