FFmpeg
Data Structures | Macros | Functions | Variables
xmv.c File Reference
#include <inttypes.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "riff.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

struct  XMVVideoPacket
 A video packet with an XMV file. More...
 
struct  XMVAudioPacket
 An audio packet with an XMV file. More...
 
struct  XMVDemuxContext
 Context for demuxing an XMV file. More...
 

Macros

#define XMV_MIN_HEADER_SIZE   36
 The min size of an XMV header. More...
 
#define XMV_AUDIO_ADPCM51_FRONTLEFTRIGHT   1
 Audio flag: ADPCM'd 5.1 stream, front left / right channels. More...
 
#define XMV_AUDIO_ADPCM51_FRONTCENTERLOW   2
 Audio flag: ADPCM'd 5.1 stream, front center / low frequency channels. More...
 
#define XMV_AUDIO_ADPCM51_REARLEFTRIGHT   4
 Audio flag: ADPCM'd 5.1 stream, rear left / right channels. More...
 
#define XMV_AUDIO_ADPCM51
 Audio flag: Any of the ADPCM'd 5.1 stream flags. More...
 
#define XMV_BLOCK_ALIGN_SIZE   36
 

Functions

static int xmv_probe (const AVProbeData *p)
 
static int xmv_read_close (AVFormatContext *s)
 
static int xmv_read_header (AVFormatContext *s)
 
static void xmv_read_extradata (uint8_t *extradata, AVIOContext *pb)
 
static int xmv_process_packet_header (AVFormatContext *s)
 
static int xmv_fetch_new_packet (AVFormatContext *s)
 
static int xmv_fetch_audio_packet (AVFormatContext *s, AVPacket *pkt, uint32_t stream)
 
static int xmv_fetch_video_packet (AVFormatContext *s, AVPacket *pkt)
 
static int xmv_read_packet (AVFormatContext *s, AVPacket *pkt)
 

Variables

const FFInputFormat ff_xmv_demuxer
 

Detailed Description

Microsoft XMV demuxer

Definition in file xmv.c.

Macro Definition Documentation

◆ XMV_MIN_HEADER_SIZE

#define XMV_MIN_HEADER_SIZE   36

The min size of an XMV header.

Definition at line 40 of file xmv.c.

◆ XMV_AUDIO_ADPCM51_FRONTLEFTRIGHT

#define XMV_AUDIO_ADPCM51_FRONTLEFTRIGHT   1

Audio flag: ADPCM'd 5.1 stream, front left / right channels.

Definition at line 43 of file xmv.c.

◆ XMV_AUDIO_ADPCM51_FRONTCENTERLOW

#define XMV_AUDIO_ADPCM51_FRONTCENTERLOW   2

Audio flag: ADPCM'd 5.1 stream, front center / low frequency channels.

Definition at line 45 of file xmv.c.

◆ XMV_AUDIO_ADPCM51_REARLEFTRIGHT

#define XMV_AUDIO_ADPCM51_REARLEFTRIGHT   4

Audio flag: ADPCM'd 5.1 stream, rear left / right channels.

Definition at line 47 of file xmv.c.

◆ XMV_AUDIO_ADPCM51

#define XMV_AUDIO_ADPCM51
Value:
XMV_AUDIO_ADPCM51_FRONTCENTERLOW | \
XMV_AUDIO_ADPCM51_REARLEFTRIGHT)

Audio flag: Any of the ADPCM'd 5.1 stream flags.

Definition at line 50 of file xmv.c.

◆ XMV_BLOCK_ALIGN_SIZE

#define XMV_BLOCK_ALIGN_SIZE   36

Definition at line 54 of file xmv.c.

Function Documentation

◆ xmv_probe()

static int xmv_probe ( const AVProbeData p)
static

Definition at line 120 of file xmv.c.

◆ xmv_read_close()

static int xmv_read_close ( AVFormatContext s)
static

Definition at line 137 of file xmv.c.

◆ xmv_read_header()

static int xmv_read_header ( AVFormatContext s)
static

Definition at line 146 of file xmv.c.

◆ xmv_read_extradata()

static void xmv_read_extradata ( uint8_t *  extradata,
AVIOContext pb 
)
static

Definition at line 232 of file xmv.c.

Referenced by xmv_process_packet_header().

◆ xmv_process_packet_header()

static int xmv_process_packet_header ( AVFormatContext s)
static

Definition at line 261 of file xmv.c.

Referenced by xmv_fetch_new_packet().

◆ xmv_fetch_new_packet()

static int xmv_fetch_new_packet ( AVFormatContext s)
static

Definition at line 408 of file xmv.c.

Referenced by xmv_read_packet().

◆ xmv_fetch_audio_packet()

static int xmv_fetch_audio_packet ( AVFormatContext s,
AVPacket pkt,
uint32_t  stream 
)
static

Definition at line 438 of file xmv.c.

Referenced by xmv_read_packet().

◆ xmv_fetch_video_packet()

static int xmv_fetch_video_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 484 of file xmv.c.

Referenced by xmv_read_packet().

◆ xmv_read_packet()

static int xmv_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 543 of file xmv.c.

Variable Documentation

◆ ff_xmv_demuxer

const FFInputFormat ff_xmv_demuxer
Initial value:
= {
.p.name = "xmv",
.p.long_name = NULL_IF_CONFIG_SMALL("Microsoft XMV"),
.p.extensions = "xmv",
.priv_data_size = sizeof(XMVDemuxContext),
.flags_internal = FF_INFMT_FLAG_INIT_CLEANUP,
}

Definition at line 582 of file xmv.c.

XMV_AUDIO_ADPCM51_FRONTLEFTRIGHT
#define XMV_AUDIO_ADPCM51_FRONTLEFTRIGHT
Audio flag: ADPCM'd 5.1 stream, front left / right channels.
Definition: xmv.c:43
xmv_read_packet
static int xmv_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: xmv.c:543
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:143
xmv_read_header
static int xmv_read_header(AVFormatContext *s)
Definition: xmv.c:146
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
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
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
xmv_read_close
static int xmv_read_close(AVFormatContext *s)
Definition: xmv.c:137
XMVDemuxContext
Context for demuxing an XMV file.
Definition: xmv.c:100
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
xmv_probe
static int xmv_probe(const AVProbeData *p)
Definition: xmv.c:120