FFmpeg
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Macros | Functions | Variables
tf_default.c File Reference
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "avtextformat.h"
#include "libavutil/bprint.h"
#include "libavutil/opt.h"
#include "tf_internal.h"

Go to the source code of this file.

Data Structures

struct  DefaultContext
 

Macros

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

Functions

 DEFINE_FORMATTER_CLASS (default)
 
static char * upcase_string (char *dst, size_t dst_size, const char *src)
 
static void default_print_section_header (AVTextFormatContext *wctx, const void *data)
 
static void default_print_section_footer (AVTextFormatContext *wctx)
 
static void default_print_str (AVTextFormatContext *wctx, const char *key, const char *value)
 
static void default_print_int (AVTextFormatContext *wctx, const char *key, int64_t value)
 

Variables

static const AVOption default_options []
 
const AVTextFormatter avtextformatter_default
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 42 of file tf_default.c.

Function Documentation

◆ DEFINE_FORMATTER_CLASS()

DEFINE_FORMATTER_CLASS ( default  )

◆ upcase_string()

static char* upcase_string ( char *  dst,
size_t  dst_size,
const char *  src 
)
inlinestatic

Definition at line 55 of file tf_default.c.

Referenced by default_print_section_footer(), and default_print_section_header().

◆ default_print_section_header()

static void default_print_section_header ( AVTextFormatContext wctx,
const void *  data 
)
static

Definition at line 65 of file tf_default.c.

◆ default_print_section_footer()

static void default_print_section_footer ( AVTextFormatContext wctx)
static

Definition at line 92 of file tf_default.c.

◆ default_print_str()

static void default_print_str ( AVTextFormatContext wctx,
const char *  key,
const char *  value 
)
static

Definition at line 109 of file tf_default.c.

◆ default_print_int()

static void default_print_int ( AVTextFormatContext wctx,
const char *  key,
int64_t  value 
)
static

Definition at line 118 of file tf_default.c.

Variable Documentation

◆ default_options

const AVOption default_options[]
static
Initial value:
= {
{ "noprint_wrappers", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
{ "nw", "do not print headers and footers", OFFSET(noprint_wrappers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
{ "nokey", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
{ "nk", "force no key printing", OFFSET(nokey), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1 },
{ NULL },
}

Definition at line 44 of file tf_default.c.

◆ avtextformatter_default

const AVTextFormatter avtextformatter_default
Initial value:
= {
.name = "default",
.priv_size = sizeof(DefaultContext),
.print_section_header = default_print_section_header,
.print_section_footer = default_print_section_footer,
.print_integer = default_print_int,
.print_string = default_print_str,
.priv_class = &default_class,
}

Definition at line 127 of file tf_default.c.

Referenced by formatters_register_all().

flags
const SwsFlags flags[]
Definition: swscale.c:61
DefaultContext
Definition: tf_default.c:34
default_print_str
static void default_print_str(AVTextFormatContext *wctx, const char *key, const char *value)
Definition: tf_default.c:109
NULL
#define NULL
Definition: coverity.c:32
OFFSET
#define OFFSET(x)
Definition: tf_default.c:42
default_print_section_footer
static void default_print_section_footer(AVTextFormatContext *wctx)
Definition: tf_default.c:92
default_print_int
static void default_print_int(AVTextFormatContext *wctx, const char *key, int64_t value)
Definition: tf_default.c:118
default_print_section_header
static void default_print_section_header(AVTextFormatContext *wctx, const void *data)
Definition: tf_default.c:65
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327
AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS
#define AV_TEXTFORMAT_FLAG_SUPPORTS_OPTIONAL_FIELDS
Definition: avtextformat.h:71