FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
astenc.c File Reference
#include "avformat.h"
#include "avio_internal.h"
#include "internal.h"
#include "ast.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  ASTMuxContext
 

Macros

#define CHECK_LOOP(type)
 
#define OFFSET(obj)   offsetof(ASTMuxContext, obj)
 

Functions

static int ast_write_header (AVFormatContext *s)
 
static int ast_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int ast_write_trailer (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass ast_muxer_class
 
AVOutputFormat ff_ast_muxer
 

Macro Definition Documentation

#define CHECK_LOOP (   type)
Value:
if (ast->loop ## type > 0) { \
ast->loop ## type = av_rescale_rnd(ast->loop ## type, par->sample_rate, 1000, AV_ROUND_DOWN); \
if (ast->loop ## type < 0 || ast->loop ## type > UINT_MAX) { \
av_log(s, AV_LOG_ERROR, "Invalid loop" #type " value\n"); \
return AVERROR(EINVAL); \
} \
}
const char * s
Definition: avisynth_c.h:768
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
#define AVERROR(e)
Definition: error.h:43
return
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
Definition: mathematics.c:58
static int loop
Definition: ffplay.c:336
GLint GLenum type
Definition: opengl_enc.c:105
Round toward -infinity.
Definition: mathematics.h:82
if(ret< 0)
Definition: vf_mcdeint.c:279

Definition at line 38 of file astenc.c.

Referenced by ast_write_header().

#define OFFSET (   obj)    offsetof(ASTMuxContext, obj)

Definition at line 188 of file astenc.c.

Function Documentation

static int ast_write_header ( AVFormatContext s)
static

Definition at line 47 of file astenc.c.

static int ast_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 109 of file astenc.c.

static int ast_write_trailer ( AVFormatContext s)
static

Definition at line 132 of file astenc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "loopstart", "Loopstart position in milliseconds.", OFFSET(loopstart), AV_OPT_TYPE_INT64, { .i64 = -1 }, -1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ "loopend", "Loopend position in milliseconds.", OFFSET(loopend), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:276
#define OFFSET(obj)
Definition: astenc.c:188

Definition at line 189 of file astenc.c.

const AVClass ast_muxer_class
static
Initial value:
= {
.class_name = "AST muxer",
.item_name = av_default_item_name,
.option = options,
}
static const AVOption options[]
Definition: astenc.c:189
#define LIBAVUTIL_VERSION_INT
Definition: version.h:86
av_default_item_name

Definition at line 195 of file astenc.c.

AVOutputFormat ff_ast_muxer
Initial value:
= {
.name = "ast",
.long_name = NULL_IF_CONFIG_SMALL("AST (Audio Stream)"),
.extensions = "ast",
.priv_data_size = sizeof(ASTMuxContext),
.video_codec = AV_CODEC_ID_NONE,
.priv_class = &ast_muxer_class,
.codec_tag = (const AVCodecTag* const []){ff_codec_ast_tags, 0},
}
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
Definition: ffmpeg.c:671
static int ast_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: astenc.c:109
static int ast_write_trailer(AVFormatContext *s)
Definition: astenc.c:132
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
static int ast_write_header(AVFormatContext *s)
Definition: astenc.c:47
const AVCodecTag ff_codec_ast_tags[]
Definition: ast.c:25
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:337
static const AVClass ast_muxer_class
Definition: astenc.c:195

Definition at line 202 of file astenc.c.