34 #define SCHl_TAG MKTAG('S', 'C', 'H', 'l') 35 #define SEAD_TAG MKTAG('S', 'E', 'A', 'D') 36 #define SNDC_TAG MKTAG('S', 'N', 'D', 'C') 37 #define SEND_TAG MKTAG('S', 'E', 'N', 'D') 38 #define SHEN_TAG MKTAG('S', 'H', 'E', 'N') 39 #define SDEN_TAG MKTAG('S', 'D', 'E', 'N') 40 #define SEEN_TAG MKTAG('S', 'E', 'E', 'N') 41 #define ISNh_TAG MKTAG('1', 'S', 'N', 'h') 42 #define EACS_TAG MKTAG('E', 'A', 'C', 'S') 43 #define ISNd_TAG MKTAG('1', 'S', 'N', 'd') 44 #define ISNe_TAG MKTAG('1', 'S', 'N', 'e') 45 #define PT00_TAG MKTAG('P', 'T', 0x0, 0x0) 46 #define GSTR_TAG MKTAG('G', 'S', 'T', 'R') 47 #define SCDl_TAG MKTAG('S', 'C', 'D', 'l') 48 #define SCEl_TAG MKTAG('S', 'C', 'E', 'l') 49 #define kVGT_TAG MKTAG('k', 'V', 'G', 'T') 50 #define fVGT_TAG MKTAG('f', 'V', 'G', 'T') 51 #define mTCD_TAG MKTAG('m', 'T', 'C', 'D') 52 #define MADk_TAG MKTAG('M', 'A', 'D', 'k') 53 #define MADm_TAG MKTAG('M', 'A', 'D', 'm') 54 #define MADe_TAG MKTAG('M', 'A', 'D', 'e') 55 #define MPCh_TAG MKTAG('M', 'P', 'C', 'h') 56 #define TGQs_TAG MKTAG('T', 'G', 'Q', 's') 57 #define pQGT_TAG MKTAG('p', 'Q', 'G', 'T') 58 #define pIQT_TAG MKTAG('p', 'I', 'Q', 'T') 59 #define MVhd_TAG MKTAG('M', 'V', 'h', 'd') 60 #define MV0K_TAG MKTAG('M', 'V', '0', 'K') 61 #define MV0F_TAG MKTAG('M', 'V', '0', 'F') 62 #define AVhd_TAG MKTAG('A', 'V', 'h', 'd') 63 #define AV0K_TAG MKTAG('A', 'V', '0', 'K') 64 #define AV0F_TAG MKTAG('A', 'V', '0', 'F') 65 #define MVIh_TAG MKTAG('M', 'V', 'I', 'h') 66 #define MVIf_TAG MKTAG('M', 'V', 'I', 'f') 67 #define AVP6_TAG MKTAG('A', 'V', 'P', '6') 102 for (i = 0; i <
size; i++) {
116 int compression_type = -1, revision = -1, revision2 = -1;
139 "revision (element 0x80) set to 0x%08x\n", revision);
144 "num_channels (element 0x82) set to 0x%08x\n",
150 "compression_type (element 0x83) set to 0x%08x\n",
156 "sample_rate (element 0x84) set to %i\n",
162 "num_samples (element 0x85) set to 0x%08x\n",
167 "element 0x%02x set to 0x%08"PRIx32
"\n",
175 "revision2 (element 0xA0) set to 0x%08x\n",
180 "end of header block reached (within audio subheader)\n");
186 "element 0x%02x set to 0x%08"PRIx32
"\n",
198 "header element 0x%02x set to 0x%08"PRIx32
"\n",
204 switch (compression_type) {
256 "stream type; compression_type=%i",
273 int compression_type;
278 compression_type =
avio_r8(pb);
281 switch (compression_type) {
301 "stream type; audio compression_type=%i",
360 uint32_t blockid,
size = 0;
395 }
else if ((blockid & 0xFF) != (
PT00_TAG & 0xFF)) {
398 ea->
platform = (blockid >> 16) & 0xFF;
453 avio_seek(pb, startpos + size, SEEK_SET);
463 unsigned big_endian,
size;
481 big_endian = size > 0x000FFFFF;
484 if (size > 0xfffff || size < 8)
532 "Unsupported number of channels: %d\n", ea->
num_channels);
542 "Invalid number of bytes per sample: %d\n", ea->
bytes);
578 int partial_packet = 0;
580 unsigned int chunk_type, chunk_size;
581 int ret = 0, packet_read = 0,
key = 0;
584 while ((!packet_read && !hit_end) || partial_packet) {
593 switch (chunk_type) {
618 if (partial_packet) {
698 goto get_video_packet;
706 goto get_video_packet;
719 if (partial_packet) {
727 partial_packet = chunk_type ==
MVIh_TAG;
742 if (ret >= 0 && hit_end && !packet_read)
static int process_ea_header(AVFormatContext *s)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static uint32_t read_arbitrary(AVIOContext *pb)
static void process_video_header_cmv(AVFormatContext *s, VideoProperties *video)
#define AV_LOG_WARNING
Something somehow does not look correct.
#define avpriv_request_sample(...)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int index
stream index in AVFormatContext
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
enum AVCodecID audio_codec
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
unsigned int avio_rb32(AVIOContext *s)
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
enum AVStreamParseType need_parsing
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
static int init_video_stream(AVFormatContext *s, VideoProperties *video)
#define AVERROR_EOF
End of file.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
AVCodecID
Identify the syntax and semantics of the bitstream.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int avio_rl32(AVIOContext *s)
static int process_video_header_vp6(AVFormatContext *s, VideoProperties *video)
#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.
preferred ID for decoding MPEG audio layer 1, 2 or 3
enum AVMediaType codec_type
General type of the encoded data.
AVRational avg_frame_rate
Average framerate.
int flags
A combination of AV_PKT_FLAG values.
int avio_r8(AVIOContext *s)
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int block_align
Audio only.
static void process_audio_header_eacs(AVFormatContext *s)
static void process_video_header_mdec(AVFormatContext *s, VideoProperties *video)
static int process_audio_header_elements(AVFormatContext *s)
static int ea_read_header(AVFormatContext *s)
preferred ID for MPEG-1/2 video decoding
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_WB16 unsigned int_TMPL byte
AVIOContext * pb
I/O context.
static const int16_t alpha[]
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Rational number (pair of numerator and denominator).
This structure contains the data a format has to probe a file.
int64_t duration
Decoding: duration of the stream, in stream time base.
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
int sample_rate
Audio only.
unsigned int avio_rl16(AVIOContext *s)
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
static void process_audio_header_sead(AVFormatContext *s)
int64_t nb_frames
number of frames in this stream if known or 0
static int ea_probe(const AVProbeData *p)
A Quick Description Of Rate Distortion Theory We want to encode a video
void * priv_data
Format private data.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int avio_feof(AVIOContext *s)
Similar to feof() but also returns nonzero on read errors.
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
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
AVInputFormat ff_ea_demuxer
AVRational r_frame_rate
Real base framerate of the stream.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
This structure stores compressed data.