26 #define CHUNK_SIZE 512
27 #define RIFF_TAG MKTAG('R','I','F','F')
28 #define WAVE_TAG MKTAG('W','A','V','E')
56 for(i=264; i<512; i++)
202 .long_name =
"ACT Voice file format",
AVInputFormat ff_act_demuxer
static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
uint8_t audio_buffer[22]
temporary buffer for ACT frame
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
bitstream reader API header.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
static int probe(AVProbeData *p)
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
static const uint8_t frame_size[4]
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.
void * priv_data
Format private data.
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
int buf_size
Size of buf except extra allocated bytes.
int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const
Rescale a 64-bit integer with rounding to nearest.
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
int frame_size
Number of samples per channel in an audio frame.
int sample_rate
samples per second
AVIOContext * pb
I/O context.
This structure contains the data a format has to probe a file.
static int read_header(AVFormatContext *s)
int64_t duration
Decoding: duration of the stream, in stream time base.
#define AVERROR_INVALIDDATA
int channels
number of audio channels
char second_packet
1 - if temporary buffer contains valid (second) G.729 packet
This structure stores compressed data.