55 if (
s->internal->data_offset <= 8)
68 if (ret < par->extradata_size - 8)
76 if (bytestream2_get_le32(&gb) !=
MKTAG(
'f',
'm',
't', 0))
82 par->
channels = bytestream2_get_byte(&gb);
84 block_count = bytestream2_get_be32(&gb);
86 chunk = bytestream2_get_le32(&gb);
87 if (chunk ==
MKTAG(
'c',
'o',
'm',
'p')) {
88 block_size = bytestream2_get_be16(&gb);
89 }
else if (chunk ==
MKTAG(
'd',
'e',
'c', 0)) {
90 block_size = bytestream2_get_be16(&gb);
100 avio_seek(pb,
s->internal->data_offset, SEEK_SET);
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
unsigned int avio_rb16(AVIOContext *s)
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
#define MKTAG(a, b, c, d)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int hca_probe(const AVProbeData *p)
AVInputFormat ff_hca_demuxer
static int hca_read_header(AVFormatContext *s)
static int hca_read_packet(AVFormatContext *s, AVPacket *pkt)
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
This struct describes the properties of an encoded stream.
int extradata_size
Size of the extradata content in bytes.
enum AVMediaType codec_type
General type of the encoded data.
int block_align
Audio only.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
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
Audio only.
This structure stores compressed data.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
This structure contains the data a format has to probe a file.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t duration
Decoding: duration of the stream, in stream time base.