Interface StreamCallbacks
-
- All Known Subinterfaces:
KinesisVideoProducerStream
- All Known Implementing Classes:
DefaultStreamCallbacks,NativeKinesisVideoProducerStream,PendingCreationKinesisVideoStream
public interface StreamCallbacksInterface to the Kinesis Video Producer Stream Callbacks functionality. These will be used to report various stream latency pressures and report dropped frames.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbufferDurationOverflowPressure(long remainDuration)Stream temporal buffer pressure.voiddroppedFragmentReport(long fragmentTimecode)Reports a dropped fragment for the stream.voiddroppedFrameReport(long frameTimecode)Reports a dropped frame for the stream.voidfragmentAckReceived(long uploadHandle, KinesisVideoFragmentAck fragmentAck)Reports the received ACK.voidstreamClosed(long uploadHandle)Stream has been closed.voidstreamConnectionStale(long lastAckDuration)Reports the stream staleness when the data is read and sent but no ACKs are received.voidstreamDataAvailable(long uploadHandle, long duration, long availableSize)New data is available for the stream.voidstreamErrorReport(long uploadHandle, long fragmentTimecode, long statusCode)Reports an error for the stream.voidstreamLatencyPressure(long duration)Reports the stream latency pressure.voidstreamReady()Ready to stream data.voidstreamUnderflowReport()Reports the stream underflow.
-
-
-
Method Detail
-
streamUnderflowReport
void streamUnderflowReport() throws ProducerExceptionReports the stream underflow.- Throws:
ProducerException
-
streamLatencyPressure
void streamLatencyPressure(long duration) throws ProducerExceptionReports the stream latency pressure.- Parameters:
duration- The buffer duration in 100ns.- Throws:
ProducerException
-
streamConnectionStale
void streamConnectionStale(long lastAckDuration) throws ProducerExceptionReports the stream staleness when the data is read and sent but no ACKs are received.- Parameters:
lastAckDuration- The duration of time window when the last "buffering" ACK is received in 100ns.- Throws:
ProducerException
-
fragmentAckReceived
void fragmentAckReceived(long uploadHandle, @Nonnull KinesisVideoFragmentAck fragmentAck) throws ProducerExceptionReports the received ACK.- Parameters:
uploadHandle- The client stream upload handle.fragmentAck- The received fragment ACK.- Throws:
ProducerException
-
droppedFrameReport
void droppedFrameReport(long frameTimecode) throws ProducerExceptionReports a dropped frame for the stream.- Parameters:
frameTimecode- Frame time code of the dropped frame.- Throws:
ProducerException
-
droppedFragmentReport
void droppedFragmentReport(long fragmentTimecode) throws ProducerExceptionReports a dropped fragment for the stream.- Parameters:
fragmentTimecode- Fragment time code of the dropped fragment.- Throws:
ProducerException
-
streamErrorReport
void streamErrorReport(long uploadHandle, long fragmentTimecode, long statusCode) throws ProducerExceptionReports an error for the stream. The client should terminate the connection as the inlet host would have/has already terminated the connection.- Parameters:
uploadHandle- The client stream upload handle.fragmentTimecode- Fragment time code of the errored fragment.statusCode- Status code of the failure.- Throws:
ProducerException
-
streamDataAvailable
void streamDataAvailable(long uploadHandle, long duration, long availableSize) throws ProducerExceptionNew data is available for the stream.- Parameters:
uploadHandle- The client stream upload handle.duration- The duration of content available in the stream.availableSize- The size of the content available in the stream.- Throws:
ProducerException
-
streamReady
void streamReady() throws ProducerExceptionReady to stream data.- Throws:
ProducerException
-
streamClosed
void streamClosed(long uploadHandle) throws ProducerExceptionStream has been closed.- Parameters:
uploadHandle- The client stream upload handle.- Throws:
ProducerException
-
bufferDurationOverflowPressure
void bufferDurationOverflowPressure(long remainDuration) throws ProducerExceptionStream temporal buffer pressure.- Parameters:
remainDuration- Remaining duration in the buffer in hundreds of nanos.- Throws:
ProducerException
-
-