Go to the documentation of this file.
44 #define BINK_EXTRADATA_SIZE 1
45 #define BINK_MAX_AUDIO_TRACKS 256
46 #define BINK_MAX_WIDTH 7680
47 #define BINK_MAX_HEIGHT 4800
48 #define SMUSH_BLOCK_SIZE 512
69 if (((
b[0] ==
'B' &&
b[1] ==
'I' &&
b[2] ==
'K' &&
70 (
b[3] ==
'b' ||
b[3] ==
'f' ||
b[3] ==
'g' ||
b[3] ==
'h' ||
b[3] ==
'i' ||
72 (
b[0] ==
'K' &&
b[1] ==
'B' &&
b[2] ==
'2' &&
73 (
b[3] ==
'a' ||
b[3] ==
'd' ||
b[3] ==
'f' ||
b[3] ==
'g' ||
b[3] ==
'h' ||
74 b[3] ==
'i' ||
b[3] ==
'j' ||
b[3] ==
'k'))) &&
81 }
while (smush && b < p->buf + p->
buf_size - 32);
89 uint32_t fps_num, fps_den;
92 uint32_t
pos, next_pos;
94 int next_keyframe = 1;
127 "invalid header: largest frame size greater than file size\n");
138 if (fps_num == 0 || fps_den == 0) {
140 "invalid header: invalid fps (%"PRIu32
"/%"PRIu32
")\n",
171 (
signature ==
AV_RL32(
"KB2") && (revision ==
'i' || revision ==
'j' || revision ==
'k')))
208 keyframe = next_keyframe;
214 next_keyframe = next_pos & 1;
219 if (next_pos <=
pos) {
252 if (index_entry < 0) {
254 "could not find index entry for frame %"PRId64
"\n",
268 "frame %"PRId64
": audio size in header (%"PRIu32
") > size of packet left (%"PRIu32
")\n",
274 if (audio_size >= 4) {
AVIndexEntry * index_entries
Only used if the format does not support seeking natively.
#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.
enum AVMediaType codec_type
General type of the encoded data.
#define AVERROR_EOF
End of file.
#define MKTAG(a, b, c, d)
#define AV_CH_LAYOUT_MONO
AVRational avg_frame_rate
Average framerate.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
int buf_size
Size of buf except extra allocated bytes.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int current_track
audio track to return in next packet
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.
uint32_t num_audio_tracks
int64_t duration
Decoding: duration of the stream, in stream time base.
unsigned int avio_rl16(AVIOContext *s)
#define AV_CH_LAYOUT_STEREO
static const char signature[]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
@ AV_CODEC_ID_BINKAUDIO_DCT
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
This structure contains the data a format has to probe a file.
int sample_rate
Audio only.
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int flags
A combination of AV_PKT_FLAG values.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int64_t audio_pts[BINK_MAX_AUDIO_TRACKS]
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
uint32_t remain_packet_size
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
uint64_t channel_layout
Audio only.
#define flags(name, subs,...)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
@ AV_CODEC_ID_BINKAUDIO_RDFT
int av_index_search_timestamp(AVStream *st, int64_t timestamp, int flags)
Get the index for a specific timestamp.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.