FFmpeg: libavformat/nutenc.c Source File
Go to the documentation of this file. 1 /*
2 * nut muxer
3 * Copyright (c) 2004-2007 Michael Niedermayer
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 #include <stdint.h>
23
39
40 /**
41 * Chooses a timebase for muxing the specified stream.
42 *
43 * The chosen timebase allows sample accurate timestamps based
44 * on the framerate or sample rate for audio streams. It also is
45 * at least as precise as 1/min_precision would be.
46 */
48 {
50
51 for (int j = 2; j < 14; j += 1 + (j > 2))
52 while (q.
den / q.
num < min_precision && q.
num % j == 0)
54 while (q.
den / q.
num < min_precision && q.
den < (1<<24))
56
57 return q;
58 }
59
62 {
64
66 return 0;
67
69
71 if (key_frame) {
72 return 3;
73 } else {
75 return 4;
76 }
79 return 3;
81 return 3;
84 int lsf, mpeg25, sample_rate_index, bitrate_index,
frame_size;
86 unsigned int header = 0xFFF00000;
87
91 if (
sample_rate < (32000 + 44100) / 2) sample_rate_index = 2;
92 else if (
sample_rate < (44100 + 48000) / 2) sample_rate_index = 0;
93 else sample_rate_index = 1;
94
96
97 for (bitrate_index = 2; bitrate_index < 30; bitrate_index++) {
101 (bitrate_index & 1);
102
104 break;
105 }
106
108 header |= (4 - layer) << 17;
109 header |= 1 << 16;
//no crc
112 return 2; //we guess there is no crc, if there is one the user clearly does not care about overhead
113 if (bitrate_index == 30)
114 return -1; //something is wrong ...
115
116 header |= (bitrate_index >> 1) << 12;
117 header |= sample_rate_index << 10;
118 header |= (bitrate_index & 1) << 9;
119
120 return 2; //FIXME actually put the needed ones in build_elision_headers()
121 //return 3; //we guess that the private bit is not set
122 //FIXME the above assumptions should be checked, if these turn out false too often something should be done
123 }
124 return 0;
125 }
126
129 {
134
138 }
139 }
140
141 return 0;
142 }
143
145 {
148 //FIXME this is lame
149 //FIXME write a 2pass mode to find the maximal headers
150 static const uint8_t
headers[][5] = {
151 { 3, 0x00, 0x00, 0x01 },
152 { 4, 0x00, 0x00, 0x01, 0xB6},
153 { 2, 0xFF, 0xFA }, //mp3+crc
154 { 2, 0xFF, 0xFB }, //mp3
155 { 2, 0xFF, 0xFC }, //mp2+crc
156 { 2, 0xFF, 0xFD }, //mp2
157 };
158
163 }
164 }
165
167 {
170 int start = 1;
171 int end = 254;
172 int keyframe_0_esc =
s->nb_streams > 2;
173 int pred_table[10];
175
180 start++;
181
182 if (keyframe_0_esc) {
183 /* keyframe = 0 escape */
187 start++;
188 }
189
190 for (stream_id = 0; stream_id <
s->nb_streams; stream_id++) {
191 int start2 = start + (end - start) * stream_id /
s->nb_streams;
192 int end2 = start + (end - start) * (stream_id + 1) /
s->nb_streams;
195 int intra_only =
/*codec->intra_only || */ is_audio;
196 int pred_count;
198
203 } else {
205 if (
f.den == 1 &&
f.num>0)
207 }
210
211 for (key_frame = 0; key_frame < 2; key_frame++) {
212 if (!
intra_only || !keyframe_0_esc || key_frame != 0) {
218 if (is_audio)
220 start2++;
221 }
222 }
223
225 #if 1
226 if (is_audio) {
227 int frame_bytes;
229
230 if (par->block_align > 0) {
231 frame_bytes = par->block_align;
232 } else {
234 frame_bytes =
frame_size * (int64_t)par->bit_rate / (8 * par->sample_rate);
235 }
236
246 start2++;
247 }
248 }
249 } else {
255 start2++;
256 }
257 #endif
258
259 if (par->video_delay) {
260 pred_count = 5;
261 pred_table[0] = -2;
262 pred_table[1] = -1;
263 pred_table[2] = 1;
264 pred_table[3] = 3;
265 pred_table[4] = 4;
267 pred_count = 3;
268 pred_table[0] = 2;
269 pred_table[1] = 9;
270 pred_table[2] = 16;
271 } else {
272 pred_count = 1;
273 pred_table[0] = 1;
274 }
275
277 int start3 = start2 + (end2 - start2) *
pred / pred_count;
278 int end3 = start2 + (end2 - start2) * (
pred + 1) / pred_count;
279
281
287 //FIXME use single byte size and pred from last
291 if (is_audio)
293 }
294 }
295 }
300 }
301
302 /**
303 * Get the length in bytes which is needed to store val as v.
304 */
306 {
308
311
313 }
314
315 /**
316 * Put val using a variable number of bytes.
317 */
319 {
321
324
326 }
327
329 {
333 }
334 /**
335 * Store a string as vb.
336 */
338 {
339 size_t len = strlen(
string);
340
343 }
344
346 {
348 }
349
351 uint64_t startcode)
352 {
353 uint8_t *dyn_buf =
NULL;
355 int forw_ptr = dyn_size + 4;
356
357 if (forw_ptr > 4096)
361 if (forw_ptr > 4096)
363
367
369 }
370
372 {
373 int i, j, tmp_pts, tmp_flags, tmp_stream, tmp_mul, tmp_size, tmp_fields,
374 tmp_head_idx;
375 int64_t tmp_match;
376
383
387 }
388
389 tmp_pts = 0;
390 tmp_mul = 1;
391 tmp_stream = 0;
392 tmp_match = 1 - (1LL << 62);
393 tmp_head_idx = 0;
394 for (
i = 0;
i < 256; ) {
395 tmp_fields = 0;
396 tmp_size = 0;
397 // tmp_res=0;
402 // if (tmp_res != nut->frame_code[i].res ) tmp_fields=5;
404
410 // tmp_res = nut->frame_code[i].res;
412
413 for (j = 0;
i < 256; j++,
i++) {
415 j--;
416 continue;
417 }
423 // nut->frame_code[i].res != tmp_res ||
425 break;
426 }
427 if (j != tmp_mul - tmp_size)
428 tmp_fields = 6;
429
430 put_v(bc, tmp_flags);
431 put_v(bc, tmp_fields);
432 if (tmp_fields > 0)
put_s(bc, tmp_pts);
433 if (tmp_fields > 1)
put_v(bc, tmp_mul);
434 if (tmp_fields > 2)
put_v(bc, tmp_stream);
435 if (tmp_fields > 3)
put_v(bc, tmp_size);
436 if (tmp_fields > 4)
put_v(bc, 0
/*tmp_res*/);
437 if (tmp_fields > 5)
put_v(bc, j);
438 if (tmp_fields > 6)
put_v(bc, tmp_match);
439 if (tmp_fields > 7)
put_v(bc, tmp_head_idx);
440 }
445 }
446 // flags had been effectively introduced in version 4
449 }
450
453 {
456
462 default:
put_v(bc, 3);
break;
463 }
465
468 } else {
471 }
472
477 avio_w8(bc, 0);
/* flags: 0x1 - fixed_fps, 0x2 - index_present */
478
481
487 break;
491
496 } else {
499 }
500 put_v(bc, 0);
/* csp type -- unknown */
501 break;
502 default:
503 break;
504 }
505 return 0;
506 }
507
509 {
513 return 1;
514 }
515
517 {
521 uint8_t *dyn_buf =
NULL;
522 int count = 0, dyn_size;
526
530
531 put_v(bc, 0);
//stream_if_plus1
532 put_v(bc, 0);
//chapter_id
533 put_v(bc, 0);
//timestamp_start
534 put_v(bc, 0);
//length
535
537
541 return 0;
542 }
543
549 uint8_t *dyn_buf=
NULL;
550 int count=0, dyn_size,
i;
554
560 }
562 uint8_t buf[256];
565 else
567 count +=
add_info(dyn_bc,
"r_frame_rate", buf);
568 }
570
571 if (count) {
572 put_v(bc, stream_id + 1);
//stream_id_plus1
573 put_v(bc, 0);
//chapter_id
574 put_v(bc, 0);
//timestamp_start
575 put_v(bc, 0);
//length
576
578
580 }
581
583 return count;
584 }
585
587 {
589 uint8_t *dyn_buf =
NULL;
592 int ret, dyn_size, count = 0;
593
597
598 put_v(bc, 0);
// stream_id_plus1
599 put_s(bc,
id + 1);
// chapter_id
602
605
607
611 return 0;
612 }
613
619 int64_t payload_size;
620
622
624
628 dummy.pos = next_node[1]->pos;
629 }
630
634 int j, k;
637 int n = 0;
638
642 }
643
646 n++;
647
649 for (k= j - n; k<=j && k<nut->
sp_count; k++) {
651 continue;
655 }
656 }
657 }
658
659 payload_size =
avio_tell(bc) - startpos + 8 + 4;
660
661 avio_wb64(bc, 8 + payload_size +
av_log2(payload_size) / 7 + 1 + 4*(payload_size > 4096));
662
663 return 0;
664 }
665
667 {
671
673
679
684 }
686 }
687
690
697 }
698 }
699
704 }
706 }
707
710
714
716 }
717
719 {
723
725
729 "The additional syncpoint modes require version %d, "
730 "that is currently not finalized, "
731 "please set -f_strict experimental in order to enable it.\n",
734 }
735
742
743 for (
i = 0;
i <
s->nb_streams;
i++) {
745 int ssize;
748
751 } else {
753 }
754
756
759 break;
760 }
765
766 if (INT64_C(1000) * time_base.
num >= time_base.
den)
768 else
772 }
773
774 for (
i = 0;
i <
s->nb_chapters;
i++) {
776
779 break;
780
785 }
786
791
794
797
798 if (
s->avoid_negative_ts < 0)
799 s->avoid_negative_ts = 1;
800
801 return 0;
802 }
803
806 {
808
829
831 }
832
834 {
836 int best_i = 0;
837 int best_len = 0;
838
840 return 0;
841
848 }
849 return best_i;
850 }
851
853 {
854 int ret,
i, dyn_size;
857 int sm_data_count = 0;
859 uint8_t *dyn_buf;
860
864
868 const uint8_t *data_end =
data +
size;
869
870 if (is_meta) {
876 }
877 while (
data < data_end) {
880
881 if(
val >= data_end) {
884 }
889 sm_data_count++;
890 }
891 }
892 } else {
897 default:
905 } else {
910 }
915 sm_data_count++;
916 break;
919 #if FF_API_OLD_CHANNEL_LAYOUT
920 if (
flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) {
922 put_s(dyn_bc, bytestream_get_le32(&
data));
923 sm_data_count++;
924 }
925 if (
flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) {
926 put_str(dyn_bc,
"ChannelLayout");
931 sm_data_count++;
932 }
933 #endif
936 put_s(dyn_bc, bytestream_get_le32(&
data));
937 sm_data_count++;
938 }
941 put_s(dyn_bc, bytestream_get_le32(&
data));
943 put_s(dyn_bc, bytestream_get_le32(&
data));
944 sm_data_count+=2;
945 }
946 break;
951 sm_data_count++;
952 }
956 sm_data_count++;
957 }
958 break;
962 // belongs into meta, not side data
963 break;
964 }
965 }
966 }
967
969 put_v(bc, sm_data_count);
973
975 }
976
978 {
983 int64_t coded_pts;
984 int best_length, frame_code,
flags, needed_flags,
i, header_idx;
985 int best_header_idx;
987 int store_sp = 0;
989 int sm_size = 0;
991 uint8_t *sm_buf =
NULL;
992
995 "Negative pts not supported stream %d, pts %"PRId64"\n",
1000 }
1001
1012 data_size += sm_size;
1013 }
1014
1017
1019 store_sp = 1;
1020
1022 store_sp = 1;
1023
1024 //FIXME: Ensure store_sp is 1 in the first place.
1025
1026 if (store_sp &&
1028 int64_t sp_pos = INT64_MAX;
1029
1031 for (
i = 0;
i <
s->nb_streams;
i++) {
1047 }
1048 }
1049 }
1050
1057
1061 }
1064
1068
1069 if ((1ll<<60) % nut->
sp_count == 0)
1070 for (
i=0;
i<
s->nb_streams;
i++) {
1071 int j;
1077 }
1080 }
1081 }
1082 }
1084
1088
1090
1091 best_length = INT_MAX;
1092 frame_code = -1;
1093 for (
i = 0;
i < 256;
i++) {
1094 int length = 0;
1097
1099 continue;
1101
1103 length++;
1104 flags = needed_flags;
1105 }
1106
1107 if ((
flags & needed_flags) != needed_flags)
1108 continue;
1109
1111 continue;
1112
1115
1116 if (data_size %
fc->size_mul !=
fc->size_lsb)
1117 continue;
1120
1122 length += 4;
1123
1126
1130 }
1131
1133 length += 1 - nut->
header_len[best_header_idx];
1134 } else {
1136 }
1137
1138 length *= 4;
1141
1142 if (length < best_length) {
1143 best_length = length;
1145 }
1146 }
1148
1152 header_idx =
fc->header_idx;
1153
1158 flags = needed_flags;
1159 }
1164
1167
1170 }
1172
1175
1176 //FIXME just store one per syncpoint
1182 0,
1183 0,
1187 }
1188
1192 }
1193
1196
1198 }
1199
1201 {
1205
1208
1210 return 0;
1211
1218 }
1219
1220 return 0;
1221 }
1222
1224 {
1227
1230 for (
i=0;
i<
s->nb_streams;
i++)
1232
1236 }
1237
1238 #define OFFSET(x) offsetof(NUTContext, x)
1239 #define E AV_OPT_FLAG_ENCODING_PARAM
1242 {
"default",
"", 0,
AV_OPT_TYPE_CONST, {.i64 = 0}, INT_MIN, INT_MAX,
E,
"syncpoints" },
1243 {
"none",
"Disable syncpoints, low overhead and unseekable", 0,
AV_OPT_TYPE_CONST, {.i64 =
NUT_PIPE}, INT_MIN, INT_MAX,
E,
"syncpoints" },
1247 };
1248
1249 static const AVClass class = {
1254 };
1255
1259 .p.mime_type = "video/x-nut",
1260 .p.extensions = "nut",
1271 .p.priv_class = &class,
1272 };
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.
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)
static int get_v_length(uint64_t val)
Get the length in bytes which is needed to store val as v.
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.
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.
static AVRational choose_timebase(AVFormatContext *s, AVStream *st, int min_precision)
Chooses a timebase for muxing the specified stream.
#define SYNCPOINT_STARTCODE
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
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.
@ 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).
#define FF_COMPLIANCE_EXPERIMENTAL
Allow nonstandardized experimental things.
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val)
static int write_chapter(NUTContext *nut, AVIOContext *bc, int id)
int nb_channels
Number of channels in this layout.
int avio_get_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
#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.
static double val(void *priv, double ch)
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.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
@ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
int64_t end
chapter start/end time in time_base units
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.
const FFOutputFormat ff_nut_muxer
static int write_index(NUTContext *nut, AVIOContext *bc)
static void put_packet(NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc, uint64_t startcode)
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.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
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)
AVChannelLayout ch_layout
Audio only.
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)
void ffio_reset_dyn_buf(AVIOContext *s)
Reset a dynamic buffer.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int ff_standardize_creation_time(AVFormatContext *s)
Standardize creation_time metadata in AVFormatContext to an ISO-8601 timestamp string.
static int add_info(AVIOContext *bc, const char *type, const char *value)
#define AV_NOPTS_VALUE
Undefined timestamp value.
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...
#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)
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 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)
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.
@ 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
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.
const uint16_t ff_mpa_bitrate_tab[2][3][15]
void * av_calloc(size_t nmemb, size_t size)
FrameCode frame_code[256]
int disposition
Stream disposition - a combination of AV_DISPOSITION_* flags.
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
const AVCodecTag *const ff_nut_codec_tags[]
@ 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...
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
const uint16_t ff_mpa_freq_tab[3]
AVRational r_frame_rate
Real base framerate of the stream.
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.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
@ AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
Data found in BlockAdditional element of matroska container.
int video_delay
Video only.
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)
@ AV_PKT_DATA_QUALITY_STATS
This side data contains quality related information from the encoder.
#define flags(name, subs,...)
AVRational time_base
time base in which the start/end timestamps are specified
@ AV_CODEC_ID_MPEG2VIDEO
preferred ID for MPEG-1/2 video decoding
void * priv_data
Format private data.
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
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
static void put_v(AVIOContext *bc, uint64_t val)
Put val using a variable number of bytes.
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
Generated on Tue Feb 28 2023 21:34:08 for FFmpeg by
doxygen
1.8.17