Go to the documentation of this file.
22 #include "config_components.h"
30 #define MAX_FRAME_SIZE 10
32 #define SYNC_WORD 0x6b21
36 #if CONFIG_BIT_DEMUXER
39 int i = 0, j, valid = 0;
45 if (j != 0 && j != 0x10 && j != 0x40 && j != 0x50 && j != 0x76)
95 ret =
avio_read(pb, (uint8_t*)buf, (8 * packet_size) *
sizeof(uint16_t));
98 if(
ret != 8 * packet_size *
sizeof(uint16_t))
105 for(j=0; j < packet_size; j++)
133 "only codec g729 with 1 channel is supported by this format\n");
165 .p.mime_type =
"audio/bit",
166 .p.extensions =
"bit",
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
enum AVMediaType codec_type
General type of the encoded data.
This struct describes the properties of an encoded stream.
#define AVERROR_EOF
End of file.
static void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size)
Initialize the PutBitContext s.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int buf_size
Size of buf except extra allocated bytes.
int nb_channels
Number of channels in this layout.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
void avio_wl16(AVIOContext *s, unsigned int val)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
unsigned int avio_rl16(AVIOContext *s)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_RL16
AVCodecParameters * codecpar
Codec parameters associated with this stream.
static int read_header(FFV1Context *f)
static unsigned int get_bits1(GetBitContext *s)
This structure contains the data a format has to probe a file.
AVChannelLayout ch_layout
Audio only.
int sample_rate
Audio only.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define i(width, name, range_min, range_max)
int block_align
Audio only.
static int write_packet(Muxer *mux, OutputStream *ost, AVPacket *pkt)
static int probe(const AVProbeData *p)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
static void flush_put_bits(PutBitContext *s)
Pad the end of the output stream with zeros.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int64_t pos
byte position in stream, -1 if unknown
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void write_header(FFV1Context *f)
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.