34 if (
s->nb_streams != 1) {
38 par =
s->streams[0]->codecpar;
109 return ret < 0 ? ret :
AVERROR(EIO);
124 #if CONFIG_ILBC_MUXER
128 .mime_type =
"audio/iLBC",
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int ilbc_write_header(AVFormatContext *s)
static const char mode20_header[]
static int ilbc_read_header(AVFormatContext *s)
static int ilbc_probe(const AVProbeData *p)
static const char mode30_header[]
AVInputFormat ff_ilbc_demuxer
static int ilbc_read_packet(AVFormatContext *s, AVPacket *pkt)
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const uint8_t header[24]
This struct describes the properties of an encoded stream.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
enum AVMediaType codec_type
General type of the encoded data.
int block_align
Audio only.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
Audio only.
This structure stores compressed data.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int64_t pos
byte position in stream, -1 if unknown
This structure contains the data a format has to probe a file.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.