Go to the documentation of this file.
   62         int lsf, mpeg25, sample_rate_index, bitrate_index, 
frame_size;
 
   64         unsigned int header = 0xFFF00000;
 
   69         if      (
sample_rate < (32000 + 44100) / 2) sample_rate_index = 2;
 
   70         else if (
sample_rate < (44100 + 48000) / 2) sample_rate_index = 0;
 
   71         else                                        sample_rate_index = 1;
 
   75         for (bitrate_index = 2; bitrate_index < 30; bitrate_index++) {
 
   86         header |= (4 - layer) << 17;
 
   91         if (bitrate_index == 30)
 
   94         header |= (bitrate_index >> 1) << 12;
 
   95         header |= sample_rate_index << 10;
 
   96         header |= (bitrate_index & 1) << 9;
 
  129         { 3, 0x00, 0x00, 0x01 },
 
  130         { 4, 0x00, 0x00, 0x01, 0xB6},
 
  150     int keyframe_0_esc = 
s->nb_streams > 2;
 
  160     if (keyframe_0_esc) {
 
  168     for (stream_id = 0; stream_id < 
s->nb_streams; stream_id++) {
 
  170         int end2   = 
start + (
end - 
start) * (stream_id + 1) / 
s->nb_streams;
 
  183             if (
f.den == 1 && 
f.num>0)
 
  189         for (key_frame = 0; key_frame < 2; key_frame++) {
 
  190             if (!
intra_only || !keyframe_0_esc || key_frame != 0) {
 
  208             if (par->block_align > 0) {
 
  209                 frame_bytes = par->block_align;
 
  212                 frame_bytes = 
frame_size * (int64_t)par->bit_rate / (8 * par->sample_rate);
 
  237         if (par->video_delay) {
 
  255             int start3 = start2 + (end2 - start2) * 
pred / pred_count;
 
  256             int end3   = start2 + (end2 - start2) * (
pred + 1) / pred_count;
 
  291     size_t len = strlen(
string);
 
  304                        int calculate_checksum, uint64_t startcode)
 
  308     int forw_ptr     = dyn_size + 4 * calculate_checksum;
 
  317     if (calculate_checksum)
 
  320     if (calculate_checksum)
 
  328     int i, j, tmp_pts, tmp_flags, tmp_stream, tmp_mul, tmp_size, tmp_fields,
 
  347     tmp_match    = 1 - (1LL << 62);
 
  349     for (
i = 0; 
i < 256; ) {
 
  368         for (j = 0; 
i < 256; j++, 
i++) {
 
  382         if (j != tmp_mul - tmp_size)
 
  387         if (tmp_fields > 0) 
put_s(bc, tmp_pts);
 
  388         if (tmp_fields > 1) 
ff_put_v(bc, tmp_mul);
 
  389         if (tmp_fields > 2) 
ff_put_v(bc, tmp_stream);
 
  390         if (tmp_fields > 3) 
ff_put_v(bc, tmp_size);
 
  391         if (tmp_fields > 4) 
ff_put_v(bc, 0 );
 
  392         if (tmp_fields > 5) 
ff_put_v(bc, j);
 
  393         if (tmp_fields > 6) 
ff_put_v(bc, tmp_match);
 
  394         if (tmp_fields > 7) 
ff_put_v(bc, tmp_head_idx);
 
  477     int count        = 0, dyn_size;
 
  574     int64_t payload_size;
 
  583         dummy.pos = next_node[1]->pos;
 
  604             for (k= j - 
n; k<=j && k<nut->
sp_count; k++) {
 
  614     payload_size = 
avio_tell(bc) - startpos + 8 + 4;
 
  616     avio_wb64(bc, 8 + payload_size + 
av_log2(payload_size) / 7 + 1 + 4*(payload_size > 4096));
 
  692                "The additional syncpoint modes require version %d, " 
  693                "that is currently not finalized, " 
  694                "please set -f_strict experimental in order to enable it.\n",
 
  710     for (
i = 0; 
i < 
s->nb_streams; 
i++) {
 
  733         if (INT64_C(1000) * time_base.
num >= time_base.
den)
 
  741     for (
i = 0; 
i < 
s->nb_chapters; 
i++) {
 
  765     if (
s->avoid_negative_ts < 0)
 
  766         s->avoid_negative_ts = 1;
 
  823     int ret, 
i, dyn_size;
 
  826     int sm_data_count = 0;
 
  846                 while (
data < data_end) {
 
  850                     if(
val >= data_end) {
 
  890                     put_s(dyn_bc, bytestream_get_le32(&
data));
 
  894                     put_str(dyn_bc, 
"ChannelLayout");
 
  903                     put_s(dyn_bc, bytestream_get_le32(&
data));
 
  908                     put_s(dyn_bc, bytestream_get_le32(&
data));
 
  910                     put_s(dyn_bc, bytestream_get_le32(&
data));
 
  951     int best_length, frame_code, 
flags, needed_flags, 
i, header_idx;
 
  962                "Negative pts not supported stream %d, pts %"PRId64
"\n",
 
  979         data_size += sm_size;
 
  995         int64_t sp_pos = INT64_MAX;
 
  998         for (
i = 0; 
i < 
s->nb_streams; 
i++) {
 
 1034         if ((1ll<<60) % nut->
sp_count == 0)
 
 1035             for (
i=0; 
i<
s->nb_streams; 
i++) {
 
 1056     best_length = INT_MAX;
 
 1058     for (
i = 0; 
i < 256; 
i++) {
 
 1069             flags = needed_flags;
 
 1072         if ((
flags & needed_flags) != needed_flags)
 
 1081         if (data_size % 
fc->size_mul != 
fc->size_lsb)
 
 1107         if (
length < best_length) {
 
 1117     header_idx   = 
fc->header_idx;
 
 1123         flags = needed_flags;
 
 1194         for (
i=0; 
i<
s->nb_streams; 
i++)
 
 1202 #define OFFSET(x) offsetof(NUTContext, x) 
 1203 #define E AV_OPT_FLAG_ENCODING_PARAM 
 1206     { 
"default",     
"",                                                0,             
AV_OPT_TYPE_CONST, {.i64 = 0},             INT_MIN, INT_MAX, 
E, 
"syncpoints" },
 
 1207     { 
"none",        
"Disable syncpoints, low overhead and unseekable", 0,             
AV_OPT_TYPE_CONST, {.i64 = 
NUT_PIPE},      INT_MIN, INT_MAX, 
E, 
"syncpoints" },
 
 1213 static const AVClass class = {
 
 1223     .mime_type      = 
"video/x-nut",
 
 1224     .extensions     = 
"nut",
 
 1235     .priv_class     = &
class,
 
  
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
 
static int write_streaminfo(NUTContext *nut, AVIOContext *bc, int stream_id)
 
#define AV_LOG_WARNING
Something somehow does not look correct.
 
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
 
#define AVERROR_EXPERIMENTAL
Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it.
 
void ff_put_v(AVIOContext *bc, uint64_t val)
Put val using a variable number of bytes.
 
static void write_mainheader(NUTContext *nut, AVIOContext *bc)
 
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame 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. Frame references ownership and permissions
 
static int write_globalinfo(NUTContext *nut, AVIOContext *bc)
 
enum AVMediaType codec_type
General type of the encoded data.
 
unsigned int time_base_count
 
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b)
Compare two timestamps each in its own time base.
 
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
 
static int get_needed_flags(NUTContext *nut, StreamContext *nus, FrameCode *fc, AVPacket *pkt)
 
unsigned int nb_chapters
Number of chapters in AVChapter array.
 
This struct describes the properties of an encoded stream.
 
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
 
unsigned int max_distance
 
static int nut_write_trailer(AVFormatContext *s)
 
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
 
#define SYNCPOINT_STARTCODE
 
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
 
uint8_t pi<< 24) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_U8,(uint64_t)((*(const uint8_t *) pi - 0x80U))<< 56) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16,(*(const int16_t *) pi >>8)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S16,(uint64_t)(*(const int16_t *) pi)<< 48) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32,(*(const int32_t *) pi >>24)+0x80) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_S32,(uint64_t)(*(const int32_t *) pi)<< 32) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S64,(*(const int64_t *) pi >>56)+0x80) CONV_FUNC(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0f/(INT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S64, *(const int64_t *) pi *(1.0/(INT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_FLT, llrintf(*(const float *) pi *(INT64_C(1)<< 63))) CONV_FUNC(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) CONV_FUNC(AV_SAMPLE_FMT_S64, int64_t, AV_SAMPLE_FMT_DBL, llrint(*(const double *) pi *(INT64_C(1)<< 63))) #define FMT_PAIR_FUNC(out, in) static conv_func_type *const fmt_pair_to_conv_functions[AV_SAMPLE_FMT_NB *AV_SAMPLE_FMT_NB]={ FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_U8), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S16), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S32), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_FLT), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_DBL), FMT_PAIR_FUNC(AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_S64), FMT_PAIR_FUNC(AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64), };static void cpy1(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, len);} static void cpy2(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 2 *len);} static void cpy4(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 4 *len);} static void cpy8(uint8_t **dst, const uint8_t **src, int len){ memcpy(*dst, *src, 8 *len);} AudioConvert *swri_audio_convert_alloc(enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, const int *ch_map, int flags) { AudioConvert *ctx;conv_func_type *f=fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt)+AV_SAMPLE_FMT_NB *av_get_packed_sample_fmt(in_fmt)];if(!f) return NULL;ctx=av_mallocz(sizeof(*ctx));if(!ctx) return NULL;if(channels==1){ in_fmt=av_get_planar_sample_fmt(in_fmt);out_fmt=av_get_planar_sample_fmt(out_fmt);} ctx->channels=channels;ctx->conv_f=f;ctx->ch_map=ch_map;if(in_fmt==AV_SAMPLE_FMT_U8||in_fmt==AV_SAMPLE_FMT_U8P) memset(ctx->silence, 0x80, sizeof(ctx->silence));if(out_fmt==in_fmt &&!ch_map) { switch(av_get_bytes_per_sample(in_fmt)){ case 1:ctx->simd_f=cpy1;break;case 2:ctx->simd_f=cpy2;break;case 4:ctx->simd_f=cpy4;break;case 8:ctx->simd_f=cpy8;break;} } if(HAVE_X86ASM &&1) swri_audio_convert_init_x86(ctx, out_fmt, in_fmt, channels);if(ARCH_ARM) swri_audio_convert_init_arm(ctx, out_fmt, in_fmt, channels);if(ARCH_AARCH64) swri_audio_convert_init_aarch64(ctx, out_fmt, in_fmt, channels);return ctx;} void swri_audio_convert_free(AudioConvert **ctx) { av_freep(ctx);} int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len) { int ch;int off=0;const int os=(out->planar ? 1 :out->ch_count) *out->bps;unsigned misaligned=0;av_assert0(ctx->channels==out->ch_count);if(ctx->in_simd_align_mask) { int planes=in->planar ? in->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) in->ch[ch];misaligned|=m &ctx->in_simd_align_mask;} if(ctx->out_simd_align_mask) { int planes=out->planar ? out->ch_count :1;unsigned m=0;for(ch=0;ch< planes;ch++) m|=(intptr_t) out->ch[ch];misaligned|=m &ctx->out_simd_align_mask;} if(ctx->simd_f &&!ctx->ch_map &&!misaligned){ off=len &~15;av_assert1(off >=0);av_assert1(off<=len);av_assert2(ctx->channels==SWR_CH_MAX||!in->ch[ctx->channels]);if(off >0){ if(out->planar==in->planar){ int planes=out->planar ? out->ch_count :1;for(ch=0;ch< planes;ch++){ ctx->simd_f(out-> ch ch
 
const uint16_t avpriv_mpa_freq_tab[3]
 
const uint16_t avpriv_mpa_bitrate_tab[2][3][15]
 
static av_cold int end(AVCodecContext *avctx)
 
AVStream ** streams
A list of all streams in the file.
 
static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
 
const Dispositions ff_nut_dispositions[]
 
int64_t last_syncpoint_pos
 
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
 
AVRational avg_frame_rate
Average framerate.
 
#define AV_DICT_IGNORE_SUFFIX
Return first entry in a dictionary whose first part corresponds to the search key,...
 
@ AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
 
#define fc(width, name, range_min, range_max)
 
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
 
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val)
 
static int write_chapter(NUTContext *nut, AVIOContext *bc, int id)
 
@ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT
 
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
 
unsigned long ffio_get_checksum(AVIOContext *s)
 
int ff_nut_sp_pos_cmp(const void *a, const void *b)
 
void ff_nut_free_sp(NUTContext *nut)
 
static int find_best_header_idx(NUTContext *nut, AVPacket *pkt)
 
static int nut_write_header(AVFormatContext *s)
 
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
 
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
 
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
 
const uint8_t * header[128]
 
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
 
@ AV_PKT_DATA_STRINGS_METADATA
A list of zero terminated key/value strings.
 
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
 
static void put_str(AVIOContext *bc, const char *string)
Store a string as vb.
 
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
 
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
 
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
 
@ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
 
const AVMetadataConv ff_nut_metadata_conv[]
 
#define av_assert0(cond)
assert() equivalent, that is always enabled.
 
static int write_streamheader(AVFormatContext *avctx, AVIOContext *bc, AVStream *st, int i)
 
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
 
static int write_index(NUTContext *nut, AVIOContext *bc)
 
static int find_expected_header(AVCodecParameters *p, int size, int key_frame, uint8_t out[64])
 
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
 
static const AVOption options[]
 
AVCodecParameters * codecpar
Codec parameters associated with this stream.
 
#define LIBAVUTIL_VERSION_INT
 
Describe the class of an AVClass context structure.
 
static int write_trailer(AVFormatContext *s1)
 
Rational number (pair of numerator and denominator).
 
enum AVPacketSideDataType type
 
const char * av_default_item_name(void *ptr)
Return the context name.
 
void avio_w8(AVIOContext *s, int b)
 
static void build_elision_headers(AVFormatContext *s)
 
static int write_headers(AVFormatContext *avctx, AVIOContext *bc)
 
int sample_rate
Audio only.
 
int extradata_size
Size of the extradata content in bytes.
 
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
 
static void put_tt(NUTContext *nut, AVRational *time_base, AVIOContext *bc, uint64_t val)
 
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.
 
static void put_s(AVIOContext *bc, int64_t val)
 
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
 
static int add_info(AVIOContext *bc, const char *type, const char *value)
 
#define AV_NOPTS_VALUE
Undefined timestamp value.
 
#define NUT_STABLE_VERSION
 
static void build_frame_code(AVFormatContext *s)
 
void ffio_init_checksum(AVIOContext *s, unsigned long(*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum)
 
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
 
const char const char void * val
 
static const uint8_t header[24]
 
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
 
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
 
int av_reallocp_array(void *ptr, size_t nmemb, size_t size)
Allocate, reallocate, or free an array through a pointer to a pointer.
 
void avio_wl32(AVIOContext *s, unsigned int val)
 
int flags
A combination of AV_PKT_FLAG values.
 
static int find_header_idx(AVFormatContext *s, AVCodecParameters *p, int size, int frame_type)
 
@ AV_PKT_DATA_METADATA_UPDATE
A list of zero terminated key/value strings.
 
unsigned long ff_crc04C11DB7_update(unsigned long checksum, const uint8_t *buf, unsigned int len)
 
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int unqueue)
 
int ff_nut_add_sp(NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts)
 
struct AVTreeNode * syncpoints
 
#define i(width, name, range_min, range_max)
 
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
 
int64_t ff_lsb2full(StreamContext *stream, int64_t lsb)
 
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
 
static void put_packet(NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc, int calculate_checksum, uint64_t startcode)
 
@ AV_ROUND_DOWN
Round toward -infinity.
 
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
 
FFmpeg currently uses a custom build this text attempts to document some of its obscure features and options Makefile the full command issued by make and its output will be shown on the screen DBG Preprocess x86 external assembler files to a dbg asm file in the object which then gets compiled Helps in developing those assembler files DESTDIR Destination directory for the install useful to prepare packages or install FFmpeg in cross environments GEN Set to ‘1’ to generate the missing or mismatched references Makefile builds all the libraries and the executables fate Run the fate test note that you must have installed it fate list List all fate regression test targets install Install headers
 
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
 
@ AV_PKT_DATA_SKIP_SAMPLES
Recommmends skipping the specified number of samples.
 
FrameCode frame_code[256]
 
int disposition
AV_DISPOSITION_* bit field.
 
void ffio_free_dyn_buf(AVIOContext **s)
Free a dynamic buffer.
 
static const float pred[4]
 
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
 
void ff_parse_specific_params(AVStream *st, int *au_rate, int *au_ssize, int *au_scale)
 
AVPacketSideData * side_data
Additional packet data that can be provided by the container.
 
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
 
void * av_calloc(size_t nmemb, size_t size)
Non-inlined equivalent of av_mallocz_array().
 
const AVCodecTag *const ff_nut_codec_tags[]
 
@ AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT
 
AVOutputFormat ff_nut_muxer
 
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
 
AVRational r_frame_rate
Real base framerate of the stream.
 
int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
This function is the same as av_get_audio_frame_duration(), except it works with AVCodecParameters in...
 
static int write_sm_data(AVFormatContext *s, AVIOContext *bc, AVPacket *pkt, int is_meta)
 
void * av_tree_find(const AVTreeNode *t, void *key, int(*cmp)(const void *key, const void *b), void *next[2])
 
void avio_wb64(AVIOContext *s, uint64_t val)
 
int64_t av_gettime(void)
Get the current time in microseconds.
 
@ AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
Data found in BlockAdditional element of matroska container.
 
int video_delay
Video only.
 
int void avio_flush(AVIOContext *s)
Force flushing of buffered data.
 
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
 
This structure stores compressed data.
 
static void nut_write_deinit(AVFormatContext *s)
 
int ff_get_v_length(uint64_t val)
Get the length in bytes which is needed to store val as v.
 
@ AV_PKT_DATA_QUALITY_STATS
This side data contains quality related information from the encoder.
 
#define flags(name, subs,...)
 
static void write_header(FFV1Context *f)
 
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
 
void * priv_data
Format private data.
 
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_RB64
 
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.