com.coremedia.iso.boxes.sampleentry
Class TextSampleEntry

java.lang.Object
  extended by com.googlecode.mp4parser.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.googlecode.mp4parser.AbstractBox
type
 
Constructor Summary
TextSampleEntry(String type)
           
 
Method Summary
 void _parseDetails(ByteBuffer content)
          Parse the box's fields and child boxes if any.
 int[] getBackgroundColorRgba()
           
 TextSampleEntry.BoxRecord getBoxRecord()
           
protected  void getContent(ByteBuffer byteBuffer)
          Write the box's content into the given ByteBuffer.
protected  long getContentSize()
          Get the box's content size without its header.
 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.googlecode.mp4parser.AbstractBox
getBox, getIsoFile, getParent, getSize, getType, getUserType, isParsed, setDeadBytes, setParent
 
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
Parse the box's fields and child boxes if any.

Specified by:
_parseDetails in class AbstractBox
Parameters:
content - the box's raw content beginning after the 4-cc field.

getContentSize

protected long getContentSize()
Description copied from class: AbstractBox
Get the box's content size without its header. This must be the exact number of bytes that getContent(ByteBuffer) writes.

Specified by:
getContentSize in class AbstractBox
Returns:
Gets the box's content size in bytes
See Also:
AbstractBox.getContent(java.nio.ByteBuffer)

toString

public String toString()
Overrides:
toString in class Object

getContent

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

Specified by:
getContent in class AbstractBox
Parameters:
byteBuffer - the sink for the box's content

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.