FFmpeg
Data Structures | Macros | Functions | Variables
mlvdec.c File Reference
#include <time.h>
#include "libavcodec/bytestream.h"
#include "libavcodec/tiff.h"
#include "libavcodec/tiff_common.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/rational.h"
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "riff.h"

Go to the source code of this file.

Data Structures

struct  MlvContext
 

Macros

#define MLV_VERSION   "v2.0"
 
#define MLV_VIDEO_CLASS_RAW   1
 
#define MLV_VIDEO_CLASS_YUV   2
 
#define MLV_VIDEO_CLASS_JPEG   3
 
#define MLV_VIDEO_CLASS_H264   4
 
#define MLV_AUDIO_CLASS_WAV   1
 
#define MLV_CLASS_FLAG_LJ92   0x20
 
#define MLV_CLASS_FLAG_DELTA   0x40
 
#define MLV_CLASS_FLAG_LZMA   0x80
 
#define MAX_HEADER_SIZE   2048
 

Functions

static int probe (const AVProbeData *p)
 
static int check_file_header (AVIOContext *pb, uint64_t guid)
 
static void read_string (AVFormatContext *avctx, AVIOContext *pb, const char *tag, unsigned size)
 
static void read_uint8 (AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
 
static void read_uint16 (AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
 
static void read_uint32 (AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
 
static void read_uint64 (AVFormatContext *avctx, AVIOContext *pb, const char *tag, const char *fmt)
 
static int scan_file (AVFormatContext *avctx, AVStream *vst, AVStream *ast, int file)
 
static int read_header (AVFormatContext *avctx)
 
static void write_tiff_short (PutByteContext *pb, int tag, int value)
 
static void write_tiff_short2 (PutByteContext *pb, int tag, int v1, int v2)
 
static void write_tiff_long (PutByteContext *pb, int tag, int value)
 
static void write_tiff_byte4 (PutByteContext *pb, int tag, int v1, int v2, int v3, int v4)
 
static int get_packet_lj92 (AVFormatContext *avctx, AVStream *st, AVIOContext *pbio, AVPacket *pkt, int64_t size)
 
static int read_packet (AVFormatContext *avctx, AVPacket *pkt)
 
static int read_seek (AVFormatContext *avctx, int stream_index, int64_t timestamp, int flags)
 
static int read_close (AVFormatContext *s)
 

Variables

const FFInputFormat ff_mlv_demuxer
 

Detailed Description

Magic Lantern Video (MLV) demuxer

Definition in file mlvdec.c.

Macro Definition Documentation

◆ MLV_VERSION

#define MLV_VERSION   "v2.0"

Definition at line 41 of file mlvdec.c.

◆ MLV_VIDEO_CLASS_RAW

#define MLV_VIDEO_CLASS_RAW   1

Definition at line 43 of file mlvdec.c.

◆ MLV_VIDEO_CLASS_YUV

#define MLV_VIDEO_CLASS_YUV   2

Definition at line 44 of file mlvdec.c.

◆ MLV_VIDEO_CLASS_JPEG

#define MLV_VIDEO_CLASS_JPEG   3

Definition at line 45 of file mlvdec.c.

◆ MLV_VIDEO_CLASS_H264

#define MLV_VIDEO_CLASS_H264   4

Definition at line 46 of file mlvdec.c.

◆ MLV_AUDIO_CLASS_WAV

#define MLV_AUDIO_CLASS_WAV   1

Definition at line 48 of file mlvdec.c.

◆ MLV_CLASS_FLAG_LJ92

#define MLV_CLASS_FLAG_LJ92   0x20

Definition at line 50 of file mlvdec.c.

◆ MLV_CLASS_FLAG_DELTA

#define MLV_CLASS_FLAG_DELTA   0x40

Definition at line 51 of file mlvdec.c.

◆ MLV_CLASS_FLAG_LZMA

#define MLV_CLASS_FLAG_LZMA   0x80

Definition at line 52 of file mlvdec.c.

◆ MAX_HEADER_SIZE

#define MAX_HEADER_SIZE   2048

Function Documentation

◆ probe()

static int probe ( const AVProbeData p)
static

Definition at line 64 of file mlvdec.c.

◆ check_file_header()

static int check_file_header ( AVIOContext pb,
uint64_t  guid 
)
static

Definition at line 73 of file mlvdec.c.

Referenced by read_header().

◆ read_string()

static void read_string ( AVFormatContext avctx,
AVIOContext pb,
const char *  tag,
unsigned  size 
)
static

Definition at line 89 of file mlvdec.c.

Referenced by scan_file().

◆ read_uint8()

static void read_uint8 ( AVFormatContext avctx,
AVIOContext pb,
const char *  tag,
const char *  fmt 
)
static

Definition at line 109 of file mlvdec.c.

Referenced by scan_file().

◆ read_uint16()

static void read_uint16 ( AVFormatContext avctx,
AVIOContext pb,
const char *  tag,
const char *  fmt 
)
static

Definition at line 114 of file mlvdec.c.

Referenced by scan_file().

◆ read_uint32()

static void read_uint32 ( AVFormatContext avctx,
AVIOContext pb,
const char *  tag,
const char *  fmt 
)
static

Definition at line 119 of file mlvdec.c.

Referenced by scan_file().

◆ read_uint64()

static void read_uint64 ( AVFormatContext avctx,
AVIOContext pb,
const char *  tag,
const char *  fmt 
)
static

Definition at line 124 of file mlvdec.c.

Referenced by scan_file().

◆ scan_file()

static int scan_file ( AVFormatContext avctx,
AVStream vst,
AVStream ast,
int  file 
)
static

Definition at line 129 of file mlvdec.c.

Referenced by read_header().

◆ read_header()

static int read_header ( AVFormatContext avctx)
static

Definition at line 283 of file mlvdec.c.

◆ write_tiff_short()

static void write_tiff_short ( PutByteContext pb,
int  tag,
int  value 
)
static

Definition at line 429 of file mlvdec.c.

Referenced by get_packet_lj92().

◆ write_tiff_short2()

static void write_tiff_short2 ( PutByteContext pb,
int  tag,
int  v1,
int  v2 
)
static

Definition at line 438 of file mlvdec.c.

Referenced by get_packet_lj92().

◆ write_tiff_long()

static void write_tiff_long ( PutByteContext pb,
int  tag,
int  value 
)
static

Definition at line 447 of file mlvdec.c.

Referenced by get_packet_lj92().

◆ write_tiff_byte4()

static void write_tiff_byte4 ( PutByteContext pb,
int  tag,
int  v1,
int  v2,
int  v3,
int  v4 
)
static

Definition at line 455 of file mlvdec.c.

Referenced by get_packet_lj92().

◆ get_packet_lj92()

static int get_packet_lj92 ( AVFormatContext avctx,
AVStream st,
AVIOContext pbio,
AVPacket pkt,
int64_t  size 
)
static

Definition at line 466 of file mlvdec.c.

Referenced by read_packet().

◆ read_packet()

static int read_packet ( AVFormatContext avctx,
AVPacket pkt 
)
static

Definition at line 528 of file mlvdec.c.

◆ read_seek()

static int read_seek ( AVFormatContext avctx,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 601 of file mlvdec.c.

◆ read_close()

static int read_close ( AVFormatContext s)
static

Definition at line 615 of file mlvdec.c.

Variable Documentation

◆ ff_mlv_demuxer

const FFInputFormat ff_mlv_demuxer
Initial value:
= {
.p.name = "mlv",
.p.long_name = NULL_IF_CONFIG_SMALL("Magic Lantern Video (MLV)"),
.priv_data_size = sizeof(MlvContext),
.flags_internal = FF_INFMT_FLAG_INIT_CLEANUP,
}

Definition at line 624 of file mlvdec.c.

MlvContext
Definition: mlvdec.c:54
read_header
static int read_header(AVFormatContext *avctx)
Definition: mlvdec.c:283
read_seek
static int read_seek(AVFormatContext *avctx, int stream_index, int64_t timestamp, int flags)
Definition: mlvdec.c:601
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
read_close
static int read_close(AVFormatContext *s)
Definition: mlvdec.c:615
read_packet
static int read_packet(AVFormatContext *avctx, AVPacket *pkt)
Definition: mlvdec.c:528
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
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
probe
static int probe(const AVProbeData *p)
Definition: mlvdec.c:64