org.jcodec.containers.mkv.elements
Class BlockElement

java.lang.Object
  extended by org.jcodec.containers.mkv.ebml.Element
      extended by org.jcodec.containers.mkv.ebml.BinaryElement
          extended by org.jcodec.containers.mkv.elements.BlockElement

public class BlockElement
extends BinaryElement


Field Summary
 long absoluteTimecode
           
 boolean discardable
           
 long[] frameOffsets
           
 long[] frameSizes
           
 int headerSize
           
 boolean keyFrame
           
 String lacing
           
 boolean lacingPresent
           
 int timecode
           
 long trackNumber
           
 
Fields inherited from class org.jcodec.containers.mkv.ebml.Element
data, dataOffset, dataRead, id, offset, parent, size, type
 
Constructor Summary
BlockElement(byte[] type)
           
 
Method Summary
static long[] calcEbmlLacingDiffs(long[] laceSizes)
           
static BlockElement copy(BlockElement old)
           
 long getDataSize()
           
 byte[][] getFrames(FileChannel source)
           
 long getSize()
          Get the total size of this element
static BlockElement keyFrame(long trackNumber, int timecode, byte[] frame)
           
 ByteBuffer mux()
           
static byte[] muxEbmlLacing(long[] laceSizes)
           
static byte[] muxXiphLacing(long[] laceSizes)
           
 void readData(FileChannel source)
          Read the element data
static int readEBMLLaceSizes(ByteBuffer source, long[] sizes, int size, int preLacingHeaderSize)
           
 void readFrames(FileChannel source)
           
static int readXiphLaceSizes(ByteBuffer bb, long[] sizes, int size, int preLacingHeaderSize)
           
 void seekAndReadContent(FileChannel source)
           
 String toString()
           
 
Methods inherited from class org.jcodec.containers.mkv.ebml.BinaryElement
getData, setData
 
Methods inherited from class org.jcodec.containers.mkv.ebml.Element
ebmlBytes, ebmlBytes, getEbmlSize, getId, isSameEbmlId, isSameMatroskaType, mux, setParent, skipData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

frameOffsets

public long[] frameOffsets

frameSizes

public long[] frameSizes

trackNumber

public long trackNumber

timecode

public int timecode

absoluteTimecode

public long absoluteTimecode

keyFrame

public boolean keyFrame

headerSize

public int headerSize

lacing

public String lacing

discardable

public boolean discardable

lacingPresent

public boolean lacingPresent
Constructor Detail

BlockElement

public BlockElement(byte[] type)
Method Detail

copy

public static BlockElement copy(BlockElement old)

keyFrame

public static BlockElement keyFrame(long trackNumber,
                                    int timecode,
                                    byte[] frame)

readData

public void readData(FileChannel source)
              throws IOException
Description copied from class: Element
Read the element data

Overrides:
readData in class Element
Throws:
IOException

readXiphLaceSizes

public static int readXiphLaceSizes(ByteBuffer bb,
                                    long[] sizes,
                                    int size,
                                    int preLacingHeaderSize)

readEBMLLaceSizes

public static int readEBMLLaceSizes(ByteBuffer source,
                                    long[] sizes,
                                    int size,
                                    int preLacingHeaderSize)

toString

public String toString()
Overrides:
toString in class Object

getFrames

public byte[][] getFrames(FileChannel source)
                   throws IOException
Throws:
IOException

readFrames

public void readFrames(FileChannel source)
                throws IOException
Throws:
IOException

mux

public ByteBuffer mux()
Overrides:
mux in class Element

seekAndReadContent

public void seekAndReadContent(FileChannel source)
                        throws IOException
Throws:
IOException

getSize

public long getSize()
Get the total size of this element

Overrides:
getSize in class Element

getDataSize

public long getDataSize()

calcEbmlLacingDiffs

public static long[] calcEbmlLacingDiffs(long[] laceSizes)

muxEbmlLacing

public static byte[] muxEbmlLacing(long[] laceSizes)

muxXiphLacing

public static byte[] muxXiphLacing(long[] laceSizes)


Copyright © 2013. All Rights Reserved.