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 MVIh_TAG MKTAG('M', 'V', 'I', 'h')
63 #define MVIf_TAG MKTAG('M', 'V', 'I', 'f')
92 for (i = 0; i <
size; i++) {
106 int compression_type = -1, revision = -1, revision2 = -1;
129 "revision (element 0x80) set to 0x%08x\n", revision);
134 "num_channels (element 0x82) set to 0x%08x\n",
140 "compression_type (element 0x83) set to 0x%08x\n",
146 "sample_rate (element 0x84) set to %i\n",
152 "num_samples (element 0x85) set to 0x%08x\n",
157 "element 0x%02x set to 0x%08"PRIx32
"\n",
165 "revision2 (element 0xA0) set to 0x%08x\n",
170 "end of header block reached (within audio subheader)\n");
176 "element 0x%02x set to 0x%08"PRIx32
"\n",
188 "header element 0x%02x set to 0x%08"PRIx32
"\n",
194 switch (compression_type) {
245 "stream type; compression_type=%i",
260 int compression_type;
265 compression_type =
avio_r8(pb);
268 switch (compression_type) {
288 "stream type; audio compression_type=%i",
350 uint32_t blockid,
size = 0;
385 }
else if ((blockid & 0xFFFF) !=
PT00_TAG) {
439 avio_seek(pb, startpos + size, SEEK_SET);
449 unsigned big_endian,
size;
466 big_endian = size > 0x000FFFFF;
469 if (size > 0xfffff || size < 8)
507 "Unsupported number of channels: %d\n", ea->
num_channels);
517 if (ea->
bytes <= 0) {
519 "Invalid number of bytes per sample: %d\n", ea->
bytes);
551 int partial_packet = 0;
552 unsigned int chunk_type, chunk_size;
553 int ret = 0, packet_read = 0, key = 0;
556 while (!packet_read || partial_packet) {
563 switch (chunk_type) {
585 if (partial_packet) {
651 goto get_video_packet;
659 goto get_video_packet;
670 if (partial_packet) {
678 partial_packet = chunk_type ==
MVIh_TAG;
690 if (ret < 0 && partial_packet)