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"
Include dependency graph for astenc.c:

Go to the source code of this file.

Data Structures

struct  ASTMuxContext
 

Macros

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

Typedefs

typedef struct ASTMuxContext ASTMuxContext
 

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, enc->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:668
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:60
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
void av_log(void *avcl, int level, const char *fmt,...)
Definition: log.c:246
static int loop
Definition: ffplay.c:305
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:148
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Buffer references ownership and permissions
#define type
Round toward -infinity.
Definition: mathematics.h:70
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return

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.

Typedef Documentation

typedef struct ASTMuxContext ASTMuxContext

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 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
av_default_item_name
LIBAVUTIL_VERSION_INT
Definition: eval.c:55

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 int ast_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: astenc.c:109
static int write_packet(AVFormatContext *s, AVPacket *pkt)
static int write_trailer(AVFormatContext *s)
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. ...
struct ASTMuxContext ASTMuxContext
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:470
static const AVClass ast_muxer_class
Definition: astenc.c:195

Definition at line 202 of file astenc.c.

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 AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
NULL
Definition: eval.c:55
#define OFFSET(obj)
Definition: astenc.c:188

Definition at line 189 of file astenc.c.