Skip to end of metadata
Go to start of metadata

When 'FAILED' stream or call status is received, getInfo() method returns a description string of error occured.

Errors list

ErrorDescription string
streamStatusInfo
FAILED_BY_ICE_ERRORFailed by ICE error
FAILED_BY_ICE_TIMEOUTFailed by ICE timeout
FAILED_BY_KEEP_ALIVEFailed by ICE keep alive
FAILED_BY_DTLS_FINGERPRINT_ERRORFailed by DTLS fingerprint error
FAILED_BY_DTLS_ERRORFailed by DTLS error
FAILED_BY_HLS_WRITER_ERRORFailed by HLS writer error
FAILED_BY_RTMP_WRITER_ERRORFailed by RTMP writer error
FAILED_BY_RTP_ACTIVITYFailed by RTP activity
STOPPED_BY_SESSION_DISCONNECTStopped by session disconnect
STOPPED_BY_REST_TERMINATEStopped by rest /terminate
STOPPED_BY_PUBLISHER_STOPStopped by publisher stop
STOPPED_BY_USERStopped by user
FAILED_BY_ERRORFailed by error
FAILED_TO_ADD_STREAM_TO_PROXYFailed to add stream to proxy
DISTRIBUTOR_STOPPEDDistributor stopped
PUBLISH_STREAM_IS_NOT_READYPublish stream is not ready
STREAM_NOT_FOUNDStream not found
STREAM_NAME_ALREADY_IN_USEStream name is already in use
MEDIASESSION_ID_NULLMediaSessionId is null
MEDIASESSION_ID_ALREADY_IN_USEMediaSessionId is already in use
SESSION_NOT_READYSession not ready
SESSION_DOES_NOT_EXISTSession does not exist
RTSP_HAS_WRONG_FORMATRtsp has wrong format
FILE_HAS_WRONG_FORMATFile has wrong format
FAILED_TO_CONNECT_TO_RTSP_STREAMFailed to connect to rtsp stream
RTSP_STREAM_NOT_FOUNDRtsp stream not found
RTSPAGENT_SHUTDOWNRtspAgent shutdown
STREAM_FAILEDStream failed
NO_COMMON_CODECSNo common codecs
BAD_URIBad URI
GOT_EXCEPTION_WHILE_STREAMING_FILEGot exception while streaming file
REQUESTED_STREAM_SHUTDOWNRequested stream shutdown
FAILED_TO_READ_FILEFailed to read file
FILE_NOT_FOUNDFile not found
FAILED_TO_CONNECT_TO_ORIGIN_STREAMFailed to connect to origin stream
CDN_STREAM_NOT_FOUNDCDN stream not found
FAILED_TO_GET_AGENT_STORAGEFailed to get agent storage
AGENT_SERVICING_ORIGIN_STREAM_IS_SHUTTING_DOWNAgent servicing origin stream is shutting down
TERMINATED_BY_KEEP_ALIVETerminated by keep-alive
TRANSCODING_REQUIRED_BUT_DISABLEDTranscoding is requred, but disabled
NO_AVAILABLE_TRANSCODERSNo available transcoder nodes in CDN
callStatusInfo
FAILED_BY_SESSION_CREATIONFailed by session creation
FAILED_BY_ICE_ERRORFailed by ICE error
FAILED_BY_RTP_ACTIVITYFailed by RTP activity
FAILED_BY_RTMP_WRITER_ERRORFailed by RTMP writer error
FAILED_BY_DTLS_FINGERPRINT_ERRORFailed by DTLS fingerprint error
FAILED_BY_DTLS_ERRORFailed by DTLS error
FAILED_BY_ERRORFailed by error
FAILED_BY_REQUEST_TIMEOUTFailed by request timeout
TRANSCODING_REQUIRED_BUT_DISABLEDTranscoding is requred, but disabled

Error handling code example

As an example. let's take the StreamingMinActivity.java class code with hash 17fa60baa5a21bc7398338c530bd7314e0cbfca3, that is available to download in build 1.0.1.49

1. Stream playback error handling

stream.getInfo() code

                    playStream.on(new StreamStatusEvent() {
                        @Override
                        public void onStreamStatus(final Stream stream, final StreamStatus streamStatus) {
                            runOnUiThread(new Runnable() {
                                @Override
                                public void run() {
                                    ...
                                    if (StreamStatus.FAILED.equals(streamStatus)){
                                        switch (stream.getInfo()){
                                            case StreamStatusInfo.SESSION_DOES_NOT_EXIST:
                                                mPlayStatus.setText(streamStatus+": Actual session does not exist");
                                                break;
                                            case StreamStatusInfo.STOPPED_BY_PUBLISHER_STOP:
                                                mPlayStatus.setText(streamStatus+": Related publisher stopped its stream or lost connection");
                                                break;
                                            case StreamStatusInfo.SESSION_NOT_READY:
                                                mPlayStatus.setText(streamStatus+": Session is not initialized or terminated on play ordinary stream");
                                                break;
                                            case StreamStatusInfo.RTSP_STREAM_NOT_FOUND:
                                                mPlayStatus.setText(streamStatus+": Rtsp stream not found where agent received '404-Not Found'");
                                                break;
                                            case StreamStatusInfo.FAILED_TO_CONNECT_TO_RTSP_STREAM:
                                                mPlayStatus.setText(streamStatus+": Failed to connect to rtsp stream");
                                                break;
                                            case StreamStatusInfo.FILE_NOT_FOUND:
                                                mPlayStatus.setText(streamStatus+": File does not exist, check filename");
                                                break;
                                            case StreamStatusInfo.FILE_HAS_WRONG_FORMAT:
                                                mPlayStatus.setText(streamStatus+": File has wrong format on play vod, this format is not supported");
                                                break;
                                            default:{
                                               mPlayStatus.setText(stream.getInfo());
                                           }
                                        }
                                    } else {
                                        mPlayStatus.setText(streamStatus.toString());
                                    }
                                }
                            });
                        }
                    });

2. Stream publishing error handling

stream.getInfo() code

                                    if (StreamStatus.FAILED.equals(streamStatus)){
                                        switch (stream.getInfo()){
                                            case StreamStatusInfo.STREAM_NAME_ALREADY_IN_USE:
                                                mPublishStatus.setText(streamStatus+": Server already has a publish stream with the same name, try using different one");
                                                break;
                                            default:{
                                                mPlayStatus.setText(stream.getInfo());
                                            }
                                        }
                                    } else {
                                        mPublishStatus.setText(streamStatus.toString());
                                    }
  • No labels