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