org.red5.server.stream.codec

## Class SorensonVideo

- java.lang.Object
- - org.red5.server.stream.codec.SorensonVideo

All Implemented Interfaces:
  IVideoStreamCodec

    public class SorensonVideo
    extends Object
    implements IVideoStreamCodec

Red5 video codec for the sorenson video format. VERY simple implementation, just stores last keyframe.

Author:
  The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de), Paul Gregoire (mondain@gmail.com)

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.red5.server.api.stream.IVideoStreamCodec

`IVideoStreamCodec.FrameData`

### Field Summary

### Fields inherited from interface org.red5.server.api.stream.IVideoStreamCodec

`FLV_FRAME_KEY`

### Constructor Summary

Constructors
Constructor and Description
`SorensonVideo()` Constructs a new SorensonVideo.

### Method Summary

Methods
`boolean` `addData(org.apache.mina.core.buffer.IoBuffer data)` 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.
`org.apache.mina.core.buffer.IoBuffer` `getKeyframe()`
`String` `getName()`
`void` `reset()` Reset the codec to its initial state.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SorensonVideo

    public SorensonVideo()

Constructs a new SorensonVideo.

### Method Detail

#### getName

    public String getName()

Specified by:
  `getName` in interface `IVideoStreamCodec`
Returns:
  the name of the video codec.

#### canDropFrames

    public boolean canDropFrames()

Check if the codec supports frame dropping.

Specified by:
  `canDropFrames` in interface `IVideoStreamCodec`
Returns:
  if the codec supports frame dropping.

#### reset

    public void reset()

Reset the codec to its initial state.

Specified by:
  `reset` in interface `IVideoStreamCodec`

#### 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:
  `canHandleData` in interface `IVideoStreamCodec`
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:
  `addData` in interface `IVideoStreamCodec`
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()

Specified by:
  `getKeyframe` in interface `IVideoStreamCodec`
Returns:
  the data for a keyframe.

#### getDecoderConfiguration

    public org.apache.mina.core.buffer.IoBuffer getDecoderConfiguration()

Description copied from interface: `IVideoStreamCodec`
Returns information used to configure the decoder.

Specified by:
  `getDecoderConfiguration` in interface `IVideoStreamCodec`
Returns:
  the data for decoder setup.