Package org.red5.codec
Class ScreenVideo2
- java.lang.Object
-
- org.red5.codec.AbstractVideo
-
- org.red5.codec.ScreenVideo2
-
- All Implemented Interfaces:
IVideoStreamCodec,IoConstants
public class ScreenVideo2 extends AbstractVideo
Red5 video codec for the screen capture format.- Author:
- The Red5 Project, Joachim Bauch (jojo@struktur.de), Paul Gregoire (mondain@gmail.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.red5.codec.IVideoStreamCodec
IVideoStreamCodec.FrameData
-
-
Field Summary
-
Fields inherited from class org.red5.codec.AbstractVideo
keyframes, keyframeTimestamp
-
Fields inherited from interface org.red5.io.IoConstants
AVC_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
-
Fields inherited from interface org.red5.codec.IVideoStreamCodec
FLV_FRAME_KEY
-
-
Constructor Summary
Constructors Constructor Description ScreenVideo2()Constructs a new ScreenVideo2.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddData(org.apache.mina.core.buffer.IoBuffer data)Update the state of the codec with the passed data.booleancanHandleData(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.IoBuffergetKeyframe()Returns keyframe data.IVideoStreamCodec.FrameData[]getKeyframes()Returns all the keyframe data.StringgetName()voidreset()Reset the codec to its initial state.-
Methods inherited from class org.red5.codec.AbstractVideo
addData, canDropFrames, getDecoderConfiguration, getInterframe, getNumInterframes
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceIVideoStreamCodec- Overrides:
getNamein classAbstractVideo- Returns:
- the name of the video codec.
-
reset
public void reset()
Reset the codec to its initial state.- Specified by:
resetin interfaceIVideoStreamCodec- Overrides:
resetin classAbstractVideo
-
canHandleData
public boolean canHandleData(org.apache.mina.core.buffer.IoBuffer data)
Returns true if the codec knows how to handle the passed stream data.- Specified by:
canHandleDatain interfaceIVideoStreamCodec- Overrides:
canHandleDatain classAbstractVideo- Parameters:
data- some sample data to see if this codec can handle it- Returns:
- can this code handle the data.
-
addData
public boolean addData(org.apache.mina.core.buffer.IoBuffer data)
Update the state of the codec with the passed data.- Specified by:
addDatain interfaceIVideoStreamCodec- Overrides:
addDatain classAbstractVideo- Parameters:
data- data to tell the codec we're adding- Returns:
- true for success. false for error
-
getKeyframe
public org.apache.mina.core.buffer.IoBuffer getKeyframe()
Returns keyframe data.- Specified by:
getKeyframein interfaceIVideoStreamCodec- Overrides:
getKeyframein classAbstractVideo- Returns:
- the data for a keyframe
-
getKeyframes
public IVideoStreamCodec.FrameData[] getKeyframes()
Description copied from class:AbstractVideoReturns all the keyframe data.- Specified by:
getKeyframesin interfaceIVideoStreamCodec- Overrides:
getKeyframesin classAbstractVideo- Returns:
- array of keyframe data
-
-