59 int bom, major, minor, codec, chunk;
60 int64_t pos, h1offset, toffset;
73 if (bom != 0xFEFF && bom != 0xFFFE) {
193 case MKTAG(
'A',
'D',
'P',
'C'):
215 case MKTAG(
'D',
'A',
'T',
'A'):
223 if (major != 1 || minor)
244 uint32_t samples,
size;
252 samples = size / (8 * codec->
channels) * 14;
266 bytestream_put_be32(&dst, size);
267 bytestream_put_be32(&dst, samples);
296 .extensions =
"brstm",
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void av_free_packet(AVPacket *pkt)
Free a packet.
#define AV_LOG_WARNING
Something somehow does not look correct.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rb16(AVIOContext *s)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
unsigned int avio_rb32(AVIOContext *s)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
static int probe(AVProbeData *p)
AVStream ** streams
A list of all streams in the file.
uint32_t samples_per_block
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint32_t last_block_used_bytes
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 avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
main external API structure.
This structure contains the data a format has to probe a file.
AVInputFormat ff_brstm_demuxer
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...
static int read_header(AVFormatContext *s)
static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
int channels
number of audio channels
void * priv_data
Format private data.
static int read_packet(AVFormatContext *s, AVPacket *pkt)
static int read_close(AVFormatContext *s)
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.
#define MKTAG(a, b, c, d)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...