44 for (
unsigned i = 0;
i <
s->nb_remove;
i++)
46 &
ctx->par_out->nb_coded_side_data,
57 for (
unsigned i = 0;
i <
s->nb_select;
i++)
78 for (
unsigned i = 0;
i <
s->nb_remove;
i++)
87#define OFFSET(x) offsetof(SideDataContext, x)
88#define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_BSF_PARAM)
89#define TYPE_CONST(type, handle) \
90 { handle, NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_PKT_DATA_ ## type }, .flags = FLAGS, .unit = "type" },
92 {
"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" },
93 {
"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" },
99 .class_name =
"side_data bsf",
106 .p.name =
"side_data",
static AVFormatContext * ctx
const FFBitStreamFilter ff_side_data_bsf
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
#define i(width, name, range_min, range_max)
int(* init)(AVBSFContext *ctx)
@ AV_OPT_TYPE_FLAG_ARRAY
May be combined with another regular option type to declare an array option.
@ AV_OPT_TYPE_INT
Underlying C type is int.
void av_packet_side_data_remove(AVPacketSideData *sd, int *pnb_sd, enum AVPacketSideDataType type)
Remove side data of the given type from a side data array.
const AVPacketSideData * av_packet_side_data_get(const AVPacketSideData *sd, int nb_sd, enum AVPacketSideDataType type)
Get side information from a side data array.
@ AV_PKT_DATA_NB
The number of side data types.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
static int is_selected(const SideDataContext *s, const AVPacket *pkt)
#define TYPE_CONST(type, handle)
static const AVClass side_data_class
static int side_data_init(AVBSFContext *ctx)
static int side_data_filter(AVBSFContext *ctx, AVPacket *pkt)
static const AVOptionArrayDef types_def
#define FF_PACKET_SIDE_DATA_HANDLES(HANDLE)
The handle of each side data type: a short, stable name made of lower case letters,...
The bitstream filter state.
Describe the class of an AVClass context structure.
May be set as default_val for AV_OPT_TYPE_FLAG_ARRAY options.
This structure stores compressed data.
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)