diff options
Diffstat (limited to 'isoparser/src/main/java/com/coremedia/iso/boxes/sampleentry/.svn/text-base/SubtitleSampleEntry.java.svn-base')
-rw-r--r-- | isoparser/src/main/java/com/coremedia/iso/boxes/sampleentry/.svn/text-base/SubtitleSampleEntry.java.svn-base | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/isoparser/src/main/java/com/coremedia/iso/boxes/sampleentry/.svn/text-base/SubtitleSampleEntry.java.svn-base b/isoparser/src/main/java/com/coremedia/iso/boxes/sampleentry/.svn/text-base/SubtitleSampleEntry.java.svn-base new file mode 100644 index 0000000..21d0cc4 --- /dev/null +++ b/isoparser/src/main/java/com/coremedia/iso/boxes/sampleentry/.svn/text-base/SubtitleSampleEntry.java.svn-base @@ -0,0 +1,76 @@ +package com.coremedia.iso.boxes.sampleentry; + +import com.coremedia.iso.IsoTypeReader; +import com.coremedia.iso.IsoTypeWriter; + +import java.nio.ByteBuffer; + +/** + * Created by IntelliJ IDEA. + * User: magnus + * Date: 2012-03-08 + * Time: 11:36 + * To change this template use File | Settings | File Templates. + */ +public class SubtitleSampleEntry extends SampleEntry { + + public static final String TYPE1 = "stpp"; + + public static final String TYPE_ENCRYPTED = ""; // This is not known! + + private String namespace; + private String schemaLocation; + private String imageMimeType; + + public SubtitleSampleEntry(String type) { + super(type); + } + + @Override + protected long getContentSize() { + long contentSize = 8 + namespace.length() + schemaLocation.length() + imageMimeType.length() + 3; + return contentSize; + } + + @Override + public void _parseDetails(ByteBuffer content) { + _parseReservedAndDataReferenceIndex(content); + namespace = IsoTypeReader.readString(content); + schemaLocation = IsoTypeReader.readString(content); + imageMimeType = IsoTypeReader.readString(content); + _parseChildBoxes(content); + } + + @Override + protected void getContent(ByteBuffer byteBuffer) { + _writeReservedAndDataReferenceIndex(byteBuffer); + IsoTypeWriter.writeUtf8String(byteBuffer, namespace); + IsoTypeWriter.writeUtf8String(byteBuffer, schemaLocation); + IsoTypeWriter.writeUtf8String(byteBuffer, imageMimeType); + } + + public String getNamespace() { + return namespace; + } + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + public String getSchemaLocation() { + return schemaLocation; + } + + public void setSchemaLocation(String schemaLocation) { + this.schemaLocation = schemaLocation; + } + + public String getImageMimeType() { + return imageMimeType; + } + + public void setImageMimeType(String imageMimeType) { + this.imageMimeType = imageMimeType; + } +} + |