62 printf(
"channels=%d bps=%d bit_rate=%"PRId64
" rejected\n",
73 memset(
pkt->data, 0,
pkt->size);
74 pkt->stream_index = 0;
103 printf(
"channels=%d bps=%d bit_rate=%"PRId64
" tag=%02x %02x %02x %02x "
104 "read_bps=%d read_bit_rate=%"PRId64
" duration=%"PRId64
"\n",
105 channels,
bps, bit_rate, buf[12], buf[13], buf[14], buf[15],
125 static const int cases[][3] = {
static int run_case(int channels, int bps, int64_t bit_rate)
int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
Return the written size and a pointer to the buffer.
int avio_open_dyn_buf(AVIOContext **s)
Open a write only memory stream.
void ffio_init_read_context(FFIOContext *s, const uint8_t *buffer, int buffer_size)
Wrap a buffer in an AVIOContext for reading.
#define i(width, name, range_min, range_max)
__device__ int printf(const char *,...)
@ AV_CODEC_ID_ADPCM_G726LE
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
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.
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
void avformat_free_context(AVFormatContext *s)
Free an AVFormatContext and all its streams.
const AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format.
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
av_warn_unused_result int avformat_write_header(AVFormatContext *s, AVDictionary **options)
Allocate the stream private data and write the stream header to an output media file.
int av_write_trailer(AVFormatContext *s)
Write the stream trailer to an output media file and free the file private data.
int av_write_frame(AVFormatContext *s, AVPacket *pkt)
Write a packet to an output media file.
void av_channel_layout_default(AVChannelLayout *ch_layout, int nb_channels)
Get the default channel layout for a given number of channels.
Memory handling functions.
#define FF_ARRAY_ELEMS(a)
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVChannelLayout ch_layout
The channel layout and number of channels.
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.
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.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int64_t duration
Decoding: duration of the stream, in stream time base.