|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ext.mediamanager.FileProperties
net.sf.ext.mediamanager.FilePropertiesASF
This class provides a FileProperties extension for the use of ASF media
files.
It would have been nice if it also use a DataInputStream in order to read the
contents. However, since it uses the "Entagged"-Audio-Library a
RandomAccessFile is mandatory.
Constructor Summary | |
FilePropertiesASF()
|
Method Summary | |
boolean |
containsVideoStream()
Returns true if the last call of
process(RandomAccessFile) has found a video stream.Only the this objects fields have been refilled. |
protected java.lang.String |
findName(java.io.InputStream stream,
java.lang.String id)
Searchs in the inputStream stream the name following the string id (seperated by a \t). |
protected int |
getAudioBitRate()
Returns the audio bit rate. |
protected int |
getAudioChannels()
Returns the audio channels. |
protected java.lang.String |
getAudioCodec()
Returns the audio codec. |
protected int |
getAudioRate()
Returns the audio rate. |
protected java.lang.String |
getContainer()
Returns the container. |
int |
getDecimalValue(int[] bits,
int start,
int stop,
boolean printBits)
Returns the decimal value of a specified bumber of bytes from a specific part of a byte. |
protected int |
getDuration()
Returns the duration. |
protected java.lang.String |
getMediaType()
Returns the Media Type. |
protected java.util.ArrayList |
getMetaData()
Returns the meta data ArrayList. |
protected java.lang.String |
getSubtitles()
Returns the subtitles. |
protected int |
getUnsignedInt16(byte byte1,
byte byte2)
Returns a 16-bit integer. |
protected int |
getUnsignedInt16(int byte1,
int byte2)
Returns a 16-bit integer. |
protected int |
getUnsignedInt32(byte byte1,
byte byte2)
Returns an unsigned 32-bit integer. |
protected int |
getUnsignedInt32(int byte1,
int byte2)
Returns an unsigned 32-bit integer. |
protected int |
getVideoBitRate()
Returns the video bit rate. |
protected java.lang.String |
getVideoCodec()
Returns the video codec. |
protected int |
getVideoRate()
Returns the video rate. |
protected java.lang.String |
getVideoResolution()
Returns the resolution. |
void |
process(java.io.RandomAccessFile file)
This method will read the file and interprets it as an asf-media-file. |
protected int |
readUnsignedByte(byte[] b,
int offset)
Reads an unsigned 8-bit integer. |
protected int |
readUnsignedByte(java.io.RandomAccessFile dataStream)
Reads an unsigned byte and returns its int representation. |
protected int[] |
readUnsignedBytes(java.io.RandomAccessFile dataStream,
int n)
Reads n unsigned bytes and returns it in an int[n]. |
protected int |
readUnsignedInt16(byte[] b,
int offset)
Reads an unsigned 16-bit integer. |
protected int |
readUnsignedInt16(java.io.RandomAccessFile dataStream)
Reads an unsigned 16-bit integer. |
protected int |
readUnsignedInt32(byte[] b,
int offset)
Reads an unsigned 32-bit integer. |
protected int |
readUnsignedInt32(java.io.RandomAccessFile dataStream)
Reads an unsigned 32-bit integer. |
protected void |
setAudioBitRate(int audioBitRate)
Sets the audio bit rate. |
protected void |
setAudioChannels(int audioChannels)
Sets the audio channels. |
protected void |
setAudioCodec(java.lang.String audioCodec)
Sets the audio codec (auds handler). |
protected void |
setAudioRate(int audioRate)
Sets the audio rate. |
protected void |
setContainer(java.lang.String container)
Sets the container. |
protected void |
setDuration(int duration)
Sets the duration. |
protected void |
setMediaType(java.lang.String mediaType)
Sets the Media Type. |
protected void |
setMetaData(java.util.ArrayList metaData)
Sets the meta data ArrayList. |
protected void |
setSubtitles(java.lang.String subtitles)
Sets the subtitles. |
protected void |
setVideoBitRate(int videoBitRate)
Sets the video bit rate. |
protected void |
setVideoCodec(java.lang.String videoCodec)
Sets the video codec (vids handler). |
protected void |
setVideoRate(int videoRate)
Sets the video rate. |
protected void |
setVideoResolution(java.lang.String videoResolution)
Sets the resolution. |
protected void |
skipBytes(java.io.RandomAccessFile dataStream,
int n)
Discards n bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilePropertiesASF()
Method Detail |
public boolean containsVideoStream()
true
if the last call of
process(RandomAccessFile)
has found a video stream.
true
if video stream was found.public void process(java.io.RandomAccessFile file) throws java.lang.Exception
file
- The asf media file, which should be parsed.
java.lang.Exception
- Thrown on IOErrors, or failure in interpreting the file as
asf.protected java.lang.String getSubtitles()
protected java.lang.String getVideoResolution()
protected java.lang.String getVideoCodec()
protected int getVideoRate()
protected int getVideoBitRate()
protected int getDuration()
protected java.lang.String getAudioCodec()
protected int getAudioRate()
protected int getAudioBitRate()
protected int getAudioChannels()
protected void setSubtitles(java.lang.String subtitles)
protected void setVideoResolution(java.lang.String videoResolution)
protected void setVideoCodec(java.lang.String videoCodec)
protected void setVideoRate(int videoRate)
protected void setVideoBitRate(int videoBitRate)
protected void setDuration(int duration)
protected void setAudioCodec(java.lang.String audioCodec)
protected void setAudioRate(int audioRate)
protected void setAudioBitRate(int audioBitRate)
protected void setAudioChannels(int audioChannels)
protected void setContainer(java.lang.String container)
protected java.lang.String getContainer()
protected void setMediaType(java.lang.String mediaType)
protected java.lang.String getMediaType()
protected void setMetaData(java.util.ArrayList metaData)
protected java.util.ArrayList getMetaData()
protected int readUnsignedByte(byte[] b, int offset) throws java.lang.Exception
java.lang.Exception
protected int readUnsignedInt16(byte[] b, int offset) throws java.lang.Exception
java.lang.Exception
protected int readUnsignedInt32(byte[] b, int offset) throws java.lang.Exception
java.lang.Exception
protected int getUnsignedInt16(int byte1, int byte2) throws java.lang.Exception
java.lang.Exception
protected int getUnsignedInt16(byte byte1, byte byte2) throws java.lang.Exception
java.lang.Exception
protected int getUnsignedInt32(byte byte1, byte byte2) throws java.lang.Exception
java.lang.Exception
protected int getUnsignedInt32(int byte1, int byte2) throws java.lang.Exception
java.lang.Exception
protected int readUnsignedByte(java.io.RandomAccessFile dataStream) throws java.lang.Exception
java.lang.Exception
protected int[] readUnsignedBytes(java.io.RandomAccessFile dataStream, int n) throws java.lang.Exception
java.lang.Exception
protected int readUnsignedInt16(java.io.RandomAccessFile dataStream) throws java.lang.Exception
java.lang.Exception
protected int readUnsignedInt32(java.io.RandomAccessFile dataStream) throws java.lang.Exception
java.lang.Exception
protected void skipBytes(java.io.RandomAccessFile dataStream, int n) throws java.lang.Exception
java.lang.Exception
public int getDecimalValue(int[] bits, int start, int stop, boolean printBits)
protected java.lang.String findName(java.io.InputStream stream, java.lang.String id) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |