public class AbstractVideo extends Object implements IVideoStreamCodec, IoConstants
IVideoStreamCodec.FrameData| Modifier and Type | Field and Description |
|---|---|
protected CopyOnWriteArrayList<IVideoStreamCodec.FrameData> |
keyframes
Storage for key frames
|
protected int |
keyframeTimestamp
Current timestamp for the stored keyframe
|
FLV_FRAME_KEYAVC_PACKET_TYPE_END_OF_SEQUENCE, AVC_PACKET_TYPE_NALU, AVC_PACKET_TYPE_SEQUENCE_HEADER, FLAG_CODEC_H263, FLAG_CODEC_SCREEN, FLAG_CODEC_VP6, FLAG_FORMAT_ADPCM, FLAG_FORMAT_MP3, FLAG_FORMAT_NELLYMOSER, FLAG_FORMAT_NELLYMOSER_8_KHZ, FLAG_FORMAT_RAW, FLAG_FRAMETYPE_DISPOSABLE, FLAG_FRAMETYPE_GENERATED_KEYFRAME, FLAG_FRAMETYPE_INFO, FLAG_FRAMETYPE_INTERFRAME, FLAG_FRAMETYPE_KEYFRAME, FLAG_RATE_11_KHZ, FLAG_RATE_22_KHZ, FLAG_RATE_44_KHZ, FLAG_RATE_48_KHZ, FLAG_RATE_5_5_KHZ, FLAG_SIZE_16_BIT, FLAG_SIZE_8_BIT, FLAG_TYPE_MONO, FLAG_TYPE_STEREO, INFO_PACKET_SEEK_END, INFO_PACKET_SEEK_START, MASK_SOUND_FORMAT, MASK_SOUND_RATE, MASK_SOUND_SIZE, MASK_SOUND_TYPE, MASK_VIDEO_CODEC, MASK_VIDEO_FRAMETYPE, TYPE_AUDIO, TYPE_ENCRYPTED, TYPE_ENCRYPTED_AUDIO, TYPE_ENCRYPTED_METADATA, TYPE_ENCRYPTED_VIDEO, TYPE_METADATA, TYPE_VIDEO| Constructor and Description |
|---|
AbstractVideo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addData(org.apache.mina.core.buffer.IoBuffer data)
Update the state of the codec with the passed data.
|
boolean |
addData(org.apache.mina.core.buffer.IoBuffer data,
int timestamp)
Update the state of the codec with the passed data.
|
boolean |
canDropFrames()
Check if the codec supports frame dropping.
|
boolean |
canHandleData(org.apache.mina.core.buffer.IoBuffer data)
Returns true if the codec knows how to handle the passed stream data.
|
org.apache.mina.core.buffer.IoBuffer |
getDecoderConfiguration()
Returns information used to configure the decoder.
|
IVideoStreamCodec.FrameData |
getInterframe(int idx)
Gets data of interframe with the specified index.
|
org.apache.mina.core.buffer.IoBuffer |
getKeyframe()
Returns keyframe data.
|
IVideoStreamCodec.FrameData[] |
getKeyframes()
Returns all the keyframe data.
|
String |
getName() |
int |
getNumInterframes()
Returns the number of interframes collected from last keyframe.
|
void |
reset()
Reset the codec to its initial state.
|
protected int keyframeTimestamp
protected final CopyOnWriteArrayList<IVideoStreamCodec.FrameData> keyframes
public String getName()
getName in interface IVideoStreamCodecpublic void reset()
IVideoStreamCodecreset in interface IVideoStreamCodecpublic boolean canDropFrames()
IVideoStreamCodeccanDropFrames in interface IVideoStreamCodecpublic boolean canHandleData(org.apache.mina.core.buffer.IoBuffer data)
IVideoStreamCodeccanHandleData in interface IVideoStreamCodecdata - some sample data to see if this codec can handle itpublic boolean addData(org.apache.mina.core.buffer.IoBuffer data)
IVideoStreamCodecaddData in interface IVideoStreamCodecdata - data to tell the codec we're addingpublic boolean addData(org.apache.mina.core.buffer.IoBuffer data,
int timestamp)
IVideoStreamCodecaddData in interface IVideoStreamCodecdata - data to tell the codec we're addingtimestamp - time associated with the datapublic org.apache.mina.core.buffer.IoBuffer getDecoderConfiguration()
IVideoStreamCodecgetDecoderConfiguration in interface IVideoStreamCodecpublic org.apache.mina.core.buffer.IoBuffer getKeyframe()
getKeyframe in interface IVideoStreamCodecpublic IVideoStreamCodec.FrameData[] getKeyframes()
getKeyframes in interface IVideoStreamCodecpublic int getNumInterframes()
IVideoStreamCodecgetNumInterframes in interface IVideoStreamCodecpublic IVideoStreamCodec.FrameData getInterframe(int idx)
IVideoStreamCodecgetInterframe in interface IVideoStreamCodecidx - of interframeCopyright © 2005–2017 Red5. All rights reserved.