22 #include "libavutil/channel_layout.h"
23 #include "libavutil/intreadwrite.h"
24 #include "libavutil/parseutils.h"
25 #include "libavutil/opt.h"
29 #define CDXL_HEADER_SIZE 32
62 if (p->
buf[18] || !p->
buf[19])
91 "Could not parse framerate: %s.\n", cdxl->
framerate);
108 uint32_t current_size,
video_size, image_size;
120 if (cdxl->
header[0] != 1) {
130 image_size =
FFALIGN(width, 16) * height * cdxl->
header[19] / 8;
131 video_size = palette_size + image_size;
133 if (palette_size > 512)
147 if (cdxl->
header[1] & 0x10) {
207 #define OFFSET(x) offsetof(CDXLDemuxContext, x)
228 .extensions =
"cdxl,xl",
230 .priv_class = &cdxl_demuxer_class,
void av_free_packet(AVPacket *pkt)
Free a packet.
#define LIBAVUTIL_VERSION_INT
int64_t pos
byte position in stream, -1 if unknown
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
static int64_t audio_size
AVCodecContext * codec
Codec context associated with this stream.
int index
stream index in AVFormatContext
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...
#define AV_CH_LAYOUT_STEREO
int ctx_flags
Format-specific flags, see AVFMTCTX_xx.
const char * av_default_item_name(void *ctx)
Return the context name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
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 duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
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.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int av_parse_video_rate(AVRational *rate, const char *str)
Parse str and store the detected values in *rate.
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
int buf_size
Size of buf except extra allocated bytes.
uint8_t header[CDXL_HEADER_SIZE]
static int64_t video_size
int width
picture width / height.
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
BYTE int const BYTE int int int height
Describe the class of an AVClass context structure.
rational number numerator/denominator
This structure contains the data a format has to probe a file.
#define AV_OPT_FLAG_DECODING_PARAM
a generic parameter which can be set by the user for demuxing or decoding
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
#define AVERROR_INVALIDDATA
int channels
number of audio channels
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.