22#include "config_components.h"
32#define MAX_FRAME_SIZE 10
34#define SYNC_WORD 0x6b21
41 int i = 0, j, valid = 0;
43 while (2 *
i + 3 < p->buf_size){
47 if (j != 0 && j != 0x10 && j != 0x40 && j != 0x50 && j != 0x76)
97 ret =
ffio_read_size(pb, (uint8_t*)buf, (8 * packet_size) *
sizeof(uint16_t));
105 for(j=0; j < packet_size; j++)
119 .p.extensions =
"bit",
133 "only codec g729 with 1 channel is supported by this format\n");
156 for (
i = 0;
i < 8 *
pkt->size;
i++)
165 .p.mime_type =
"audio/bit",
166 .p.extensions =
"bit",
static int probe(const AVProbeData *p)
void avio_wl16(AVIOContext *s, unsigned int val)
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
unsigned int avio_rl16(AVIOContext *s)
int ffio_read_size(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
#define i(width, name, range_min, range_max)
int(* init)(AVBSFContext *ctx)
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
static int read_header(FFV1Context *f, RangeCoder *c)
bitstream reader API header.
static unsigned int get_bits1(GetBitContext *s)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
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 struct AVCodec *c)
Add a new stream to a media file.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
#define FF_OFMT_FLAG_ONLY_DEFAULT_CODECS
If this flag is set, then the only permitted audio/video/subtitle codec ids are AVOutputFormat....
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
int nb_channels
Number of channels in this layout.
This struct describes the properties of an encoded stream.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
enum AVMediaType codec_type
General type of the encoded data.
int block_align
The number of bytes per coded audio frame, required by some formats.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int sample_rate
The number of audio samples per second.
This structure stores compressed data.
This structure contains the data a format has to probe a file.
AVCodecParameters * codecpar
Codec parameters associated with this stream.