entagged.audioformats.asf.data
Class FileHeader

java.lang.Object
  extended by entagged.audioformats.asf.data.Chunk
      extended by entagged.audioformats.asf.data.FileHeader

public class FileHeader
extends Chunk

This class stores the information about the file, which is contained within a special chunk of asf files.

Author:
Christian Laireiter

Field Summary
 
Fields inherited from class entagged.audioformats.asf.data.Chunk
chunkLength, guid, position
 
Constructor Summary
FileHeader(long fileHeaderStart, BigInteger chunckLen, BigInteger size, BigInteger fileTime, BigInteger pkgCount, BigInteger dur, BigInteger timestampStart, BigInteger timestampEnd, long headerFlags, long minPkgSize, long maxPkgSize, long uncmpVideoFrameSize)
          Creates an instance.
 
Method Summary
 BigInteger getDuration()
           
 int getDurationInSeconds()
          This method converts getDuration()from 100ns steps to normal seconds.
 Date getFileCreationTime()
           
 BigInteger getFileSize()
           
 long getFlags()
           
 long getMaxPackageSize()
           
 long getMinPackageSize()
           
 BigInteger getPackageCount()
           
 float getPreciseDuration()
          This method converts getDuration() from 100ns steps to normal seconds with a fractional part taking milliseconds.
 BigInteger getTimeEndPos()
           
 BigInteger getTimeStartPos()
           
 long getUncompressedFrameSize()
           
 String prettyPrint()
          (overridden)
 
Methods inherited from class entagged.audioformats.asf.data.Chunk
getChunckEnd, getChunkLength, getGuid, getPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileHeader

public FileHeader(long fileHeaderStart,
                  BigInteger chunckLen,
                  BigInteger size,
                  BigInteger fileTime,
                  BigInteger pkgCount,
                  BigInteger dur,
                  BigInteger timestampStart,
                  BigInteger timestampEnd,
                  long headerFlags,
                  long minPkgSize,
                  long maxPkgSize,
                  long uncmpVideoFrameSize)
Creates an instance.

Parameters:
fileHeaderStart - Position in file or stream, where the file header starts.
chunckLen - Length of the file header (chunk)
size - Size of file or stream
fileTime - Time file or stream was created. Time is calculated since 1st january of 1601 in 100ns steps.
pkgCount - Number of stream packages.
dur - Duration of media clip in 100ns steps
timestampStart - Timestamp of start timeStartPos
timestampEnd - Timestamp of end timeEndPos
headerFlags - some stream related flags.
minPkgSize - minimun size of packages
maxPkgSize - maximum size of packages
uncmpVideoFrameSize - Size of an uncompressed Video Frame.
Method Detail

getDuration

public BigInteger getDuration()
Returns:
Returns the duration.

getDurationInSeconds

public int getDurationInSeconds()
This method converts getDuration()from 100ns steps to normal seconds.

Returns:
Duration of the media in seconds.

getFileCreationTime

public Date getFileCreationTime()
Returns:
Returns the fileCreationTime.

getFileSize

public BigInteger getFileSize()
Returns:
Returns the fileSize.

getFlags

public long getFlags()
Returns:
Returns the flags.

getMaxPackageSize

public long getMaxPackageSize()
Returns:
Returns the maxPackageSize.

getMinPackageSize

public long getMinPackageSize()
Returns:
Returns the minPackageSize.

getPackageCount

public BigInteger getPackageCount()
Returns:
Returns the packageCount.

getPreciseDuration

public float getPreciseDuration()
This method converts getDuration() from 100ns steps to normal seconds with a fractional part taking milliseconds.

Returns:
The duraion of the media in seconds (with a precision of milliseconds)

getTimeEndPos

public BigInteger getTimeEndPos()
Returns:
Returns the timeEndPos.

getTimeStartPos

public BigInteger getTimeStartPos()
Returns:
Returns the timeStartPos.

getUncompressedFrameSize

public long getUncompressedFrameSize()
Returns:
Returns the uncompressedFrameSize.

prettyPrint

public String prettyPrint()
(overridden)

Overrides:
prettyPrint in class Chunk
Returns:
Information of current Chunk Object.
See Also:
Chunk.prettyPrint()


Copyright © 2007-2008. All Rights Reserved.