43 if (b[0] == 0x04 && (b[1] == 0x00 || b[1] == 0x04 || b[1] == 0x0C))
52 unsigned int sample_rate, header;
57 case 0x0400: cdata->
channels = 1;
break;
58 case 0x0404: cdata->
channels = 2;
break;
59 case 0x040C: cdata->
channels = 4;
break;
85 int packet_size = 76*cdata->
channels;
101 .extensions =
"cdata",
static int cdata_read_packet(AVFormatContext *s, AVPacket *pkt)
unsigned int avio_rb16(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
AVCodecContext * codec
Codec context associated with this stream.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
AVInputFormat ff_ea_cdata_demuxer
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
This structure contains the data a format has to probe a file.
#define AVPROBE_SCORE_MAX
int channels
number of audio channels
void * priv_data
Format private data.
static int cdata_probe(AVProbeData *p)
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
static int cdata_read_header(AVFormatContext *s)