FFmpeg
Data Structures | Macros | Functions | Variables
amvenc.c File Reference
#include "avformat.h"
#include "mux.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 FFOutputFormat ff_amv_muxer
 

Macro Definition Documentation

◆ AMV_STREAM_COUNT

#define AMV_STREAM_COUNT   2

Definition at line 47 of file amvenc.c.

◆ AMV_STREAM_VIDEO

#define AMV_STREAM_VIDEO   0

Definition at line 48 of file amvenc.c.

◆ AMV_STREAM_AUDIO

#define AMV_STREAM_AUDIO   1

Definition at line 49 of file amvenc.c.

◆ AMV_VIDEO_STRH_SIZE

#define AMV_VIDEO_STRH_SIZE   56

Definition at line 50 of file amvenc.c.

◆ AMV_VIDEO_STRF_SIZE

#define AMV_VIDEO_STRF_SIZE   36

Definition at line 51 of file amvenc.c.

◆ AMV_AUDIO_STRH_SIZE

#define AMV_AUDIO_STRH_SIZE   48

Definition at line 52 of file amvenc.c.

◆ AMV_AUDIO_STRF_SIZE

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

Definition at line 53 of file amvenc.c.

Function Documentation

◆ amv_start_tag()

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

Definition at line 77 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 84 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 94 of file amvenc.c.

◆ amv_deinit()

static void amv_deinit ( AVFormatContext s)
static

Definition at line 201 of file amvenc.c.

◆ amv_write_vlist()

static void amv_write_vlist ( AVFormatContext s,
AVCodecParameters par 
)
static

Definition at line 208 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 227 of file amvenc.c.

Referenced by amv_write_header().

◆ amv_write_header()

static int amv_write_header ( AVFormatContext s)
static

Definition at line 257 of file amvenc.c.

◆ amv_write_packet_internal()

static int amv_write_packet_internal ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 294 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 319 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 338 of file amvenc.c.

◆ amv_write_trailer()

static int amv_write_trailer ( AVFormatContext s)
static

Definition at line 360 of file amvenc.c.

Variable Documentation

◆ ff_amv_muxer

const FFOutputFormat ff_amv_muxer
Initial value:
= {
.p.name = "amv",
.p.long_name = NULL_IF_CONFIG_SMALL("AMV"),
.p.mime_type = "video/amv",
.p.extensions = "amv",
.priv_data_size = sizeof(AMVContext),
.p.audio_codec = AV_CODEC_ID_ADPCM_IMA_AMV,
.p.video_codec = AV_CODEC_ID_AMV,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
.init = amv_init,
.deinit = amv_deinit,
.write_header = amv_write_header,
.write_packet = amv_write_packet,
.write_trailer = amv_write_trailer,
}

Definition at line 401 of file amvenc.c.

amv_deinit
static void amv_deinit(AVFormatContext *s)
Definition: amvenc.c:201
FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
Definition: mux.h:59
amv_init
static av_cold int amv_init(AVFormatContext *s)
Definition: amvenc.c:94
amv_write_packet
static int amv_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: amvenc.c:338
AV_CODEC_ID_ADPCM_IMA_AMV
@ AV_CODEC_ID_ADPCM_IMA_AMV
Definition: codec_id.h:386
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:106
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
FF_OFMT_FLAG_MAX_ONE_OF_EACH
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition: mux.h:50
amv_write_trailer
static int amv_write_trailer(AVFormatContext *s)
Definition: amvenc.c:360
AV_CODEC_ID_AMV
@ AV_CODEC_ID_AMV
Definition: codec_id.h:159
amv_write_header
static int amv_write_header(AVFormatContext *s)
Definition: amvenc.c:257
AMVContext
Definition: amvenc.c:55