26 #define MAX_FRAME_SIZE 10
28 #define SYNC_WORD 0x6b21
39 for(i=0; i+3<p->
buf_size && i< 10*0x50; ){
43 if(j!=0x40 && j!=0x50)
90 if(ret != 8 * packet_size *
sizeof(uint16_t))
97 for(j=0; j < packet_size; j++)
140 for(i=0; i< 8 * 10; i++)
149 .mime_type =
"audio/bit",
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
int64_t pos
byte position in stream, -1 if unknown
AVCodecContext * codec
Codec context associated with this stream.
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
AVInputFormat ff_bit_demuxer
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
bitstream reader API header.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int probe(AVProbeData *p)
int buf_size
Size of buf except extra allocated bytes.
enum AVMediaType codec_type
int sample_rate
samples per second
main external API structure.
AVIOContext * pb
I/O context.
static unsigned int get_bits1(GetBitContext *s)
static int read_header(AVFormatContext *s)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
This structure contains the data a format has to probe a file.
static int read_packet(AVFormatContext *s, AVPacket *pkt)
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
#define AVERROR_INVALIDDATA
int channels
number of audio channels
static void write_header(FFV1Context *f)
This structure stores compressed data.
static int write_packet(AVFormatContext *s1, AVPacket *pkt)