FFmpeg
Data Structures | Macros | Functions | Variables
amvenc.c File Reference
#include "avformat.h"
#include "riff.h"
#include "internal.h"
#include "avio_internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Data Structures

struct  AMVContext
 

Macros

#define AMV_STREAM_COUNT   2
 
#define AMV_STREAM_VIDEO   0
 
#define AMV_STREAM_AUDIO   1
 
#define AMV_VIDEO_STRH_SIZE   56
 
#define AMV_VIDEO_STRF_SIZE   36
 
#define AMV_AUDIO_STRH_SIZE   48
 
#define AMV_AUDIO_STRF_SIZE   20 /* sizeof(WAVEFORMATEX) + 2 */
 

Functions

static int64_t amv_start_tag (AVIOContext *pb, const char *tag)
 
static void amv_end_tag (AVIOContext *pb, int64_t start)
 
static av_cold int amv_init (AVFormatContext *s)
 
static void amv_deinit (AVFormatContext *s)
 
static void amv_write_vlist (AVFormatContext *s, AVCodecParameters *par)
 
static void amv_write_alist (AVFormatContext *s, AVCodecParameters *par)
 
static int amv_write_header (AVFormatContext *s)
 
static int amv_write_packet_internal (AVFormatContext *s, AVPacket *pkt)
 
static int amv_pad (AVFormatContext *s, AVPacket *pkt)
 
static int amv_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int amv_write_trailer (AVFormatContext *s)
 

Variables

const AVOutputFormat ff_amv_muxer
 

Macro Definition Documentation

◆ AMV_STREAM_COUNT

#define AMV_STREAM_COUNT   2

Definition at line 46 of file amvenc.c.

◆ AMV_STREAM_VIDEO

#define AMV_STREAM_VIDEO   0

Definition at line 47 of file amvenc.c.

◆ AMV_STREAM_AUDIO

#define AMV_STREAM_AUDIO   1

Definition at line 48 of file amvenc.c.

◆ AMV_VIDEO_STRH_SIZE

#define AMV_VIDEO_STRH_SIZE   56

Definition at line 49 of file amvenc.c.

◆ AMV_VIDEO_STRF_SIZE

#define AMV_VIDEO_STRF_SIZE   36

Definition at line 50 of file amvenc.c.

◆ AMV_AUDIO_STRH_SIZE

#define AMV_AUDIO_STRH_SIZE   48

Definition at line 51 of file amvenc.c.

◆ AMV_AUDIO_STRF_SIZE

#define AMV_AUDIO_STRF_SIZE   20 /* sizeof(WAVEFORMATEX) + 2 */

Definition at line 52 of file amvenc.c.

Function Documentation

◆ amv_start_tag()

static int64_t amv_start_tag ( AVIOContext pb,
const char *  tag 
)
static

Definition at line 76 of file amvenc.c.

Referenced by amv_write_alist(), amv_write_header(), and amv_write_vlist().

◆ amv_end_tag()

static void amv_end_tag ( AVIOContext pb,
int64_t  start 
)
static

Definition at line 83 of file amvenc.c.

Referenced by amv_write_alist(), amv_write_header(), amv_write_trailer(), and amv_write_vlist().

◆ amv_init()

static av_cold int amv_init ( AVFormatContext s)
static

Definition at line 93 of file amvenc.c.

◆ amv_deinit()

static void amv_deinit ( AVFormatContext s)
static

Definition at line 206 of file amvenc.c.

◆ amv_write_vlist()

static void amv_write_vlist ( AVFormatContext s,
AVCodecParameters par 
)
static

Definition at line 214 of file amvenc.c.

Referenced by amv_write_header().

◆ amv_write_alist()

static void amv_write_alist ( AVFormatContext s,
AVCodecParameters par 
)
static

Definition at line 233 of file amvenc.c.

Referenced by amv_write_header().

◆ amv_write_header()

static int amv_write_header ( AVFormatContext s)
static

Definition at line 263 of file amvenc.c.

◆ amv_write_packet_internal()

static int amv_write_packet_internal ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 300 of file amvenc.c.

Referenced by amv_pad(), amv_write_packet(), and amv_write_trailer().

◆ amv_pad()

static int amv_pad ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 325 of file amvenc.c.

Referenced by amv_write_packet().

◆ amv_write_packet()

static int amv_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 344 of file amvenc.c.

◆ amv_write_trailer()

static int amv_write_trailer ( AVFormatContext s)
static

Definition at line 366 of file amvenc.c.

Variable Documentation

◆ ff_amv_muxer

const AVOutputFormat ff_amv_muxer
Initial value:
= {
.name = "amv",
.long_name = NULL_IF_CONFIG_SMALL("AMV"),
.mime_type = "video/amv",
.extensions = "amv",
.priv_data_size = sizeof(AMVContext),
.audio_codec = AV_CODEC_ID_ADPCM_IMA_AMV,
.video_codec = AV_CODEC_ID_AMV,
.deinit = amv_deinit,
}

Definition at line 407 of file amvenc.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
amv_deinit
static void amv_deinit(AVFormatContext *s)
Definition: amvenc.c:206
amv_init
static av_cold int amv_init(AVFormatContext *s)
Definition: amvenc.c:93
amv_write_packet
static int amv_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: amvenc.c:344
write_trailer
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:98
AV_CODEC_ID_ADPCM_IMA_AMV
@ AV_CODEC_ID_ADPCM_IMA_AMV
Definition: codec_id.h:370
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:117
write_packet
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:729
amv_write_trailer
static int amv_write_trailer(AVFormatContext *s)
Definition: amvenc.c:366
AV_CODEC_ID_AMV
@ AV_CODEC_ID_AMV
Definition: codec_id.h:156
amv_write_header
static int amv_write_header(AVFormatContext *s)
Definition: amvenc.c:263
write_header
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:346
AMVContext
Definition: amvenc.c:54