Package org.red5.codec
Class AVCVideo
java.lang.Object
org.red5.codec.AbstractVideo
org.red5.codec.AVCVideo
- All Implemented Interfaces:
IVideoStreamCodec
Red5 video codec for the AVC (h264) video format. Stores DecoderConfigurationRecord and last keyframe.
- Author:
- Tiago Jacobs (tiago@imdt.com.br), 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
attributes, bufferInterframes, codec, enhanced, frameType, interframes, isDebug, isTrace, keyframes, keyframeTimestamp, log, multitrack, multitrackType, numInterframes, packetType, trackCodec, trackId, tracks, trackSizeFields inherited from interface org.red5.codec.IVideoStreamCodec
FLV_FRAME_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddData(org.apache.mina.core.buffer.IoBuffer data, int timestamp) Update the state of the codec with the passed data.booleanCheck if the codec supports frame dropping.org.apache.mina.core.buffer.IoBufferReturns information used to configure the decoder.voidreset()Reset the codec to its initial state.Methods inherited from class org.red5.codec.AbstractVideo
addData, addData, canHandleData, equals, getAttribute, getCodec, getFrameType, getInterframe, getKeyframe, getKeyframes, getMultitrackType, getName, getNumInterframes, getPacketType, getTrackCodec, getTrackCodec, getTrackId, hashCode, isBufferInterframes, isEnhanced, setAttribute, setBufferInterframes, setTrackId, softReset, toString
-
Constructor Details
-
AVCVideo
public AVCVideo()
-
-
Method Details
-
canDropFrames
public boolean canDropFrames()Check if the codec supports frame dropping.- Specified by:
canDropFramesin interfaceIVideoStreamCodec- Overrides:
canDropFramesin classAbstractVideo- Returns:
- if the codec supports frame dropping.
-
reset
public void reset()Reset the codec to its initial state.- Specified by:
resetin interfaceIVideoStreamCodec- Overrides:
resetin classAbstractVideo
-
addData
public boolean addData(org.apache.mina.core.buffer.IoBuffer data, int timestamp) 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 addingtimestamp- time associated with the data- Returns:
- true for success. false for passing wrong video format or other error.
-
getDecoderConfiguration
public org.apache.mina.core.buffer.IoBuffer getDecoderConfiguration()Returns information used to configure the decoder.- Specified by:
getDecoderConfigurationin interfaceIVideoStreamCodec- Overrides:
getDecoderConfigurationin classAbstractVideo- Returns:
- the data for decoder setup
-