FFmpeg
Data Structures | Macros | Functions | Variables
jacosubdec.c File Reference
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "subtitles.h"
#include "libavcodec/jacosub.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/intreadwrite.h"

Go to the source code of this file.

Data Structures

struct  JACOsubContext
 

Macros

#define SSEP   "%*1[.:]"
 

Functions

static int timed_line (const char *ptr)
 
static int jacosub_probe (const AVProbeData *p)
 
static int get_jss_cmd (char k)
 
static const char * read_ts (JACOsubContext *jacosub, const char *buf, int64_t *start, int64_t *duration)
 
static int get_shift (unsigned timeres, const char *buf)
 
static int jacosub_read_header (AVFormatContext *s)
 

Variables

static const char *const cmds []
 
const FFInputFormat ff_jacosub_demuxer
 

Detailed Description

JACOsub subtitle demuxer

See also
http://unicorn.us.com/jacosub/jscripts.html
Todo:
Support P[ALETTE] directive.

Definition in file jacosubdec.c.

Macro Definition Documentation

◆ SSEP

#define SSEP   "%*1[.:]"

Function Documentation

◆ timed_line()

static int timed_line ( const char *  ptr)
static

Definition at line 43 of file jacosubdec.c.

Referenced by jacosub_probe(), and jacosub_read_header().

◆ jacosub_probe()

static int jacosub_probe ( const AVProbeData p)
static

Definition at line 51 of file jacosubdec.c.

◆ get_jss_cmd()

static int get_jss_cmd ( char  k)
static

Definition at line 85 of file jacosubdec.c.

Referenced by jacosub_read_header().

◆ read_ts()

static const char* read_ts ( JACOsubContext jacosub,
const char *  buf,
int64_t start,
int64_t duration 
)
static

Definition at line 96 of file jacosubdec.c.

Referenced by jacosub_read_header().

◆ get_shift()

static int get_shift ( unsigned  timeres,
const char *  buf 
)
static

Definition at line 128 of file jacosubdec.c.

Referenced by jacosub_read_header().

◆ jacosub_read_header()

static int jacosub_read_header ( AVFormatContext s)
static

Definition at line 163 of file jacosubdec.c.

Variable Documentation

◆ cmds

const char* const cmds[]
static
Initial value:
= {
"CLOCKPAUSE",
"DIRECTIVE",
"FONT",
"HRES",
"INCLUDE",
"PALETTE",
"QUANTIZE",
"RAMP",
"SHIFT",
"TIMERES",
}

Definition at line 72 of file jacosubdec.c.

Referenced by decode_byterun2(), get_jss_cmd(), jacosub_read_header(), and parse_commands().

◆ ff_jacosub_demuxer

const FFInputFormat ff_jacosub_demuxer
Initial value:
= {
.p.name = "jacosub",
.p.long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle format"),
.priv_data_size = sizeof(JACOsubContext),
.flags_internal = FF_INFMT_FLAG_INIT_CLEANUP,
.read_seek2 = ff_subtitles_read_seek,
}

Definition at line 260 of file jacosubdec.c.

ff_subtitles_read_close
int ff_subtitles_read_close(AVFormatContext *s)
Definition: subtitles.c:345
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:143
jacosub_read_header
static int jacosub_read_header(AVFormatContext *s)
Definition: jacosubdec.c:163
ff_subtitles_read_packet
int ff_subtitles_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: subtitles.c:331
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
FF_INFMT_FLAG_INIT_CLEANUP
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
Definition: demux.h:35
JACOsubContext
Definition: jacosubdec.c:37
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
jacosub_probe
static int jacosub_probe(const AVProbeData *p)
Definition: jacosubdec.c:51
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
ff_subtitles_read_seek
int ff_subtitles_read_seek(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Definition: subtitles.c:337
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30