Data Structures | Macros | Functions | Variables
libaribb24.c File Reference
#include "avcodec.h"
#include "libavcodec/ass.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include <aribb24/aribb24.h>
#include <aribb24/parser.h>
#include <aribb24/decoder.h>

Go to the source code of this file.

Data Structures

struct  Libaribb24Context


#define RGB_TO_BGR(c)   (((c) & 0xff) << 16 | ((c) & 0xff00) | (((c) >> 16) & 0xff))
#define OFFSET(x)   offsetof(Libaribb24Context, x)


static unsigned int get_profile_font_size (int profile)
static void libaribb24_log (void *p, const char *msg)
static int libaribb24_generate_ass_header (AVCodecContext *avctx)
static int libaribb24_init (AVCodecContext *avctx)
static int libaribb24_close (AVCodecContext *avctx)
static int libaribb24_handle_regions (AVCodecContext *avctx, AVSubtitle *sub)
static int libaribb24_decode (AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *pkt)
static void libaribb24_flush (AVCodecContext *avctx)


static const AVOption options []
static const AVClass aribb24_class
AVCodec ff_libaribb24_decoder

Macro Definition Documentation

#define RGB_TO_BGR (   c)    (((c) & 0xff) << 16 | ((c) & 0xff00) | (((c) >> 16) & 0xff))

Definition at line 205 of file libaribb24.c.

Referenced by libaribb24_handle_regions().

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

Definition at line 366 of file libaribb24.c.

Definition at line 367 of file libaribb24.c.

Function Documentation

static unsigned int get_profile_font_size ( int  profile)

Definition at line 44 of file libaribb24.c.

Referenced by libaribb24_generate_ass_header(), and libaribb24_handle_regions().

static void libaribb24_log ( void p,
const char *  msg 

Definition at line 56 of file libaribb24.c.

Referenced by libaribb24_init().

static int libaribb24_generate_ass_header ( AVCodecContext avctx)

Definition at line 61 of file libaribb24.c.

Referenced by libaribb24_init().

static int libaribb24_init ( AVCodecContext avctx)

Definition at line 132 of file libaribb24.c.

static int libaribb24_close ( AVCodecContext avctx)

Definition at line 192 of file libaribb24.c.

static int libaribb24_handle_regions ( AVCodecContext avctx,
AVSubtitle sub 

Definition at line 207 of file libaribb24.c.

Referenced by libaribb24_decode().

static int libaribb24_decode ( AVCodecContext avctx,
void data,
int got_sub_ptr,
AVPacket pkt 

Definition at line 285 of file libaribb24.c.

static void libaribb24_flush ( AVCodecContext avctx)

Definition at line 359 of file libaribb24.c.

Variable Documentation

const AVOption options[]
Initial value:
= {
{ "aribb24-base-path", "set the base path for the libaribb24 library",
OFFSET(aribb24_base_path), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD },
{ "aribb24-skip-ruby-text", "skip ruby text blocks during decoding",
OFFSET(aribb24_skip_ruby), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD },
{ NULL }
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: libaribb24.c:366
#define SD
Definition: libaribb24.c:367

Definition at line 368 of file libaribb24.c.

const AVClass aribb24_class
Initial value:
= {
.class_name = "libaribb24 decoder",
.item_name = av_default_item_name,
.option = options,
static const AVOption options[]
Definition: libaribb24.c:368
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235

Definition at line 376 of file libaribb24.c.

AVCodec ff_libaribb24_decoder
Initial value:
= {
.name = "libaribb24",
.long_name = NULL_IF_CONFIG_SMALL("libaribb24 ARIB STD-B24 caption decoder"),
.priv_data_size = sizeof(Libaribb24Context),
.close = libaribb24_close,
.priv_class= &aribb24_class,
.wrapper_name = "libaribb24",
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static const AVClass aribb24_class
Definition: libaribb24.c:376
static int libaribb24_init(AVCodecContext *avctx)
Definition: libaribb24.c:132
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
static void libaribb24_flush(AVCodecContext *avctx)
Definition: libaribb24.c:359
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
static int libaribb24_decode(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *pkt)
Definition: libaribb24.c:285
static int libaribb24_close(AVCodecContext *avctx)
Definition: libaribb24.c:192

Definition at line 383 of file libaribb24.c.