50 sscanf(buffer,
"%"SCNd32, &header_size);
60 if (!memcmp(buffer,
"end_head", 8)) {
91 }
else if (!memcmp(buffer,
"channel_count", 13)) {
93 }
else if (!memcmp(buffer,
"sample_byte_format", 18)) {
94 sscanf(buffer,
"%*s %*s %31s",
format);
106 }
else if (!memcmp(buffer,
"sample_coding", 13)) {
107 sscanf(buffer,
"%*s %*s %31s", coding);
108 }
else if (!memcmp(buffer,
"sample_count", 12)) {
109 sscanf(buffer,
"%*s %*s %"SCNd64, &st->
duration);
110 }
else if (!memcmp(buffer,
"sample_n_bytes", 14)) {
111 sscanf(buffer,
"%*s %*s %d", &bps);
112 }
else if (!memcmp(buffer,
"sample_rate", 11)) {
114 }
else if (!memcmp(buffer,
"sample_sig_bits", 15)) {
117 char key[32],
value[32];
118 if (sscanf(buffer,
"%31s %*s %31s", key, value) == 2) {
130 .
name =
"nistsphere",
136 .extensions =
"nist,sph",
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int av_strncasecmp(const char *a, const char *b, size_t n)
Locale-independent case-insensitive compare.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
static int nist_read_header(AVFormatContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int block_align
Audio only.
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
static int nist_probe(AVProbeData *p)
GLsizei GLboolean const GLfloat * value
#define AV_DICT_APPEND
If the entry already exists, append to it.
int ff_get_line(AVIOContext *s, char *buf, int maxlen)
Read a whole line of text from AVIOContext.
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
AVIOContext * pb
I/O context.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
static const char * format
AVInputFormat ff_nistsphere_demuxer
This structure contains the data a format has to probe a file.
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVCodecParameters * codecpar
int avio_feof(AVIOContext *s)
feof() equivalent for AVIOContext.