in src/main/java/com/amazonaws/kinesisvideo/internal/service/DefaultServiceCallbacksImpl.java [56:76]
public void accept(@Nullable final Exception object) {
final long streamHandle = stream.getStreamHandle();
if (streamHandle != NativeKinesisVideoProducerJni.INVALID_STREAM_HANDLE_VALUE) {
// The exception can be null indicating successful completion
final int statusCode = getStatusCodeFromException(object);
for (final StreamingInfo stream : mStreams) {
if (stream.getStream().getStreamHandle() == streamHandle) {
log.info("Complete callback triggered for "
+ stream.getStream().getStreamName() + " with statuscode " + statusCode);
}
}
if (statusCode != HTTP_OK) {
try {
stream.streamTerminated(uploadHandle, statusCode);
} catch (final ProducerException e) {
log.exception(e, "Reporting stream termination threw an exception");
}
}
}
}