org.xnap.plugin.viewer.videoinfo
Class VideoFile
java.lang.Object
java.io.File
org.xnap.plugin.viewer.videoinfo.VideoFile
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<java.io.File>
public class VideoFile
- extends java.io.File
Class to extract a video's play length and resolution.
The video parsing code for avi and mpeg files is taken from the ziga
project. See README for more information.
The video parsing code for asf files is taken from the avifile project
(http://avifile.sourceforge.net/).
- See Also:
- Serialized Form
Fields inherited from class java.io.File |
pathSeparator, pathSeparatorChar, separator, separatorChar |
Constructor Summary |
VideoFile(java.io.File f)
|
Methods inherited from class java.io.File |
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
PACK_START_CODE
protected static final int PACK_START_CODE
- See Also:
- Constant Field Values
SEQ_START_CODE
protected static final int SEQ_START_CODE
- See Also:
- Constant Field Values
GROUP_START_CODE
protected static final int GROUP_START_CODE
- See Also:
- Constant Field Values
MAX_FORWARD_READ_LENGTH
protected static final int MAX_FORWARD_READ_LENGTH
- See Also:
- Constant Field Values
MAX_BACKWARD_READ_LENGTH
protected static final int MAX_BACKWARD_READ_LENGTH
- See Also:
- Constant Field Values
ASF_FILE_PROPERTIES_SIZE
protected static final int ASF_FILE_PROPERTIES_SIZE
- See Also:
- Constant Field Values
ASF_STREAM_PROPERTIES_SIZE
protected static final int ASF_STREAM_PROPERTIES_SIZE
- See Also:
- Constant Field Values
GUID_SIZE
protected static final int GUID_SIZE
- See Also:
- Constant Field Values
ASF_HEADER_GUID
protected final transient VideoFile.GUID ASF_HEADER_GUID
ASF_FILE_PROPERTIES_GUID
protected final transient VideoFile.GUID ASF_FILE_PROPERTIES_GUID
ASF_STREAM_PROPERTIES_GUID
protected final transient VideoFile.GUID ASF_STREAM_PROPERTIES_GUID
ASF_AUDIO_MEDIA_GUID
protected final transient VideoFile.GUID ASF_AUDIO_MEDIA_GUID
ASF_CODEC_LIST_GUID
protected final transient VideoFile.GUID ASF_CODEC_LIST_GUID
VideoFile
public VideoFile(java.io.File f)
parse
public boolean parse()
getHeight
public int getHeight()
getInfo
public java.lang.String getInfo()
getLength
public int getLength()
getWidth
public int getWidth()
lookForAVI
protected boolean lookForAVI()
throws java.io.IOException
- Throws:
java.io.IOException
lookForASF
protected boolean lookForASF()
throws java.io.IOException
- Throws:
java.io.IOException
lookForMPEG
protected boolean lookForMPEG()
throws java.io.IOException
- Throws:
java.io.IOException
readChunk
protected final java.lang.String readChunk()
throws java.io.IOException
- Throws:
java.io.IOException
readBigEndianShort
protected final short readBigEndianShort()
throws java.io.IOException
- Throws:
java.io.IOException
readBigEndianInt
protected final int readBigEndianInt()
throws java.io.IOException
- Throws:
java.io.IOException
readBigEndianLong
protected final long readBigEndianLong()
throws java.io.IOException
- Throws:
java.io.IOException
getMPEGSCR
protected java.lang.Long getMPEGSCR(byte[] b)
getMPEG2SCR
protected java.lang.Long getMPEG2SCR(byte[] b)
nextStartCode
protected boolean nextStartCode()
previousStartCode
protected boolean previousStartCode()
Copyright © 2001-2005 XNap Team. All Rights Reserved.