com.coremedia.iso.boxes.sampleentry
Class TextSampleEntry

java.lang.Object
  extended by com.coremedia.iso.boxes.AbstractBox
      extended by com.coremedia.iso.boxes.sampleentry.SampleEntry
          extended by com.coremedia.iso.boxes.sampleentry.TextSampleEntry
All Implemented Interfaces:
Box, ContainerBox

public class TextSampleEntry
extends SampleEntry

Entry type for timed text samples defined in the timed text specification (ISO/IEC 14496-17).


Nested Class Summary
static class TextSampleEntry.BoxRecord
           
static class TextSampleEntry.StyleRecord
           
 
Field Summary
static String TYPE_ENCRYPTED
           
static String TYPE1
           
 
Fields inherited from class com.coremedia.iso.boxes.sampleentry.SampleEntry
boxes
 
Fields inherited from class com.coremedia.iso.boxes.AbstractBox
deadBytes, type
 
Constructor Summary
TextSampleEntry(String type)
           
 
Method Summary
 void _parseDetails(ByteBuffer content)
          Implement the actual parsing of the box's fields here.
 int[] getBackgroundColorRgba()
           
 TextSampleEntry.BoxRecord getBoxRecord()
           
protected  void getContent(ByteBuffer bb)
          Writes the box's content into the given ByteBuffer.
protected  long getContentSize()
          Gets the box's content size.
 int getHorizontalJustification()
           
 TextSampleEntry.StyleRecord getStyleRecord()
           
 int getVerticalJustification()
           
 boolean isContinuousKaraoke()
           
 boolean isFillTextRegion()
           
 boolean isScrollDirection()
           
 boolean isScrollIn()
           
 boolean isScrollOut()
           
 boolean isWriteTextVertically()
           
 void setBackgroundColorRgba(int[] backgroundColorRgba)
           
 void setBoxRecord(TextSampleEntry.BoxRecord boxRecord)
           
 void setContinuousKaraoke(boolean continuousKaraoke)
           
 void setFillTextRegion(boolean fillTextRegion)
           
 void setHorizontalJustification(int horizontalJustification)
           
 void setScrollDirection(boolean scrollOutIn)
           
 void setScrollIn(boolean scrollIn)
           
 void setScrollOut(boolean scrollOutIn)
           
 void setStyleRecord(TextSampleEntry.StyleRecord styleRecord)
           
 void setVerticalJustification(int verticalJustification)
           
 void setWriteTextVertically(boolean writeTextVertically)
           
 String toString()
           
 
Methods inherited from class com.coremedia.iso.boxes.sampleentry.SampleEntry
_parseChildBoxes, _parseReservedAndDataReferenceIndex, _writeChildBoxes, _writeReservedAndDataReferenceIndex, addBox, getBoxes, getBoxes, getBoxes, getDataReferenceIndex, getNumOfBytesToFirstChild, parse, removeBox, setBoxes, setDataReferenceIndex, setType
 
Methods inherited from class com.coremedia.iso.boxes.AbstractBox
getBox, getDeadBytes, getHeader, getIsoFile, getParent, getSize, getType, getUserType, isParsed, parseDetails, setDeadBytes, setParent, setUserType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.coremedia.iso.boxes.ContainerBox
getIsoFile, getParent
 
Methods inherited from interface com.coremedia.iso.boxes.Box
getBox, getSize, getType, setParent
 

Field Detail

TYPE1

public static final String TYPE1
See Also:
Constant Field Values

TYPE_ENCRYPTED

public static final String TYPE_ENCRYPTED
See Also:
Constant Field Values
Constructor Detail

TextSampleEntry

public TextSampleEntry(String type)
Method Detail

_parseDetails

public void _parseDetails(ByteBuffer content)
Description copied from class: AbstractBox
Implement the actual parsing of the box's fields here. External classes will always call AbstractBox.parseDetails() which encapsulates the call to this method with some safeguards.

Specified by:
_parseDetails in class AbstractBox

getContentSize

protected long getContentSize()
Description copied from class: AbstractBox
Gets the box's content size. This excludes all header fields:

Flags and version of a full box need to be taken into account.

Specified by:
getContentSize in class AbstractBox
Returns:
Gets the box's content size in bytes

toString

public String toString()
Overrides:
toString in class Object

getContent

protected void getContent(ByteBuffer bb)
                   throws IOException
Description copied from class: AbstractBox
Writes the box's content into the given ByteBuffer. This must include flags and version in case of a full box. bb has been initialized with getSize() bytes.

Specified by:
getContent in class AbstractBox
Parameters:
bb - the box's content-sink.
Throws:
IOException - in case of an exception in the underlying OutputStream.

getBoxRecord

public TextSampleEntry.BoxRecord getBoxRecord()

setBoxRecord

public void setBoxRecord(TextSampleEntry.BoxRecord boxRecord)

getStyleRecord

public TextSampleEntry.StyleRecord getStyleRecord()

setStyleRecord

public void setStyleRecord(TextSampleEntry.StyleRecord styleRecord)

isScrollIn

public boolean isScrollIn()

setScrollIn

public void setScrollIn(boolean scrollIn)

isScrollOut

public boolean isScrollOut()

setScrollOut

public void setScrollOut(boolean scrollOutIn)

isScrollDirection

public boolean isScrollDirection()

setScrollDirection

public void setScrollDirection(boolean scrollOutIn)

isContinuousKaraoke

public boolean isContinuousKaraoke()

setContinuousKaraoke

public void setContinuousKaraoke(boolean continuousKaraoke)

isWriteTextVertically

public boolean isWriteTextVertically()

setWriteTextVertically

public void setWriteTextVertically(boolean writeTextVertically)

isFillTextRegion

public boolean isFillTextRegion()

setFillTextRegion

public void setFillTextRegion(boolean fillTextRegion)

getHorizontalJustification

public int getHorizontalJustification()

setHorizontalJustification

public void setHorizontalJustification(int horizontalJustification)

getVerticalJustification

public int getVerticalJustification()

setVerticalJustification

public void setVerticalJustification(int verticalJustification)

getBackgroundColorRgba

public int[] getBackgroundColorRgba()

setBackgroundColorRgba

public void setBackgroundColorRgba(int[] backgroundColorRgba)


Copyright © 2012. All Rights Reserved.