FFmpeg
Functions | Variables
xsubdec.c File Reference
#include "libavutil/mathematics.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
#include "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, void *data, int *got_sub_ptr, 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 }
 
AVCodec ff_xsub_decoder
 

Function Documentation

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 29 of file xsubdec.c.

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

Definition at line 37 of file xsubdec.c.

Referenced by decode_frame().

static int decode_frame ( AVCodecContext avctx,
void data,
int got_sub_ptr,
AVPacket avpkt 
)
static

Definition at line 50 of file xsubdec.c.

Variable Documentation

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

Definition at line 34 of file xsubdec.c.

Referenced by parse_timecode().

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

Definition at line 35 of file xsubdec.c.

Referenced by parse_timecode().

AVCodec ff_xsub_decoder
Initial value:
= {
.name = "xsub",
.long_name = NULL_IF_CONFIG_SMALL("XSUB"),
.init = decode_init,
.decode = decode_frame,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}
static int decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt)
Definition: xsubdec.c:50
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
static av_cold int decode_init(AVCodecContext *avctx)
Definition: xsubdec.c:29
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153

Definition at line 177 of file xsubdec.c.