|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.smaxe.uv.stream.MediaData
public abstract class MediaData
MediaData
- media (audio/video/flv) data.
Field Summary | |
---|---|
int |
rtime
Media frame relative time (since the last frame time) in milliseconds. |
long |
timestamp
Media frame stream timestamp (since the stream start timestamp) in milliseconds. |
Constructor Summary | |
---|---|
MediaData()
Constructor. |
|
MediaData(int rtime)
Constructor. |
|
MediaData(int rtime,
long timestamp)
Constructor. |
Method Summary | |
---|---|
boolean |
hasAbsoluteTimestamp()
Checks if rtime defines absolute stream timestamp
(rather than 'relative' time). |
abstract java.io.InputStream |
read()
Returns InputStream to read media data. |
abstract int |
size()
Returns media data size (including tag byte). |
abstract int |
tag()
Returns media data tag. |
java.lang.String |
toString()
|
abstract int |
write(java.io.OutputStream os,
int offset,
int length)
Writes video data to the os . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int rtime
public long timestamp
Constructor Detail |
---|
public MediaData()
public MediaData(int rtime)
rtime
- relative time (in milliseconds)public MediaData(int rtime, long timestamp)
rtime
- relative time (in milliseconds)timestamp
- stream timestamp (in milliseconds)Method Detail |
---|
public boolean hasAbsoluteTimestamp()
rtime
defines absolute stream timestamp
(rather than 'relative' time).
Note:
- Method returns true if 'rtime' equals 'timestamp'.
true
if 'rtime' defines absolute stream timestamp;
otherwise false
public abstract int size()
public abstract int tag()
Note: Tag is the first byte of the media data. It contains media frame info, like frame type, codec, etc.
public abstract java.io.InputStream read() throws java.io.IOException
InputStream
to read media data.
java.io.IOException
- if an I/O exception occurredpublic abstract int write(java.io.OutputStream os, int offset, int length) throws java.io.IOException
os
.
os
- output stream to fill with media dataos
- offset
- data offsetlength
- number of bytes to write
java.io.IOException
- if an I/O exception occurredpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |