26#define BITSTREAM_READER_LE
44 if (!memcmp(p->buf,
"tBaK", 4))
49static unsigned long tak_check_crc(
unsigned long checksum,
const uint8_t *buf,
117 char md5_hex[2 *
sizeof(
md5) + 1];
216 pkt->stream_index = 0;
228 .p.extensions =
"tak",
int64_t ff_ape_parse_tag(AVFormatContext *s)
Read and parse an APE tag.
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
#define AVIO_SEEKABLE_NORMAL
Seeking works like for a local file.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rl32(AVIOContext *s)
unsigned int avio_rl24(AVIOContext *s)
unsigned int avio_rb24(AVIOContext *s)
int avio_r8(AVIOContext *s)
void ffio_init_checksum(AVIOContext *s, unsigned long(*update_checksum)(unsigned long c, const uint8_t *p, unsigned int len), unsigned long checksum)
unsigned long ffio_get_checksum(AVIOContext *s)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int BS_FUNC left(const BSCTX *bc)
Return the number of the bits left in a buffer.
static int read_probe(const AVProbeData *p)
Public header for CRC hash function implementation.
#define AV_EF_EXPLODE
abort decoding on minor error detection
static int raw_read_packet(AVFormatContext *s, AVPacket *pkt)
static int read_header(FFV1Context *f, RangeCoder *c)
static uint64_t get_bits64(GetBitContext *s, int n)
Read 0-64 bits.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
int av_channel_layout_from_mask(AVChannelLayout *channel_layout, uint64_t mask)
Initialize a native channel layout from a bitmask indicating which channels are present.
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
const AVCRC * av_crc_get_table(AVCRCId crc_id)
Get an initialized standard CRC table.
uint32_t av_crc(const AVCRC *ctx, uint32_t crc, const uint8_t *buffer, size_t length)
Calculate the CRC of a block.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_VERBOSE
Detailed information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Macro definitions for various function/variable attributes.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define MKTAG(a, b, c, d)
Memory handling functions.
enum AVChannelOrder order
Channel order used in this layout.
int nb_channels
Number of channels in this layout.
int extradata_size
Size of the extradata content in bytes.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
enum AVMediaType codec_type
General type of the encoded data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
int seekable
A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
This structure stores compressed data.
This structure contains the data a format has to probe a file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t duration
Decoding: duration of the stream, in stream time base.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
enum AVStreamParseType need_parsing
FFRawDemuxerContext rawctx
int avpriv_tak_parse_streaminfo(TAKStreamInfo *s, const uint8_t *buf, int size)
Parse the Streaminfo metadata block.
TAK (Tom's lossless Audio Kompressor) decoder/demuxer common functions.
@ TAK_METADATA_STREAMINFO
@ TAK_METADATA_LAST_FRAME
#define TAK_LAST_FRAME_POS_BITS
#define TAK_LAST_FRAME_SIZE_BITS
static struct AVMD5 * md5