FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
h264_metadata_bsf.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "bsf.h"
#include "cbs.h"
#include "cbs_h264.h"
#include "h264.h"
#include "h264_sei.h"

Go to the source code of this file.

Data Structures

struct  H264MetadataContext
 

Macros

#define SET_OR_INFER(field, value, present_flag, infer)
 
#define CROP(border, unit)
 
#define OFFSET(x)   offsetof(H264MetadataContext, x)
 

Enumerations

enum  { PASS, INSERT, REMOVE }
 

Functions

static int h264_metadata_update_sps (AVBSFContext *bsf, H264RawSPS *sps)
 
static int h264_metadata_filter (AVBSFContext *bsf, AVPacket *out)
 
static int h264_metadata_init (AVBSFContext *bsf)
 
static void h264_metadata_close (AVBSFContext *bsf)
 

Variables

static const AVOption h264_metadata_options []
 
static const AVClass h264_metadata_class
 
static enum AVCodecID h264_metadata_codec_ids []
 
const AVBitStreamFilter ff_h264_metadata_bsf
 

Macro Definition Documentation

#define SET_OR_INFER (   field,
  value,
  present_flag,
  infer 
)
Value:
do { \
if (value >= 0) { \
field = value; \
need_vui = 1; \
} else if (!present_flag) \
field = infer; \
} while (0)
#define infer(name, value)
Definition: cbs_h2645.c:351
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
if(ret< 0)
Definition: vf_mcdeint.c:279

Referenced by h264_metadata_update_sps().

#define CROP (   border,
  unit 
)
Value:
do { \
if (ctx->crop_ ## border >= 0) { \
if (ctx->crop_ ## border % unit != 0) { \
av_log(bsf, AV_LOG_ERROR, "Invalid value for crop_%s: " \
"must be a multiple of %d.\n", #border, unit); \
return AVERROR(EINVAL); \
} \
sps->frame_crop_ ## border ## _offset = \
ctx->crop_ ## border / unit; \
sps->frame_cropping_flag = 1; \
} \
} while (0)
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
#define AVERROR(e)
Definition: error.h:43
return
AVFormatContext * ctx
Definition: movenc.c:48
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
if(ret< 0)
Definition: vf_mcdeint.c:279

Referenced by h264_metadata_update_sps(), and register_all().

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

Definition at line 446 of file h264_metadata_bsf.c.

Enumeration Type Documentation

anonymous enum
Enumerator
PASS 
INSERT 
REMOVE 

Definition at line 29 of file h264_metadata_bsf.c.

Function Documentation

static int h264_metadata_update_sps ( AVBSFContext bsf,
H264RawSPS sps 
)
static

Definition at line 69 of file h264_metadata_bsf.c.

Referenced by h264_metadata_filter(), and h264_metadata_init().

static int h264_metadata_filter ( AVBSFContext bsf,
AVPacket out 
)
static

Definition at line 206 of file h264_metadata_bsf.c.

static int h264_metadata_init ( AVBSFContext bsf)
static

Definition at line 402 of file h264_metadata_bsf.c.

static void h264_metadata_close ( AVBSFContext bsf)
static

Definition at line 440 of file h264_metadata_bsf.c.

Variable Documentation

const AVOption h264_metadata_options[]
static

Definition at line 447 of file h264_metadata_bsf.c.

const AVClass h264_metadata_class
static
Initial value:
= {
.class_name = "h264_metadata_bsf",
.item_name = av_default_item_name,
}
static const AVOption h264_metadata_options[]
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:193

Definition at line 505 of file h264_metadata_bsf.c.

enum AVCodecID h264_metadata_codec_ids[]
static
Initial value:

Definition at line 512 of file h264_metadata_bsf.c.

const AVBitStreamFilter ff_h264_metadata_bsf
Initial value:
= {
.name = "h264_metadata",
.priv_data_size = sizeof(H264MetadataContext),
.priv_class = &h264_metadata_class,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
Definition: cfhd.c:97
static enum AVCodecID h264_metadata_codec_ids[]
static int h264_metadata_init(AVBSFContext *bsf)
static const AVClass h264_metadata_class
static void h264_metadata_close(AVBSFContext *bsf)
static enum AVCodecID codec_ids[]
static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *out)

Definition at line 516 of file h264_metadata_bsf.c.