Package com.avpkit.mediatool.event
Interface IRawMediaEvent
-
- All Superinterfaces:
IEvent,IStreamEvent
- All Known Subinterfaces:
IAudioSamplesEvent,IVideoPictureEvent
- All Known Implementing Classes:
AudioSamplesEvent,VideoPictureEvent
public interface IRawMediaEvent extends IStreamEvent
AnIEventthat contains raw, decoded, media data.- Author:
- aclarke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetJavaData()The Java object registered with this event.IMediaDatagetMediaData()TheIMediaDatafor this object.java.lang.LonggetTimeStamp()The time stamp of this media, inTimeUnit.MICROSECONDS.java.lang.LonggetTimeStamp(java.util.concurrent.TimeUnit unit)Get the time stamp of this media in the specified units.java.util.concurrent.TimeUnitgetTimeUnit()The time unit ofgetTimeStamp().-
Methods inherited from interface com.avpkit.mediatool.event.IStreamEvent
getStreamIndex
-
-
-
-
Method Detail
-
getMediaData
IMediaData getMediaData()
TheIMediaDatafor this object. May be null ifgetJavaData()is not null.The returned
IMediaDatawill only be valid for the duration of theIMediaListenermethod call it was dispatched on and implementations must not access it after that call returns. If you need to keep a copy of this data either copy the data into your own object, or useIMediaData.copyReference()to create a reference that will outlive your call.- Returns:
- the media data, or null if unavailable
-
getJavaData
java.lang.Object getJavaData()
The Java object registered with this event. If null, you must usegetMediaData(). Not allIRawMediaEventsupport the ability to attach java data.- Returns:
- the object, or null if not available
-
getTimeStamp
java.lang.Long getTimeStamp()
The time stamp of this media, inTimeUnit.MICROSECONDS.- Returns:
- the timeStamp, or null if none.
-
getTimeStamp
java.lang.Long getTimeStamp(java.util.concurrent.TimeUnit unit)
Get the time stamp of this media in the specified units.- Parameters:
unit- the time unit- Returns:
- the time stamp, or null if none
- Throws:
java.lang.IllegalArgumentException- if unit is null
-
getTimeUnit
java.util.concurrent.TimeUnit getTimeUnit()
The time unit ofgetTimeStamp().- Returns:
- the timeUnit
-
-