FFmpeg
Loading...
Searching...
No Matches
side_data.c File Reference

Side data bitstream filter – remove side data from packets and from the stream, or select packets by their side data. More...

Go to the source code of this file.

Data Structures

struct  SideDataContext
 

Macros

#define OFFSET(x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_BSF_PARAM)
 
#define TYPE_CONST(type, handle)
 

Functions

static int side_data_init (AVBSFContext *ctx)
 
static int is_selected (const SideDataContext *s, const AVPacket *pkt)
 
static int side_data_filter (AVBSFContext *ctx, AVPacket *pkt)
 

Variables

static const AVOptionArrayDef types_def = { .sep = '+' }
 
static const AVOption options []
 
static const AVClass side_data_class
 
const FFBitStreamFilter ff_side_data_bsf
 

Detailed Description

Side data bitstream filter – remove side data from packets and from the stream, or select packets by their side data.

Definition in file side_data.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 87 of file side_data.c.

◆ FLAGS

◆ TYPE_CONST

#define TYPE_CONST ( type,
handle )
Value:
{ handle, NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_PKT_DATA_ ## type }, .flags = FLAGS, .unit = "type" },
#define FLAGS
Definition cmdutils.c:596
#define NULL
Definition coverity.c:32
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
enum MPFType type
Definition jpegmpfenc.c:55

Definition at line 89 of file side_data.c.

Function Documentation

◆ side_data_init()

static int side_data_init ( AVBSFContext * ctx)
static

Definition at line 40 of file side_data.c.

◆ is_selected()

static int is_selected ( const SideDataContext * s,
const AVPacket * pkt )
static

Definition at line 52 of file side_data.c.

Referenced by side_data_filter().

◆ side_data_filter()

static int side_data_filter ( AVBSFContext * ctx,
AVPacket * pkt )
static

Definition at line 65 of file side_data.c.

Variable Documentation

◆ types_def

const AVOptionArrayDef types_def = { .sep = '+' }
static

Definition at line 85 of file side_data.c.

◆ options

const AVOption options[]
static
Initial value:
= {
{ "remove", "side data types to remove, joined with '+'", OFFSET(remove), AV_OPT_TYPE_INT | AV_OPT_TYPE_FLAG_ARRAY, { .arr = &types_def }, 0, AV_PKT_DATA_NB - 1, FLAGS, .unit = "type" },
{ "select", "side data types of the packets to keep, joined with '+'", OFFSET(select), AV_OPT_TYPE_INT | AV_OPT_TYPE_FLAG_ARRAY, { .arr = &types_def }, 0, AV_PKT_DATA_NB - 1, FLAGS, .unit = "type" },
{ NULL },
}
#define OFFSET(x)
@ AV_OPT_TYPE_FLAG_ARRAY
May be combined with another regular option type to declare an array option.
Definition opt.h:345
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_PKT_DATA_NB
The number of side data types.
Definition packet.h:401
#define TYPE_CONST(type, handle)
Definition side_data.c:89
static const AVOptionArrayDef types_def
Definition side_data.c:85
#define FF_PACKET_SIDE_DATA_HANDLES(HANDLE)
The handle of each side data type: a short, stable name made of lower case letters,...

Definition at line 91 of file side_data.c.

◆ side_data_class

const AVClass side_data_class
static
Initial value:
= {
.class_name = "side_data bsf",
.item_name = av_default_item_name,
.option = options,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:247
#define LIBAVUTIL_VERSION_INT
Definition version.h:85

Definition at line 98 of file side_data.c.

◆ ff_side_data_bsf

const FFBitStreamFilter ff_side_data_bsf
Initial value:
= {
.p.name = "side_data",
.p.priv_class = &side_data_class,
.priv_data_size = sizeof(SideDataContext),
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:613
static const AVClass side_data_class
Definition side_data.c:98
static int side_data_init(AVBSFContext *ctx)
Definition side_data.c:40
static int side_data_filter(AVBSFContext *ctx, AVPacket *pkt)
Definition side_data.c:65
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
Definition h263dsp.c:29

Definition at line 105 of file side_data.c.