libavformat/bintext.c File Reference

Binary text demuxer eXtended BINary text (XBIN) demuxer Artworx Data Format demuxer iCEDraw File demuxer. More...

#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
#include "sauce.h"
#include "libavcodec/bintext.h"

Go to the source code of this file.

Data Structures

struct  BinDemuxContext

Defines

#define LINE_RATE   6000
#define GET_EFI2_META(name, size)

Functions

static void calculate_height (AVCodecContext *avctx, uint64_t fsize)
 Given filesize and width, calculate height (assume font_height of 16).
static int next_tag_read (AVFormatContext *avctx, uint64_t *fsize)
static void predict_width (AVCodecContext *avctx, uint64_t fsize, int got_width)
static AVStreaminit_stream (AVFormatContext *s, AVFormatParameters *ap)
static int bintext_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int xbin_probe (AVProbeData *p)
static int xbin_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int adf_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int idf_probe (AVProbeData *p)
static int idf_read_header (AVFormatContext *s, AVFormatParameters *ap)
static int read_packet (AVFormatContext *s, AVPacket *pkt)

Variables

static const uint8_t next_magic []
static const uint8_t idf_magic []
AVInputFormat ff_bintext_demuxer
AVInputFormat ff_xbin_demuxer
AVInputFormat ff_adf_demuxer
AVInputFormat ff_idf_demuxer

Detailed Description

Binary text demuxer eXtended BINary text (XBIN) demuxer Artworx Data Format demuxer iCEDraw File demuxer.

Definition in file bintext.c.


Define Documentation

#define GET_EFI2_META (   name,
  size 
)
Value:
len = avio_r8(pb); \
    if (len < 1 || len > size) \
        return -1; \
    if (avio_read(pb, buf, size) == size && *buf) { \
        buf[len] = 0; \
        av_dict_set(&avctx->metadata, name, buf, 0); \
    }

Referenced by next_tag_read().

#define LINE_RATE   6000

Definition at line 39 of file bintext.c.

Referenced by init_stream().


Function Documentation

static int adf_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 215 of file bintext.c.

static int bintext_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 126 of file bintext.c.

static void calculate_height ( AVCodecContext avctx,
uint64_t  fsize 
) [static]

Given filesize and width, calculate height (assume font_height of 16).

Definition at line 50 of file bintext.c.

Referenced by adf_read_header(), bintext_read_header(), and idf_read_header().

static int idf_probe ( AVProbeData p  )  [static]

Definition at line 263 of file bintext.c.

static int idf_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 272 of file bintext.c.

static AVStream* init_stream ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 102 of file bintext.c.

Referenced by adf_read_header(), bintext_read_header(), idf_read_header(), and xbin_read_header().

static int next_tag_read ( AVFormatContext avctx,
uint64_t *  fsize 
) [static]

Definition at line 61 of file bintext.c.

Referenced by bintext_read_header().

static void predict_width ( AVCodecContext avctx,
uint64_t  fsize,
int  got_width 
) [static]

attempt to guess width

Definition at line 95 of file bintext.c.

Referenced by bintext_read_header().

static int read_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 311 of file bintext.c.

static int xbin_probe ( AVProbeData p  )  [static]

Definition at line 160 of file bintext.c.

static int xbin_read_header ( AVFormatContext s,
AVFormatParameters ap 
) [static]

Definition at line 171 of file bintext.c.


Variable Documentation

Initial value:
 {
    .name           = "adf",
    .long_name      = NULL_IF_CONFIG_SMALL("Artworx Data Format"),
    .priv_data_size = sizeof(BinDemuxContext),
    .read_header    = adf_read_header,
    .read_packet    = read_packet,
    .extensions     = "adf",
}

Definition at line 356 of file bintext.c.

Initial value:
 {
    .name           = "bin",
    .long_name      = NULL_IF_CONFIG_SMALL("Binary text"),
    .priv_data_size = sizeof(BinDemuxContext),
    .read_header    = bintext_read_header,
    .read_packet    = read_packet,
    .extensions     = "bin",
}

Definition at line 334 of file bintext.c.

Initial value:
 {
    .name           = "idf",
    .long_name      = NULL_IF_CONFIG_SMALL("iCE Draw File"),
    .priv_data_size = sizeof(BinDemuxContext),
    .read_probe     = idf_probe,
    .read_header    = idf_read_header,
    .read_packet    = read_packet,
    .extensions     = "idf",
}

Definition at line 367 of file bintext.c.

Initial value:
 {
    .name           = "xbin",
    .long_name      = NULL_IF_CONFIG_SMALL("eXtended BINary text (XBIN)"),
    .priv_data_size = sizeof(BinDemuxContext),
    .read_probe     = xbin_probe,
    .read_header    = xbin_read_header,
    .read_packet    = read_packet,
}

Definition at line 345 of file bintext.c.

const uint8_t idf_magic[] [static]
Initial value:
 {
    0x04, 0x31, 0x2e, 0x34, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x15, 0x00
}

Definition at line 259 of file bintext.c.

Referenced by idf_probe().

const uint8_t next_magic[] [static]
Initial value:
{
    0x1A, 0x1B, '[', '0', ';', '3', '0', ';', '4', '0', 'm', 'N', 'E', 'X', 'T', 0x00
}

Definition at line 57 of file bintext.c.

Referenced by next_tag_read().