Package org.red5.server.net.protocol
Class RTMPDecodeState
java.lang.Object
org.red5.server.net.protocol.RTMPDecodeState
Represents current decode state of the protocol.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbufferDecoding(int amount) Specifies buffer decoding amount needed.booleanChecks whether decoding process can be continued.booleancanStartDecoding(int remaining) Checks whether remaining buffer size is greater or equal than buffer amount and so if it makes sense to start decoding.voidSet decoding state as "needed to be continued".intReturns current buffer amount.booleanChecks whether decoding is complete.voidStarts decoding.voidtoString()
-
Field Details
-
sessionId
Session id to which this decoding state belongs.
-
-
Constructor Details
-
RTMPDecodeState
-
-
Method Details
-
getDecoderBufferAmount
public int getDecoderBufferAmount()Returns current buffer amount.- Returns:
- Buffer amount
-
bufferDecoding
public void bufferDecoding(int amount) Specifies buffer decoding amount needed.- Parameters:
amount- Buffer decoding amount
-
continueDecoding
public void continueDecoding()Set decoding state as "needed to be continued". -
canStartDecoding
public boolean canStartDecoding(int remaining) Checks whether remaining buffer size is greater or equal than buffer amount and so if it makes sense to start decoding.- Parameters:
remaining- Remaining buffer size- Returns:
- true if there is data to decode, false otherwise
-
startDecoding
public void startDecoding()Starts decoding. Sets state to "ready" and clears buffer amount. -
stopDecoding
public void stopDecoding() -
hasDecodedObject
public boolean hasDecodedObject()Checks whether decoding is complete.- Returns:
- true if decoding has finished, false otherwise
-
canContinueDecoding
public boolean canContinueDecoding()Checks whether decoding process can be continued.- Returns:
- true if decoding can be continued, false otherwise
-
getSessionId
- Returns:
- the sessionId
-
toString
-