FFmpeg
Functions | Variables
xsubdec.c File Reference
#include "libavutil/mathematics.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
#include "codec_internal.h"

Go to the source code of this file.

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static int64_t parse_timecode (const uint8_t *buf, int64_t packet_time)
 
static int decode_frame (AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
 

Variables

static const uint8_t tc_offsets [9] = { 0, 1, 3, 4, 6, 7, 9, 10, 11 }
 
static const uint8_t tc_muls [9] = { 10, 6, 10, 6, 10, 10, 10, 10, 1 }
 
const FFCodec ff_xsub_decoder
 

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 30 of file xsubdec.c.

◆ parse_timecode()

static int64_t parse_timecode ( const uint8_t *  buf,
int64_t  packet_time 
)
static

Definition at line 38 of file xsubdec.c.

Referenced by decode_frame().

◆ decode_frame()

static int decode_frame ( AVCodecContext avctx,
AVSubtitle sub,
int *  got_sub_ptr,
const AVPacket avpkt 
)
static

Definition at line 51 of file xsubdec.c.

Variable Documentation

◆ tc_offsets

const uint8_t tc_offsets[9] = { 0, 1, 3, 4, 6, 7, 9, 10, 11 }
static

Definition at line 35 of file xsubdec.c.

Referenced by parse_timecode().

◆ tc_muls

const uint8_t tc_muls[9] = { 10, 6, 10, 6, 10, 10, 10, 10, 1 }
static

Definition at line 36 of file xsubdec.c.

Referenced by parse_timecode().

◆ ff_xsub_decoder

const FFCodec ff_xsub_decoder
Initial value:
= {
.p.name = "xsub",
CODEC_LONG_NAME("XSUB"),
.init = decode_init,
}

Definition at line 165 of file xsubdec.c.

AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_SUBTITLE
Definition: avutil.h:204
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Definition: xsubdec.c:30
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:296
decode_frame
static int decode_frame(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
Definition: xsubdec.c:51
AV_CODEC_ID_XSUB
@ AV_CODEC_ID_XSUB
Definition: codec_id.h:559
FF_CODEC_DECODE_SUB_CB
#define FF_CODEC_DECODE_SUB_CB(func)
Definition: codec_internal.h:314