• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.coremedia.iso.boxes.sampleentry;
2 
3 import com.coremedia.iso.BoxParser;
4 import com.coremedia.iso.boxes.Box;
5 import com.coremedia.iso.boxes.ContainerBox;
6 
7 import java.nio.ByteBuffer;
8 import java.util.Arrays;
9 
10 public class MpegSampleEntry extends SampleEntry implements ContainerBox {
11 
12     private BoxParser boxParser;
13 
MpegSampleEntry(String type)14     public MpegSampleEntry(String type) {
15         super(type);
16     }
17 
18     @Override
_parseDetails(ByteBuffer content)19     public void _parseDetails(ByteBuffer content) {
20         _parseReservedAndDataReferenceIndex(content);
21         _parseChildBoxes(content);
22 
23     }
24 
25     @Override
getContentSize()26     protected long getContentSize() {
27         long contentSize = 8;
28         for (Box boxe : boxes) {
29             contentSize += boxe.getSize();
30         }
31         return contentSize;
32     }
33 
toString()34     public String toString() {
35         return "MpegSampleEntry" + Arrays.asList(getBoxes());
36     }
37 
38     @Override
getContent(ByteBuffer byteBuffer)39     protected void getContent(ByteBuffer byteBuffer) {
40         _writeReservedAndDataReferenceIndex(byteBuffer);
41         _writeChildBoxes(byteBuffer);
42     }
43 }
44