FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
remove_extradata_bsf.c File Reference
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "av1_parse.h"
#include "bsf.h"
#include "bsf_internal.h"
#include "h264.h"
#include "hevc.h"
#include "internal.h"
#include "vc1_common.h"

Go to the source code of this file.

Data Structures

struct  RemoveExtradataContext
 

Macros

#define START_CODE   0x000001
 
#define OFFSET(x)   offsetof(RemoveExtradataContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
 

Enumerations

enum  RemoveFreq { REMOVE_FREQ_KEYFRAME, REMOVE_FREQ_ALL, REMOVE_FREQ_NONKEYFRAME }
 

Functions

static int av1_split (const uint8_t *buf, int buf_size, void *logctx)
 
static int h264_split (const uint8_t *buf, int buf_size)
 
static int hevc_split (const uint8_t *buf, int buf_size)
 
static int mpegvideo_split (const uint8_t *buf, int buf_size)
 
static int mpeg4video_split (const uint8_t *buf, int buf_size)
 
static int vc1_split (const uint8_t *buf, int buf_size)
 
static int remove_extradata (AVBSFContext *ctx, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass remove_extradata_class
 
const AVBitStreamFilter ff_remove_extradata_bsf
 

Macro Definition Documentation

◆ START_CODE

#define START_CODE   0x000001

Definition at line 38 of file remove_extradata_bsf.c.

◆ OFFSET

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

Definition at line 230 of file remove_extradata_bsf.c.

◆ FLAGS

Definition at line 231 of file remove_extradata_bsf.c.

Enumeration Type Documentation

◆ RemoveFreq

enum RemoveFreq
Enumerator
REMOVE_FREQ_KEYFRAME 
REMOVE_FREQ_ALL 
REMOVE_FREQ_NONKEYFRAME 

Definition at line 32 of file remove_extradata_bsf.c.

Function Documentation

◆ av1_split()

static int av1_split ( const uint8_t *  buf,
int  buf_size,
void *  logctx 
)
static

Definition at line 45 of file remove_extradata_bsf.c.

Referenced by remove_extradata().

◆ h264_split()

static int h264_split ( const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 66 of file remove_extradata_bsf.c.

Referenced by remove_extradata().

◆ hevc_split()

static int hevc_split ( const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 103 of file remove_extradata_bsf.c.

Referenced by remove_extradata().

◆ mpegvideo_split()

static int mpegvideo_split ( const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 135 of file remove_extradata_bsf.c.

Referenced by remove_extradata().

◆ mpeg4video_split()

static int mpeg4video_split ( const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 150 of file remove_extradata_bsf.c.

Referenced by remove_extradata().

◆ vc1_split()

static int vc1_split ( const uint8_t *  buf,
int  buf_size 
)
static

Definition at line 164 of file remove_extradata_bsf.c.

Referenced by remove_extradata().

◆ remove_extradata()

static int remove_extradata ( AVBSFContext ctx,
AVPacket pkt 
)
static

Definition at line 181 of file remove_extradata_bsf.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "k", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_NONKEYFRAME }, .flags = FLAGS, .unit = "freq" },
{ "keyframe", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_KEYFRAME }, .flags = FLAGS, .unit = "freq" },
{ "e", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_ALL }, .flags = FLAGS, .unit = "freq" },
{ "all", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = REMOVE_FREQ_ALL }, .flags = FLAGS, .unit = "freq" },
{ NULL },
}

Definition at line 232 of file remove_extradata_bsf.c.

◆ remove_extradata_class

const AVClass remove_extradata_class
static
Initial value:
= {
.class_name = "remove_extradata",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 241 of file remove_extradata_bsf.c.

◆ ff_remove_extradata_bsf

const AVBitStreamFilter ff_remove_extradata_bsf
Initial value:
= {
.name = "remove_extra",
.priv_data_size = sizeof(RemoveExtradataContext),
.priv_class = &remove_extradata_class,
}

Definition at line 248 of file remove_extradata_bsf.c.

remove_extradata
static int remove_extradata(AVBSFContext *ctx, AVPacket *pkt)
Definition: remove_extradata_bsf.c:181
OFFSET
#define OFFSET(x)
Definition: remove_extradata_bsf.c:230
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
RemoveExtradataContext
Definition: remove_extradata_bsf.c:40
remove_extradata_class
static const AVClass remove_extradata_class
Definition: remove_extradata_bsf.c:241
REMOVE_FREQ_ALL
@ REMOVE_FREQ_ALL
Definition: remove_extradata_bsf.c:34
REMOVE_FREQ_KEYFRAME
@ REMOVE_FREQ_KEYFRAME
Definition: remove_extradata_bsf.c:33
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:235
REMOVE_FREQ_NONKEYFRAME
@ REMOVE_FREQ_NONKEYFRAME
Definition: remove_extradata_bsf.c:35
FLAGS
#define FLAGS
Definition: remove_extradata_bsf.c:231
options
static const AVOption options[]
Definition: remove_extradata_bsf.c:232
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:233