FFmpeg  4.0
Data Structures | Macros | Functions | Variables
mpeg2_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_mpeg2.h"
#include "mpeg12.h"

Go to the source code of this file.

Data Structures

struct  MPEG2MetadataContext
 

Macros

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

Functions

static int mpeg2_metadata_update_fragment (AVBSFContext *bsf, CodedBitstreamFragment *frag)
 
static int mpeg2_metadata_filter (AVBSFContext *bsf, AVPacket *out)
 
static int mpeg2_metadata_init (AVBSFContext *bsf)
 
static void mpeg2_metadata_close (AVBSFContext *bsf)
 

Variables

static const AVOption mpeg2_metadata_options []
 
static const AVClass mpeg2_metadata_class
 
static enum AVCodecID mpeg2_metadata_codec_ids []
 
const AVBitStreamFilter ff_mpeg2_metadata_bsf
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 268 of file mpeg2_metadata_bsf.c.

◆ FLAGS

Definition at line 269 of file mpeg2_metadata_bsf.c.

Function Documentation

◆ mpeg2_metadata_update_fragment()

static int mpeg2_metadata_update_fragment ( AVBSFContext bsf,
CodedBitstreamFragment frag 
)
static

Definition at line 49 of file mpeg2_metadata_bsf.c.

Referenced by mpeg2_metadata_filter(), and mpeg2_metadata_init().

◆ mpeg2_metadata_filter()

static int mpeg2_metadata_filter ( AVBSFContext bsf,
AVPacket out 
)
static

Definition at line 182 of file mpeg2_metadata_bsf.c.

◆ mpeg2_metadata_init()

static int mpeg2_metadata_init ( AVBSFContext bsf)
static

Definition at line 226 of file mpeg2_metadata_bsf.c.

◆ mpeg2_metadata_close()

static void mpeg2_metadata_close ( AVBSFContext bsf)
static

Definition at line 262 of file mpeg2_metadata_bsf.c.

Variable Documentation

◆ mpeg2_metadata_options

const AVOption mpeg2_metadata_options[]
static
Initial value:
= {
{ "display_aspect_ratio", "Set display aspect ratio (table 6-3)",
OFFSET(display_aspect_ratio), AV_OPT_TYPE_RATIONAL,
{ .dbl = 0.0 }, 0, 65535, FLAGS },
{ "frame_rate", "Set frame rate",
{ .dbl = 0.0 }, 0, UINT_MAX, FLAGS },
{ "video_format", "Set video format (table 6-6)",
OFFSET(video_format), AV_OPT_TYPE_INT,
{ .i64 = -1 }, -1, 7, FLAGS },
{ "colour_primaries", "Set colour primaries (table 6-7)",
OFFSET(colour_primaries), AV_OPT_TYPE_INT,
{ .i64 = -1 }, -1, 255, FLAGS },
{ "transfer_characteristics", "Set transfer characteristics (table 6-8)",
{ .i64 = -1 }, -1, 255, FLAGS },
{ "matrix_coefficients", "Set matrix coefficients (table 6-9)",
OFFSET(matrix_coefficients), AV_OPT_TYPE_INT,
{ .i64 = -1 }, -1, 255, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
static const struct TransferCharacteristics transfer_characteristics[AVCOL_TRC_NB]
#define FLAGS
#define OFFSET(x)

Definition at line 270 of file mpeg2_metadata_bsf.c.

◆ mpeg2_metadata_class

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

Definition at line 295 of file mpeg2_metadata_bsf.c.

◆ mpeg2_metadata_codec_ids

enum AVCodecID mpeg2_metadata_codec_ids[]
static
Initial value:
= {
}
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:220

Definition at line 302 of file mpeg2_metadata_bsf.c.

◆ ff_mpeg2_metadata_bsf

const AVBitStreamFilter ff_mpeg2_metadata_bsf
Initial value:
= {
.name = "mpeg2_metadata",
.priv_data_size = sizeof(MPEG2MetadataContext),
.priv_class = &mpeg2_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:114
static void mpeg2_metadata_close(AVBSFContext *bsf)
static const AVClass mpeg2_metadata_class
static enum AVCodecID mpeg2_metadata_codec_ids[]
static int mpeg2_metadata_filter(AVBSFContext *bsf, AVPacket *out)
static enum AVCodecID codec_ids[]
static int mpeg2_metadata_init(AVBSFContext *bsf)

Definition at line 306 of file mpeg2_metadata_bsf.c.