MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / readMVHD

Method readMVHD

src/javajs/util/VideoReader.java:185–201  ·  view source on GitHub ↗
(int len, Map<String, Object> map)

Source from the content-addressed store, hash-verified

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()) {

Callers 1

readBlockMethod · 0.95

Calls 6

readIntMethod · 0.95
readUIntLongMethod · 0.95
readShortMethod · 0.95
dumpMapMethod · 0.95
skipMethod · 0.95
putMethod · 0.45

Tested by

no test coverage detected