FFmpeg
Data Structures | Macros | Functions | Variables
hapqa_extract_bsf.c File Reference
#include "bsf.h"
#include "bsf_internal.h"
#include "bytestream.h"
#include "hap.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  HapqaExtractContext
 

Macros

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

Functions

static int check_texture (HapqaExtractContext *ctx, int section_type)
 
static int hapqa_extract (AVBSFContext *bsf, AVPacket *pkt)
 

Variables

static enum AVCodecID codec_ids []
 
static const AVOption options []
 
static const AVClass hapqa_extract_class
 
const FFBitStreamFilter ff_hapqa_extract_bsf
 

Detailed Description

HAPQA extract bitstream filter extract one of the two textures of the HAQA

Definition in file hapqa_extract_bsf.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 114 of file hapqa_extract_bsf.c.

◆ FLAGS

Definition at line 115 of file hapqa_extract_bsf.c.

Function Documentation

◆ check_texture()

static int check_texture ( HapqaExtractContext ctx,
int  section_type 
)
static

Definition at line 40 of file hapqa_extract_bsf.c.

Referenced by hapqa_extract().

◆ hapqa_extract()

static int hapqa_extract ( AVBSFContext bsf,
AVPacket pkt 
)
static

Definition at line 50 of file hapqa_extract_bsf.c.

Variable Documentation

◆ codec_ids

enum AVCodecID codec_ids[]
static
Initial value:

Definition at line 110 of file hapqa_extract_bsf.c.

◆ options

const AVOption options[]
static
Initial value:
= {
{ "texture", "texture to keep", OFFSET(texture), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, FLAGS, "texture" },
{ "color", "keep HapQ texture", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, FLAGS, "texture" },
{ "alpha", "keep HapAlphaOnly texture", 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, FLAGS, "texture" },
{ NULL },
}

Definition at line 116 of file hapqa_extract_bsf.c.

◆ hapqa_extract_class

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

Definition at line 123 of file hapqa_extract_bsf.c.

◆ ff_hapqa_extract_bsf

const FFBitStreamFilter ff_hapqa_extract_bsf
Initial value:
= {
.p.name = "hapqa_extract",
.p.codec_ids = codec_ids,
.p.priv_class = &hapqa_extract_class,
.priv_data_size = sizeof(HapqaExtractContext),
}

Definition at line 130 of file hapqa_extract_bsf.c.

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
codec_ids
static enum AVCodecID codec_ids[]
Definition: hapqa_extract_bsf.c:110
hapqa_extract
static int hapqa_extract(AVBSFContext *bsf, AVPacket *pkt)
Definition: hapqa_extract_bsf.c:50
options
static const AVOption options[]
Definition: hapqa_extract_bsf.c:116
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
OFFSET
#define OFFSET(x)
Definition: hapqa_extract_bsf.c:114
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
AV_CODEC_ID_HAP
@ AV_CODEC_ID_HAP
Definition: codec_id.h:241
FLAGS
#define FLAGS
Definition: hapqa_extract_bsf.c:115
hapqa_extract_class
static const AVClass hapqa_extract_class
Definition: hapqa_extract_bsf.c:123
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
HapqaExtractContext
Definition: hapqa_extract_bsf.c:35
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:234