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
49 "Could not parse framerate: %s.\n", cdxl->
framerate);
66 uint32_t current_size, video_size, image_size;
78 if (cdxl->
header[0] != 1) {
88 image_size =
FFALIGN(width, 16) * height * cdxl->
header[19] / 8;
89 video_size = palette_size + image_size;
91 if (palette_size > 512)
105 if (cdxl->
header[1] & 0x10) {
165 #define OFFSET(x) offsetof(CDXLDemuxContext, x)
185 .extensions =
"cdxl,xl",
187 .priv_class = &cdxl_demuxer_class,
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
void av_free_packet(AVPacket *pkt)
Free a packet.
int64_t pos
byte position in stream, -1 if unknown
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
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
Flags signalling stream properties.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define AVERROR_EOF
End of file.
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.
uint8_t header[CDXL_HEADER_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)
Describe the class of an AVClass context structure.
rational number numerator/denominator
#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 stream time base.
int eof_reached
true if eof reached
int channels
number of audio channels
av_default_item_name
Return the context name.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.