| 183 | } |
| 184 | |
| 185 | protected int readMVHD(int len, Map<String, Object> map) throws IOException { |
| 186 | map.put("version_flags", readInt()); |
| 187 | map.put("creationTime", readUIntLong()); |
| 188 | map.put("modificationTime", readUIntLong()); |
| 189 | timeScale = readInt(); |
| 190 | int dur = readInt(); |
| 191 | map.put("timeScale", timeScale); |
| 192 | map.put("duration", dur); |
| 193 | map.put("_duration(sec)", 1.0 * dur / timeScale); |
| 194 | float rate = readInt(); |
| 195 | map.put("preferredRate", rate); // this is bogus typically byte[]{0,1,0,0} |
| 196 | map.put("preferredVolume", readShort()); |
| 197 | if (verbose) |
| 198 | dumpMap(map, "mvhd"); |
| 199 | skip(len - 26); |
| 200 | return 0; |
| 201 | } |
| 202 | |
| 203 | private void dumpMap(Map<String, Object> map, String name) { |
| 204 | for (Entry<String, Object> e : map.entrySet()) { |