31#define HCA_MASK 0x7f7f7f7f
61 uint16_t block_size, data_offset;
92 if ((bytestream2_get_le32(&gb) &
HCA_MASK) !=
MKTAG(
'f',
'm',
't', 0))
100 block_count = bytestream2_get_be32(&gb);
102 chunk = bytestream2_get_le32(&gb) &
HCA_MASK;
103 if (chunk ==
MKTAG(
'c',
'o',
'm',
'p')) {
104 block_size = bytestream2_get_be16(&gb);
105 }
else if (chunk ==
MKTAG(
'd',
'e',
'c', 0)) {
106 block_size = bytestream2_get_be16(&gb);
128 pkt->duration = 1024;
132#define OFFSET(x) offsetof(HCADemuxContext, x)
135 "Low key used for handling CRI HCA files",
OFFSET(keyl),
138 "High key used for handling CRI HCA files",
OFFSET(keyh),
141 "Subkey used for handling CRI HCA files",
OFFSET(subkey),
157 .p.extensions =
"hca",
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 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 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)
static int read_probe(const AVProbeData *p)
static int read_header(FFV1Context *f, RangeCoder *c)
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
@ AV_OPT_TYPE_INT
Underlying C type is int.
AVStream * avformat_new_stream(AVFormatContext *s, const struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
const char * av_default_item_name(void *ptr)
Return the context name.
#define LIBAVUTIL_VERSION_INT
static int hca_probe(const AVProbeData *p)
static int hca_read_header(AVFormatContext *s)
static int hca_read_packet(AVFormatContext *s, AVPacket *pkt)
static const AVClass hca_class
static const AVOption hca_options[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define MKTAG(a, b, c, d)
int nb_channels
Number of channels in this layout.
Describe the class of an AVClass context structure.
This struct describes the properties of an encoded stream.
int extradata_size
Size of the extradata content in bytes.
AVChannelLayout ch_layout
The channel layout and number of channels.
enum AVMediaType codec_type
General type of the encoded data.
int block_align
The number of bytes per coded audio frame, required by some formats.
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
The number of audio samples per second.
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.