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, trackSize
Fields inherited from interface org.red5.codec.IVideoStreamCodec
FLV_FRAME_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addData
(org.apache.mina.core.buffer.IoBuffer data, int timestamp) Update the state of the codec with the passed data.boolean
Check if the codec supports frame dropping.org.apache.mina.core.buffer.IoBuffer
Returns information used to configure the decoder.void
reset()
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:
canDropFrames
in interfaceIVideoStreamCodec
- Overrides:
canDropFrames
in classAbstractVideo
- Returns:
- if the codec supports frame dropping.
-
reset
public void reset()Reset the codec to its initial state.- Specified by:
reset
in interfaceIVideoStreamCodec
- Overrides:
reset
in 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:
addData
in interfaceIVideoStreamCodec
- Overrides:
addData
in 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:
getDecoderConfiguration
in interfaceIVideoStreamCodec
- Overrides:
getDecoderConfiguration
in classAbstractVideo
- Returns:
- the data for decoder setup
-