All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
tty.c File Reference

Tele-typewriter demuxer. More...

#include "libavutil/intreadwrite.h"
#include "libavutil/avstring.h"
#include "libavutil/log.h"
#include "libavutil/dict.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avformat.h"
#include "internal.h"
#include "sauce.h"

Go to the source code of this file.

Data Structures

struct  TtyDemuxContext


#define GET_EFI_META(name, size)
#define OFFSET(x)   offsetof(TtyDemuxContext, x)


static int efi_read (AVFormatContext *avctx, uint64_t start_pos)
 Parse EFI header. More...
static int read_header (AVFormatContext *avctx)
static int read_packet (AVFormatContext *avctx, AVPacket *pkt)


static const AVOption options []
static const AVClass tty_demuxer_class
AVInputFormat ff_tty_demuxer

Detailed Description

Tele-typewriter demuxer.

Definition in file tty.c.

Macro Definition Documentation

#define GET_EFI_META (   name,
len = avio_r8(pb); \
if (len < 1 || len > size) \
if (avio_read(pb, buf, size) == size) { \
buf[len] = 0; \
av_dict_set(&avctx->metadata, name, buf, 0); \
ptrdiff_t size
Definition: opengl_enc.c:101
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
Definition: aviobuf.c:630
int avio_r8(AVIOContext *s)
Definition: aviobuf.c:621
void * buf
Definition: avisynth_c.h:690
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:70
if(ret< 0)
Definition: vf_mcdeint.c:282
int len
const char * name
Definition: opengl_enc.c:103

Referenced by efi_read().

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

Definition at line 136 of file tty.c.


Definition at line 137 of file tty.c.

Function Documentation

static int efi_read ( AVFormatContext avctx,
uint64_t  start_pos 

Parse EFI header.

Definition at line 48 of file tty.c.

Referenced by read_header().

static int read_header ( AVFormatContext avctx)

Definition at line 75 of file tty.c.

static int read_packet ( AVFormatContext avctx,
AVPacket pkt 

Definition at line 111 of file tty.c.

Variable Documentation

const AVOption options[]
Initial value:
= {
{ "chars_per_frame", "", 0x42, AV_OPT_TYPE_INT, {.i64 = 6000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM},
{ "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, DEC },
{ "framerate", "", OFFSET(framerate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, DEC },
{ NULL },
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: tty.c:136
#define DEC
Definition: tty.c:137
#define width
a generic parameter which can be set by the user for demuxing or decoding
Definition: opt.h:277
offset must point to AVRational
Definition: opt.h:236
offset must point to two consecutive integers
Definition: opt.h:233

Definition at line 138 of file tty.c.

const AVClass tty_demuxer_class
Initial value:
= {
.class_name = "TTY demuxer",
.item_name = av_default_item_name,
.option = options,
Definition: version.h:86
static const AVOption options[]
Definition: tty.c:138

Definition at line 145 of file tty.c.

AVInputFormat ff_tty_demuxer
Initial value:
= {
.name = "tty",
.long_name = NULL_IF_CONFIG_SMALL("Tele-typewriter"),
.priv_data_size = sizeof(TtyDemuxContext),
.extensions = "ans,art,asc,diz,ice,nfo,txt,vt",
.priv_class = &tty_demuxer_class,
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static int read_header(AVFormatContext *avctx)
Definition: tty.c:75
static const AVClass tty_demuxer_class
Definition: tty.c:145
static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
Definition: tty.c:111

Definition at line 152 of file tty.c.