FFmpeg: libavformat/flvdec.c Source File
Go to the documentation of this file. 1 /*
2 * FLV demuxer
3 * Copyright (c) 2003 The FFmpeg Project
4 *
5 * This demuxer will generate a 1 byte extradata for VP6F content.
6 * It is composed of:
7 * - upper 4 bits: difference between encoded width and visible width
8 * - lower 4 bits: difference between encoded height and visible height
9 *
10 * This file is part of FFmpeg.
11 *
12 * FFmpeg is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * FFmpeg is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with FFmpeg; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 */
26
40
41 #define VALIDATE_INDEX_TS_THRESH 2500
42
43 #define RESYNC_BUFFER_SIZE (1<<20)
44
45 #define MAX_DEPTH 16 ///< arbitrary limit to prevent unbounded recursion
46
48 const AVClass *
class;
///< Class for private options.
57 struct {
64
66
69
82
83 /* AMF date type */
88
90 {
91 const uint8_t *
d = p->
buf;
93
97 d[3] < 5 &&
d[5] == 0 &&
100 int is_live = !memcmp(
d +
offset + 40,
"NGINX RTMP", 10);
101
102 if (live == is_live)
104 }
105 return 0;
106 }
107
109 {
111 }
112
114 {
116 }
117
119 {
120 const uint8_t *
d = p->
buf;
121
128 }
129 return 0;
130 }
131
133 {
137
140 return;
141 }
142
145
146 if (
ffstream(stream)->nb_index_entries == 0) {
152 }
153 } else
155
160 }
161 }
162
164 {
167 if (!st)
170 if (
s->nb_streams>=3 ||(
s->nb_streams==2
179 }
184 }
185
186
190 return st;
191 }
192
194 {
198
200 return 1;
201
203 return 0;
204
205 switch (flv_codecid) {
206 // no distinction between S16 and S8 PCM codec flags
208 codec_id = bits_per_coded_sample == 8
210 #if HAVE_BIGENDIAN
212 #else
214 #endif
217 codec_id = bits_per_coded_sample == 8
239 default:
241 }
242 }
243
246 {
247 switch (flv_codecid) {
248 // no distinction between S16 and S8 PCM codec flags
252 #if HAVE_BIGENDIAN
254 #else
256 #endif
257 break;
262 break;
265 break;
268 break;
272 break;
276 break;
278 // in case metadata does not otherwise declare samplerate
281 break;
285 break;
288 break;
292 break;
296 break;
297 default:
301 }
302 }
303
305 {
307
309 return 1;
310
311 switch (flv_codecid) {
324 default:
326 }
327 }
328
330 int flv_codecid, int read)
331 {
336 switch (flv_codecid) {
339 break;
342 break; // Really mean it this time
345 break;
348 break;
354 if (read) {
357 }
360 else
362 }
363 ret = 1;
// 1 byte body size adjustment for flv_read_packet()
364 break;
368 ret = 3;
// not 4, reading packet type will consume one byte
369 break;
373 break;
374 default:
377 }
378
382 }
383
385 }
386
388 {
391 if (length >= buffsize) {
393 return -1;
394 }
395
401
403
404 return length;
405 }
406
408 {
410 unsigned int timeslen = 0, fileposlen = 0,
i;
411 char str_val[256];
412 int64_t *times =
NULL;
413 int64_t *filepositions =
NULL;
416
419 return 0;
420 }
423
425 return 0;
426
429 int64_t **current_array;
430 unsigned int arraylen;
431
432 // Expect array object in context
434 break;
435
437 if (arraylen>>28)
438 break;
439
441 current_array = ×
442 timeslen = arraylen;
444 !filepositions) {
445 current_array = &filepositions;
446 fileposlen = arraylen;
447 } else
448 // unexpected metatag inside keyframes, will not use such
449 // metadata for indexing
450 break;
451
452 if (!(*current_array =
av_mallocz(
sizeof(**current_array) * arraylen))) {
455 }
456
460 goto invalid;
462 if (
isnan(
d) || d < INT64_MIN || d > INT64_MAX)
463 goto invalid;
464 if (current_array == × && (d <= INT64_MIN / 1000 || d >= INT64_MAX / 1000))
465 goto invalid;
466 current_array[0][
i] =
d;
467 }
468 if (times && filepositions) {
469 // All done, exiting at a position allowing amf_parse_object
470 // to finish parsing the object
472 break;
473 }
474 }
475
476 if (timeslen == fileposlen && fileposlen>1 &&
max_pos <= filepositions[0]) {
477 for (
i = 0;
i <
FFMIN(2,fileposlen);
i++) {
481 }
486 filepositions =
NULL;
487 } else {
488 invalid:
490 }
491
497 }
498
502 {
507 char str_val[1024];
508 double num_val;
510
513
514 num_val = 0;
519
520 switch (amf_type) {
523 break;
526 break;
530 return -1;
531 }
532 break;
539 else
544 depth + 1) < 0)
545 return -1; // if we couldn't skip, bomb out.
548 return -1;
549 }
550 break;
554 break; // these take up no additional space
556 {
557 unsigned v;
558 avio_skip(ioc, 4);
// skip 32-bit max array index
561 // this is the only case in which we would want a nested
562 // parse to not skip over the object
564 depth + 1) < 0)
565 return -1;
568 av_log(
s,
AV_LOG_ERROR,
"Missing AMF_END_OF_OBJECT in AMF_DATA_TYPE_MIXEDARRAY, found %d\n", v);
569 return -1;
570 }
571 break;
572 }
574 {
575 unsigned int arraylen,
i;
576
580 depth + 1) < 0)
581 return -1; // if we couldn't skip, bomb out.
582 }
583 break;
585 // timestamp (double) and UTC offset (int16)
588 break;
589 default: // unsupported type, we couldn't skip
591 return -1;
592 }
593
597
598 // stream info doesn't live any deeper than the first object
599 if (depth == 1) {
602 if (!strcmp(
key,
"duration"))
604 else if (!strcmp(
key,
"videodatarate") &&
605 0 <= (int)(num_val * 1024.0))
607 else if (!strcmp(
key,
"audiodatarate") &&
608 0 <= (int)(num_val * 1024.0))
610 else if (!strcmp(
key,
"datastream")) {
612 if (!st)
615 }
else if (!strcmp(
key,
"framerate")) {
617 if (vstream)
620 if (!strcmp(
key,
"videocodecid") && vpar) {
624 }
else if (!strcmp(
key,
"audiocodecid") && apar) {
627 }
else if (!strcmp(
key,
"audiosamplerate") && apar) {
629 }
else if (!strcmp(
key,
"audiosamplesize") && apar) {
631 }
else if (!strcmp(
key,
"stereo") && apar) {
636 }
else if (!strcmp(
key,
"width") && vpar) {
637 vpar->
width = num_val;
638 }
else if (!strcmp(
key,
"height") && vpar) {
640 }
641 }
642 }
644 if (!strcmp(
key,
"encoder")) {
646 if (1 == sscanf(str_val,
"Open Broadcaster Software v0.%d", &
version)) {
649 }
650 }
else if (!strcmp(
key,
"metadatacreator")) {
651 if ( !strcmp (str_val, "MEGA")
652 || !strncmp(str_val, "FlixEngine", 10))
654 }
655 }
656 }
657
659 ((!apar && !strcmp(
key,
"audiocodecid")) ||
660 (!vpar && !strcmp(
key,
"videocodecid"))))
661 s->ctx_flags &= ~
AVFMTCTX_NOHEADER;
//If there is either audio/video missing, codecid will be an empty object
662
663 if ((!strcmp(
key,
"duration") ||
664 !strcmp(
key,
"filesize") ||
665 !strcmp(
key,
"width") ||
666 !strcmp(
key,
"height") ||
667 !strcmp(
key,
"videodatarate") ||
668 !strcmp(
key,
"framerate") ||
669 !strcmp(
key,
"videocodecid") ||
670 !strcmp(
key,
"audiodatarate") ||
671 !strcmp(
key,
"audiosamplerate") ||
672 !strcmp(
key,
"audiosamplesize") ||
673 !strcmp(
key,
"stereo") ||
674 !strcmp(
key,
"audiocodecid") ||
676 return 0;
677
680 av_strlcpy(str_val, num_val > 0 ?
"true" :
"false",
681 sizeof(str_val));
684 snprintf(str_val,
sizeof(str_val),
"%.f", num_val);
692 ) {
693 // timezone is ignored, since there is no easy way to offset the UTC
694 // timestamp into the specified timezone
696 }
697 }
698
699 return 0;
700 }
701
702 #define TYPE_ONTEXTDATA 1
703 #define TYPE_ONCAPTION 2
704 #define TYPE_ONCAPTIONINFO 3
705 #define TYPE_UNKNOWN 9
706
708 {
711 AVStream *stream, *astream, *vstream;
716
721
722 // first object needs to be "onMetaData" string
727
728 if (!strcmp(
buffer,
"onTextData"))
730
731 if (!strcmp(
buffer,
"onCaption"))
733
734 if (!strcmp(
buffer,
"onCaptionInfo"))
736
737 if (strcmp(
buffer,
"onMetaData") && strcmp(
buffer,
"onCuePoint") && strcmp(
buffer,
"|RtmpSampleAccess")) {
740 }
741
742 // find the streams now so that amf_parse_object doesn't need to do
743 // the lookup every time it is called.
744 for (
i = 0;
i <
s->nb_streams;
i++) {
745 stream =
s->streams[
i];
747 vstream = stream;
750 astream = stream;
754 dstream = stream;
755 }
756
757 // parse the second object (we want a mixed array)
759 return -1;
760
761 return 0;
762 }
763
765 {
769 int pre_tag_size = 0;
770
771 /* Actual FLV data at 0xe40000 in KUX file */
772 if(!strcmp(
s->iformat->name,
"kux"))
774
777
779
781
784
785 /* Annex E. The FLV File Format
786 * E.3 TheFLVFileBody
787 * Field Type Comment
788 * PreviousTagSize0 UI32 Always 0
789 * */
791 if (pre_tag_size) {
792 av_log(
s,
AV_LOG_WARNING,
"Read FLV header error, input file is not a standard flv format, first PreviousTagSize0 always is 0\n");
793 }
794
798
799 return 0;
800 }
801
803 {
810 return 0;
811 }
812
814 {
817 return 0;
818
822 return 0;
823 }
824
827 {
829 return 0;
830
838 return 0;
839 }
840
842 {
844 "Found invalid index entries, clearing the index.\n");
845 for (
unsigned i = 0;
i <
s->nb_streams;
i++) {
848 /* Remove all index entries that point to >= pos */
853 }
854 }
855
857 {
858 int nb = -1,
ret, parse_name = 1;
859
862
865
869 break;
872 break;
875 break;
877 parse_name = 0;
880 if (nb < 0)
884 if (parse_name) {
888 break;
889 }
891 }
894 }
895 break;
898 break;
899 default:
901 }
902 return 0;
903 }
904
906 int64_t dts, int64_t next)
907 {
910 char buf[20];
914
921 break;
922 default:
923 goto skip;
924 }
925
932 goto skip;
933 else
934 break;
935 } else {
937 goto skip;
938 }
939 }
940
941 if (length < 0) {
943 goto skip;
944 }
945
946 for (
i = 0;
i <
s->nb_streams;
i++) {
949 break;
950 }
951
952 if (
i ==
s->nb_streams) {
954 if (!st)
957 }
958
962
965
966 skip:
968
970 }
971
973 {
977
983
989 d[3] < 5 &&
d[5] == 0) {
993 }
994 }
995
1003 if (size1 == lsize1 - 11 && size2 == lsize2 - 11) {
1005 return 1;
1006 }
1007 }
1008 }
1009 }
1010 }
1012 }
1013
1015 {
1019 int stream_type=-1;
1020 int64_t next,
pos, meta_pos;
1025 int last = -1;
1026 int orig_size;
1027
1028 retry:
1029 /* pkt size is repeated at end. skip it */
1032 orig_size =
1036 dts |= (unsigned)
avio_r8(
s->pb) << 24;
1037 av_log(
s,
AV_LOG_TRACE,
"type:%d, size:%d, last:%d, dts:%"PRId64
" pos:%"PRId64
"\n",
type,
size, last, dts,
avio_tell(
s->pb));
1040 avio_skip(
s->pb, 3);
/* stream id, always 0 */
1042
1045 if (
pos == validate_pos) {
1049 } else {
1052 }
1053 }
else if (
pos > validate_pos) {
1056 }
1057 }
1058
1061 goto leave;
1062 }
1063
1065
1075 goto skip;
1078 if (
size > 13 + 1 + 4) {
// Header-type metadata stuff
1082 if (
type == 0 && dts == 0 ||
type < 0) {
1083 if (type < 0 && flv->validate_count &&
1088 }
1089 goto skip;
1097 }
1099 }
1100 } else {
1102 "Skipping flv packet: type %d, size %d, flags %d.\n",
1104 skip:
1105 if (
avio_seek(
s->pb, next, SEEK_SET) != next) {
1106 // This can happen if flv_read_metabody above read past
1107 // next, on a non-seekable input, and the preceding data has
1108 // been flushed out from the IO buffer.
1111 }
1113 goto leave;
1114 }
1115
1116 /* skip empty data packets */
1119 goto leave;
1120 }
1121
1122 /* now find stream */
1123 for (
i = 0;
i <
s->nb_streams;
i++) {
1128 break;
1132 break;
1135 break;
1138 break;
1139 }
1140 }
1141 if (
i ==
s->nb_streams) {
1144 if (!st)
1146 }
1148
1151 }
1152
1157
1163 goto leave;
1164 }
1165
1166 // if not streamed and no duration from metadata then seek to end to find
1167 // the duration from the timestamps
1173 // Read the last 4 bytes of the file, this should be the size of the
1174 // previous FLV tag. Use the timestamp of its payload as duration.
1176 retry_duration:
1180 // Seek to the start of the last FLV tag at position (fsize - 4 - size)
1181 // but skip the byte indicating the type.
1185 ts |= (unsigned)
avio_r8(
s->pb) << 24;
1186 if (ts)
1190 goto retry_duration;
1191 }
1192 }
1193 }
1194
1197 }
1198
1200 int bits_per_coded_sample;
1213 }
1221 } else {
1223 if (!par) {
1225 goto leave;
1226 }
1232 }
1242 }
1243
1249
1252 goto leave;
1253 }
1254
1256 // sign extension
1259 if (cts < 0) { // dts might be wrong
1262 "Negative cts, previous timestamps might be wrong.\n");
1264 }
else if (
FFABS(dts -
pts) > 1000*60*15) {
1266 "invalid timestamps %"PRId64
" %"PRId64
"\n", dts,
pts);
1268 }
1269 }
1273
1278 goto leave;
1279 }
1282
1283 /* Workaround for buggy Omnia A/XE encoder */
1287
1289 goto leave;
1290 }
1291 }
1292
1293 /* skip empty data packets */
1296 goto leave;
1297 }
1298
1313 }
1314 }
1321 }
1322
1328
1329 leave:
1332 if (last != orig_size + 11 && last != orig_size + 10 &&
1341 goto retry;
1342 }
1343 }
1344 }
1345
1348
1350 }
1351
1353 int64_t ts,
int flags)
1354 {
1358 }
1359
1360 #define OFFSET(x) offsetof(FLVContext, x)
1361 #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
1363 {
"flv_metadata",
"Allocate streams according to the onMetaData array",
OFFSET(trust_metadata),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
VD },
1364 {
"flv_full_metadata",
"Dump full metadata of the onMetadata",
OFFSET(dump_full_metadata),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
VD },
1365 {
"flv_ignore_prevtag",
"Ignore the Size of previous tag",
OFFSET(trust_datasize),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
VD },
1368 };
1369
1375 };
1376
1386 .extensions = "flv",
1388 };
1389
1399 .extensions = "flv",
1402 };
1403
1413 .extensions = "kux",
1415 };
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
#define AV_LOG_WARNING
Something somehow does not look correct.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
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
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_OPT_FLAG_READONLY
The option may not be set through the AVOptions API, only read.
enum AVMediaType codec_type
General type of the encoded data.
This struct describes the properties of an encoded stream.
#define AVERROR_EOF
End of file.
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
static av_always_inline double av_int2double(uint64_t i)
Reinterpret a 64-bit integer as a double.
#define AV_CH_LAYOUT_MONO
int trust_metadata
configure streams according onMetaData
AVRational avg_frame_rate
Average framerate.
uint8_t resync_buffer[2 *RESYNC_BUFFER_SIZE]
void avcodec_parameters_free(AVCodecParameters **ppar)
Free an AVCodecParameters instance and everything associated with it and write NULL to the supplied p...
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
int buf_size
Size of buf except extra allocated bytes.
int trust_datasize
trust data size of FLVTag
enum AVMediaType codec_type
int64_t avio_size(AVIOContext *s)
Get the filesize.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
struct FLVContext::@255 validate_index[2]
int64_t * keyframe_filepositions
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, uint8_t *data, size_t size)
Wrap an existing array as a packet side data.
int64_t avio_seek_time(AVIOContext *h, int stream_index, int64_t timestamp, int flags)
Seek to a given timestamp relative to some component stream.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
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_cold int read_close(AVFormatContext *ctx)
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
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
#define AV_CH_LAYOUT_STEREO
unsigned int avio_rb32(AVIOContext *s)
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#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 new_extradata_size[FLV_STREAM_TYPE_NB]
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
static int64_t fsize(FILE *f)
@ AVDISCARD_BIDIR
discard all bidirectional frames
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
enum AVStreamParseType need_parsing
@ AVDISCARD_ALL
discard all
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define LIBAVUTIL_VERSION_INT
static int read_header(FFV1Context *f)
Describe the class of an AVClass context structure.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
Rational number (pair of numerator and denominator).
const char * av_default_item_name(void *ptr)
Return the context name.
uint64_t avio_rb64(AVIOContext *s)
This structure contains the data a format has to probe a file.
int sample_rate
Audio only.
AVCodecID
Identify the syntax and semantics of the bitstream.
int extradata_size
Size of the extradata content in bytes.
@ AVDISCARD_NONKEY
discard all frames except keyframes
unsigned int avio_rb24(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
#define AV_NOPTS_VALUE
Undefined timestamp value.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
int avio_r8(AVIOContext *s)
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 offset
int flags
A combination of AV_PKT_FLAG values.
#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...
int last_keyframe_stream_index
#define AV_TIME_BASE
Internal time base represented as integer.
AVRational av_d2q(double d, int max)
Convert a double precision floating point number to a rational.
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
AVCodecParameters * avcodec_parameters_alloc(void)
Allocate a new AVCodecParameters and set its fields to default values (unknown/invalid/0).
int wrong_dts
wrong dts due to negative cts
uint8_t * new_extradata[FLV_STREAM_TYPE_NB]
static int array[MAX_W *MAX_W]
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
unsigned int avio_rb16(AVIOContext *s)
@ AV_CODEC_ID_TEXT
raw UTF-8 text
#define AV_INPUT_BUFFER_PADDING_SIZE
int index
stream index in AVFormatContext
#define AV_OPT_FLAG_EXPORT
The option is intended for exporting values to the caller.
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
@ 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...
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int eof_reached
true if was unable to read due to error or eof
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
#define avpriv_request_sample(...)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
int64_t pos
byte position in stream, -1 if unknown
uint64_t channel_layout
Audio only.
int need_context_update
Whether the internal avctx needs to be updated from codecpar (after a late change to codecpar)
#define flags(name, subs,...)
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24
int dump_full_metadata
Dump full metadata of the onMetadata.
int avpriv_dict_set_timestamp(AVDictionary **dict, const char *key, int64_t timestamp)
Set a dictionary value to an ISO-8601 compliant timestamp string.
static const int32_t max_pos[4]
Size of the MP-MLQ fixed excitation codebooks.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
Generated on Wed Aug 24 2022 21:37:34 for FFmpeg by
doxygen
1.8.17