32 #define SCHl_TAG MKTAG('S', 'C', 'H', 'l')
33 #define SEAD_TAG MKTAG('S', 'E', 'A', 'D')
34 #define SNDC_TAG MKTAG('S', 'N', 'D', 'C')
35 #define SEND_TAG MKTAG('S', 'E', 'N', 'D')
36 #define SHEN_TAG MKTAG('S', 'H', 'E', 'N')
37 #define SDEN_TAG MKTAG('S', 'D', 'E', 'N')
38 #define SEEN_TAG MKTAG('S', 'E', 'E', 'N')
39 #define ISNh_TAG MKTAG('1', 'S', 'N', 'h')
40 #define EACS_TAG MKTAG('E', 'A', 'C', 'S')
41 #define ISNd_TAG MKTAG('1', 'S', 'N', 'd')
42 #define ISNe_TAG MKTAG('1', 'S', 'N', 'e')
43 #define PT00_TAG MKTAG('P', 'T', 0x0, 0x0)
44 #define GSTR_TAG MKTAG('G', 'S', 'T', 'R')
45 #define SCDl_TAG MKTAG('S', 'C', 'D', 'l')
46 #define SCEl_TAG MKTAG('S', 'C', 'E', 'l')
47 #define kVGT_TAG MKTAG('k', 'V', 'G', 'T')
48 #define fVGT_TAG MKTAG('f', 'V', 'G', 'T')
49 #define mTCD_TAG MKTAG('m', 'T', 'C', 'D')
50 #define MADk_TAG MKTAG('M', 'A', 'D', 'k')
51 #define MADm_TAG MKTAG('M', 'A', 'D', 'm')
52 #define MADe_TAG MKTAG('M', 'A', 'D', 'e')
53 #define MPCh_TAG MKTAG('M', 'P', 'C', 'h')
54 #define TGQs_TAG MKTAG('T', 'G', 'Q', 's')
55 #define pQGT_TAG MKTAG('p', 'Q', 'G', 'T')
56 #define pIQT_TAG MKTAG('p', 'I', 'Q', 'T')
57 #define MVhd_TAG MKTAG('M', 'V', 'h', 'd')
58 #define MV0K_TAG MKTAG('M', 'V', '0', 'K')
59 #define MV0F_TAG MKTAG('M', 'V', '0', 'F')
60 #define MVIh_TAG MKTAG('M', 'V', 'I', 'h')
61 #define MVIf_TAG MKTAG('M', 'V', 'I', 'f')
90 for (i = 0; i <
size; i++) {
104 int compression_type = -1, revision = -1, revision2 = -1;
110 while (!
url_feof(pb) && in_header) {
119 while (!
url_feof(pb) && in_subheader) {
127 "revision (element 0x80) set to 0x%08x\n", revision);
132 "num_channels (element 0x82) set to 0x%08x\n",
138 "compression_type (element 0x83) set to 0x%08x\n",
144 "sample_rate (element 0x84) set to %i\n",
150 "num_samples (element 0x85) set to 0x%08x\n",
155 "element 0x%02x set to 0x%08x\n",
163 "revision2 (element 0xA0) set to 0x%08x\n",
168 "end of header block reached (within audio subheader)\n");
174 "element 0x%02x set to 0x%08x\n",
186 "header element 0x%02x set to 0x%08x\n",
192 switch (compression_type) {
243 "stream type; compression_type=%i",
258 int compression_type;
263 compression_type =
avio_r8(pb);
266 switch (compression_type) {
286 "stream type; audio compression_type=%i",
348 uint32_t blockid,
size = 0;
383 }
else if ((blockid & 0xFFFF) !=
PT00_TAG) {
433 avio_seek(pb, startpos + size, SEEK_SET);
443 unsigned big_endian,
size;
460 big_endian = size > 0x000FFFFF;
463 if (size > 0xfffff || size < 8)
501 "Unsupported number of channels: %d\n", ea->
num_channels);
511 if (ea->
bytes <= 0) {
513 "Invalid number of bytes per sample: %d\n", ea->
bytes);
545 int partial_packet = 0;
546 unsigned int chunk_type, chunk_size;
547 int ret = 0, packet_read = 0, key = 0;
550 while (!packet_read || partial_packet) {
557 switch (chunk_type) {
578 if (partial_packet) {
640 goto get_video_packet;
645 goto get_video_packet;
653 if (partial_packet) {
661 partial_packet = chunk_type ==
MVIh_TAG;
673 if (ret < 0 && partial_packet)