FFmpeg
Data Structures | Macros | Functions | Variables
extract_extradata_bsf.c File Reference
#include <stdint.h>
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "av1.h"
#include "av1_parse.h"
#include "bsf.h"
#include "bsf_internal.h"
#include "bytestream.h"
#include "h2645_parse.h"
#include "h264.h"
#include "hevc.h"
#include "startcode.h"
#include "vc1_common.h"

Go to the source code of this file.

Data Structures

struct  ExtractExtradataContext
 

Macros

#define OFFSET(x)   offsetof(ExtractExtradataContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_BSF_PARAM)
 

Functions

static int val_in_array (const int *arr, int len, int val)
 
static int extract_extradata_av1 (AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
 
static int extract_extradata_h2645 (AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
 
static int extract_extradata_vc1 (AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
 
static int extract_extradata_mpeg12 (AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
 
static int extract_extradata_mpeg4 (AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
 
static int extract_extradata_init (AVBSFContext *ctx)
 
static int extract_extradata_filter (AVBSFContext *ctx, AVPacket *pkt)
 
static void extract_extradata_close (AVBSFContext *ctx)
 

Variables

struct {
   enum AVCodecID   id
 
   int(*   extract )(AVBSFContext *ctx, AVPacket
      *pkt, uint8_t **data, int
      *size)
 
extract_tab []
 
static enum AVCodecID codec_ids []
 
static const AVOption options []
 
static const AVClass extract_extradata_class
 
const FFBitStreamFilter ff_extract_extradata_bsf
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 410 of file extract_extradata_bsf.c.

◆ FLAGS

Definition at line 411 of file extract_extradata_bsf.c.

Function Documentation

◆ val_in_array()

static int val_in_array ( const int arr,
int  len,
int  val 
)
static

Definition at line 51 of file extract_extradata_bsf.c.

Referenced by extract_extradata_av1(), and extract_extradata_h2645().

◆ extract_extradata_av1()

static int extract_extradata_av1 ( AVBSFContext ctx,
AVPacket pkt,
uint8_t **  data,
int size 
)
static

Definition at line 60 of file extract_extradata_bsf.c.

◆ extract_extradata_h2645()

static int extract_extradata_h2645 ( AVBSFContext ctx,
AVPacket pkt,
uint8_t **  data,
int size 
)
static

Definition at line 134 of file extract_extradata_bsf.c.

◆ extract_extradata_vc1()

static int extract_extradata_vc1 ( AVBSFContext ctx,
AVPacket pkt,
uint8_t **  data,
int size 
)
static

Definition at line 230 of file extract_extradata_bsf.c.

◆ extract_extradata_mpeg12()

static int extract_extradata_mpeg12 ( AVBSFContext ctx,
AVPacket pkt,
uint8_t **  data,
int size 
)
static

Definition at line 265 of file extract_extradata_bsf.c.

◆ extract_extradata_mpeg4()

static int extract_extradata_mpeg4 ( AVBSFContext ctx,
AVPacket pkt,
uint8_t **  data,
int size 
)
static

Definition at line 294 of file extract_extradata_bsf.c.

◆ extract_extradata_init()

static int extract_extradata_init ( AVBSFContext ctx)
static

Definition at line 340 of file extract_extradata_bsf.c.

◆ extract_extradata_filter()

static int extract_extradata_filter ( AVBSFContext ctx,
AVPacket pkt 
)
static

Definition at line 357 of file extract_extradata_bsf.c.

◆ extract_extradata_close()

static void extract_extradata_close ( AVBSFContext ctx)
static

Definition at line 389 of file extract_extradata_bsf.c.

Variable Documentation

◆ id

enum AVCodecID id

Definition at line 324 of file extract_extradata_bsf.c.

Referenced by accumulate_huff_bit_consumption(), add_tracked_method(), ape_tag_read_field(), asf_read_picture(), av_channel_from_string(), av_channel_layout_from_string(), av_codec_get_id(), av_new_program(), avi_add_ientry(), avi_get_ientry(), avpriv_new_chapter(), che_configure(), check_section_show_entries(), create_new_audio_stream(), decode_frame(), dxtory_decode_v1_rgb(), ebml_writer_add(), eval_expr(), exif_decode_tag(), ff_dca_vlc_calc_alloc_bits(), ff_dca_vlc_calc_quant_bits(), ff_dca_vlc_enc_alloc(), ff_dca_vlc_enc_quant(), ff_flac_parse_picture(), ff_get_wav_header(), ff_jpegls_decode_lse(), ff_mjpeg_decode_sos(), ff_mov_read_stsd_entries(), ff_rtsp_tcp_read_packet(), ff_rtsp_tcp_write_packet(), ff_wav_codec_get_id(), ffat_update_ctx(), flush_packet(), frame_configure_elements(), get_codec_data(), get_sindex(), LLVMFuzzerTestOneInput(), lsp_unquant_high(), lsp_unquant_lbr(), lsp_unquant_nb(), lvf_read_header(), lvf_read_packet(), mark_section_show_entries(), mjpeg_decode_app(), mov_codec_id(), mov_read_covr(), mov_read_frma(), output_configure(), parse_object_segment(), parse_palette_segment(), print_section(), put_system_header(), qdm2_parse_subpacket(), read_apic(), remap_deprecated_codec_id(), remove_sps(), remove_vps(), rso_read_header(), set_codec_from_probe_data(), sol_read_header(), txd_read_packet(), v4l2_get_ext_ctrl(), v4l2_set_ext_ctrl(), wavpack_decode_block(), webm_reformat_vtt(), webvtt_write_packet(), write_chapter(), and wv_read_block_header().

◆ extract

int(* extract) (AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)

Definition at line 325 of file extract_extradata_bsf.c.

◆ extract_tab

const { ... } extract_tab[]

◆ codec_ids

enum AVCodecID codec_ids[]
static

◆ options

const AVOption options[]
static
Initial value:
= {
{ "remove", "remove the extradata from the bitstream", OFFSET(remove), AV_OPT_TYPE_INT,
{ .i64 = 0 }, 0, 1, FLAGS },
{ NULL },
}

Definition at line 412 of file extract_extradata_bsf.c.

◆ extract_extradata_class

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

Definition at line 418 of file extract_extradata_bsf.c.

◆ ff_extract_extradata_bsf

const FFBitStreamFilter ff_extract_extradata_bsf
Initial value:
= {
.p.name = "extract_extradata",
.p.codec_ids = codec_ids,
.p.priv_class = &extract_extradata_class,
.priv_data_size = sizeof(ExtractExtradataContext),
}

Definition at line 425 of file extract_extradata_bsf.c.

AV_CODEC_ID_MPEG4
@ AV_CODEC_ID_MPEG4
Definition: codec_id.h:62
extract_extradata_h2645
static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
Definition: extract_extradata_bsf.c:134
extract_extradata_class
static const AVClass extract_extradata_class
Definition: extract_extradata_bsf.c:418
AV_CODEC_ID_AVS2
@ AV_CODEC_ID_AVS2
Definition: codec_id.h:244
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
init
static int init
Definition: av_tx.c:47
extract_extradata_filter
static int extract_extradata_filter(AVBSFContext *ctx, AVPacket *pkt)
Definition: extract_extradata_bsf.c:357
extract_extradata_mpeg12
static int extract_extradata_mpeg12(AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
Definition: extract_extradata_bsf.c:265
codec_ids
static enum AVCodecID codec_ids[]
Definition: extract_extradata_bsf.c:396
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: codec_id.h:77
FLAGS
#define FLAGS
Definition: extract_extradata_bsf.c:411
AV_CODEC_ID_AVS3
@ AV_CODEC_ID_AVS3
Definition: codec_id.h:246
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
AV_CODEC_ID_AV1
@ AV_CODEC_ID_AV1
Definition: codec_id.h:279
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
OFFSET
#define OFFSET(x)
Definition: extract_extradata_bsf.c:410
AV_CODEC_ID_MPEG1VIDEO
@ AV_CODEC_ID_MPEG1VIDEO
Definition: codec_id.h:51
extract_extradata_init
static int extract_extradata_init(AVBSFContext *ctx)
Definition: extract_extradata_bsf.c:340
options
static const AVOption options[]
Definition: extract_extradata_bsf.c:412
extract_extradata_close
static void extract_extradata_close(AVBSFContext *ctx)
Definition: extract_extradata_bsf.c:389
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:48
AV_CODEC_ID_CAVS
@ AV_CODEC_ID_CAVS
Definition: codec_id.h:137
AV_CODEC_ID_HEVC
@ AV_CODEC_ID_HEVC
Definition: codec_id.h:224
AV_CODEC_ID_VC1
@ AV_CODEC_ID_VC1
Definition: codec_id.h:120
ExtractExtradataContext
Definition: extract_extradata_bsf.c:35
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
extract_extradata_mpeg4
static int extract_extradata_mpeg4(AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
Definition: extract_extradata_bsf.c:294
extract_extradata_vc1
static int extract_extradata_vc1(AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
Definition: extract_extradata_bsf.c:230
extract_extradata_av1
static int extract_extradata_av1(AVBSFContext *ctx, AVPacket *pkt, uint8_t **data, int *size)
Definition: extract_extradata_bsf.c:60
AV_CODEC_ID_MPEG2VIDEO
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
Definition: codec_id.h:52