FFmpeg
Data Structures | Macros | Functions | Variables
microdvddec.c File Reference
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "subtitles.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  MicroDVDContext
 

Macros

#define MAX_LINESIZE   2048
 
#define SKIP_FRAME_ID
 
#define OFFSET(x)   offsetof(MicroDVDContext, x)
 
#define SD   AV_OPT_FLAG_SUBTITLE_PARAM|AV_OPT_FLAG_DECODING_PARAM
 

Functions

static int microdvd_probe (const AVProbeData *p)
 
static int64_t get_pts (const char *buf)
 
static int64_t get_duration (const char *buf)
 
static int microdvd_read_header (AVFormatContext *s)
 
static int microdvd_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int microdvd_read_seek (AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
 
static int microdvd_read_close (AVFormatContext *s)
 

Variables

static const char * bom = "\xEF\xBB\xBF"
 
static const AVOption microdvd_options []
 
static const AVClass microdvd_class
 
const FFInputFormat ff_microdvd_demuxer
 

Macro Definition Documentation

◆ MAX_LINESIZE

#define MAX_LINESIZE   2048

Definition at line 30 of file microdvddec.c.

◆ SKIP_FRAME_ID

#define SKIP_FRAME_ID
Value:
p = strchr(p, '}'); \
if (!p) { \
av_log(s, AV_LOG_WARNING, "Invalid event \"%s\"" \
" at line %d\n", line, i); \
continue; \
} \
p++

◆ OFFSET

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

Definition at line 188 of file microdvddec.c.

◆ SD

Definition at line 189 of file microdvddec.c.

Function Documentation

◆ microdvd_probe()

static int microdvd_probe ( const AVProbeData p)
static

Definition at line 40 of file microdvddec.c.

◆ get_pts()

static int64_t get_pts ( const char *  buf)
static

Definition at line 59 of file microdvddec.c.

Referenced by microdvd_read_header().

◆ get_duration()

static int64_t get_duration ( const char *  buf)
static

Definition at line 69 of file microdvddec.c.

Referenced by microdvd_read_header().

◆ microdvd_read_header()

static int microdvd_read_header ( AVFormatContext s)
static

Definition at line 80 of file microdvddec.c.

◆ microdvd_read_packet()

static int microdvd_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 166 of file microdvddec.c.

◆ microdvd_read_seek()

static int microdvd_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  min_ts,
int64_t  ts,
int64_t  max_ts,
int  flags 
)
static

Definition at line 172 of file microdvddec.c.

◆ microdvd_read_close()

static int microdvd_read_close ( AVFormatContext s)
static

Definition at line 180 of file microdvddec.c.

Variable Documentation

◆ bom

const char* bom = "\xEF\xBB\xBF"
static

Definition at line 78 of file microdvddec.c.

Referenced by microdvd_read_header(), and read_header().

◆ microdvd_options

const AVOption microdvd_options[]
static
Initial value:
= {
{ "subfps", "set the movie frame rate fallback", OFFSET(frame_rate), AV_OPT_TYPE_RATIONAL, {.dbl=0}, 0, INT_MAX, SD },
{ NULL }
}

Definition at line 190 of file microdvddec.c.

◆ microdvd_class

const AVClass microdvd_class
static
Initial value:
= {
.class_name = "microdvddec",
.item_name = av_default_item_name,
.option = microdvd_options,
}

Definition at line 195 of file microdvddec.c.

◆ ff_microdvd_demuxer

const FFInputFormat ff_microdvd_demuxer
Initial value:
= {
.p.name = "microdvd",
.p.long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle format"),
.p.priv_class = &microdvd_class,
.priv_data_size = sizeof(MicroDVDContext),
.flags_internal = FF_INFMT_FLAG_INIT_CLEANUP,
.read_seek2 = microdvd_read_seek,
}

Definition at line 202 of file microdvddec.c.

SD
#define SD
Definition: microdvddec.c:189
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:215
microdvd_probe
static int microdvd_probe(const AVProbeData *p)
Definition: microdvddec.c:40
MicroDVDContext
Definition: microdvddec.c:33
microdvd_options
static const AVOption microdvd_options[]
Definition: microdvddec.c:190
AV_OPT_TYPE_RATIONAL
@ AV_OPT_TYPE_RATIONAL
Underlying C type is AVRational.
Definition: opt.h:280
microdvd_read_packet
static int microdvd_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: microdvddec.c:166
microdvd_class
static const AVClass microdvd_class
Definition: microdvddec.c:195
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:143
microdvd_read_seek
static int microdvd_read_seek(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Definition: microdvddec.c:172
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
OFFSET
#define OFFSET(x)
Definition: microdvddec.c:188
s
#define s(width, name)
Definition: cbs_vp9.c:198
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
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
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
microdvd_read_header
static int microdvd_read_header(AVFormatContext *s)
Definition: microdvddec.c:80
microdvd_read_close
static int microdvd_read_close(AVFormatContext *s)
Definition: microdvddec.c:180
line
Definition: graph2dot.c:48
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30