22 #include "libavutil/intreadwrite.h"
27 #define DXA_EXTRA_SIZE 9
46 if (p->
buf[0] ==
'D' && p->
buf[1] ==
'E' &&
47 p->
buf[2] ==
'X' && p->
buf[3] ==
'A' &&
48 w && w <= 2048 && h && h <= 2048)
67 if (tag !=
MKTAG(
'D',
'E',
'X',
'A'))
116 if(tag ==
MKTAG(
'd',
'a',
't',
'a'))
break;
132 av_reduce(&den, &num, den, num, (1UL<<31)-1);
174 case MKTAG(
'N',
'U',
'L',
'L'):
178 if(pal_size) memcpy(pkt->
data, pal, pal_size);
179 memcpy(pkt->
data + pal_size, buf, 4);
184 case MKTAG(
'C',
'M',
'A',
'P'):
189 case MKTAG(
'F',
'R',
'A',
'M'):
204 if(pal_size) memcpy(pkt->
data, pal, pal_size);
void av_free_packet(AVPacket *pkt)
Free a packet.
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void * priv_data
Format private data.
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
int buf_size
Size of buf except extra allocated bytes.
#define AV_TIME_BASE
Internal time base represented as integer.
int width
picture width / height.
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
#define MKTAG(a, b, c, d)
This structure contains the data a format has to probe a file.
int64_t start_time
Decoding: position of the first frame of the component, in AV_TIME_BASE fractional seconds...
#define AVERROR_INVALIDDATA
int64_t duration
Decoding: duration of the stream, in AV_TIME_BASE fractional seconds.
This structure stores compressed data.