blob: 56b8adb456c024901782bdd86384c517a4e075e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
package com.coremedia.iso.boxes.sampleentry;
import com.coremedia.iso.IsoTypeWriter;
import com.coremedia.iso.boxes.Box;
import java.nio.ByteBuffer;
public class Ovc1VisualSampleEntryImpl extends SampleEntry {
private byte[] vc1Content;
public static final String TYPE = "ovc1";
@Override
protected long getContentSize() {
long size = 8;
for (Box box : boxes) {
size += box.getSize();
}
size += vc1Content.length;
return size;
}
@Override
public void _parseDetails(ByteBuffer content) {
_parseReservedAndDataReferenceIndex(content);
vc1Content = new byte[content.remaining()];
content.get(vc1Content);
}
@Override
protected void getContent(ByteBuffer byteBuffer) {
byteBuffer.put(new byte[6]);
IsoTypeWriter.writeUInt16(byteBuffer, getDataReferenceIndex());
byteBuffer.put(vc1Content);
}
protected Ovc1VisualSampleEntryImpl() {
super(TYPE);
}
}
|