|
|
|
@ -35,19 +35,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
#include <srs_kernel_log.hpp>
|
|
|
|
|
#include <srs_kernel_error.hpp>
|
|
|
|
|
|
|
|
|
|
class ISrsProtocolReaderWriter;
|
|
|
|
|
class SrsBuffer;
|
|
|
|
|
class SrsPacket;
|
|
|
|
|
class SrsStream;
|
|
|
|
|
class SrsCommonMessage;
|
|
|
|
|
class SrsChunkStream;
|
|
|
|
|
class SrsAmf0Object;
|
|
|
|
|
class SrsAmf0Any;
|
|
|
|
|
class ISrsMessage;
|
|
|
|
|
|
|
|
|
|
// the following is the timeout for rtmp protocol,
|
|
|
|
|
// to avoid death connection.
|
|
|
|
|
|
|
|
|
|
// when got a messae header, there must be some data,
|
|
|
|
|
// increase recv timeout to got an entire message.
|
|
|
|
|
#define SRS_MIN_RECV_TIMEOUT_US (int64_t)(60*1000*1000LL)
|
|
|
|
|
|
|
|
|
|
// the timeout to wait for client control message,
|
|
|
|
|
// if timeout, we generally ignore and send the data to client,
|
|
|
|
|
// generally, it's the pulse time for data seding.
|
|
|
|
|
#define SRS_PULSE_TIMEOUT_US (int64_t)(200*1000LL)
|
|
|
|
|
|
|
|
|
|
// the timeout to wait client data,
|
|
|
|
|
// if timeout, close the connection.
|
|
|
|
|
#define SRS_SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
|
|
|
@ -56,38 +57,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
// if timeout, close the connection.
|
|
|
|
|
#define SRS_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
|
|
|
|
|
|
|
|
|
// the timeout to wait client data, when client paused
|
|
|
|
|
// if timeout, close the connection.
|
|
|
|
|
#define SRS_PAUSED_SEND_TIMEOUT_US (int64_t)(30*60*1000*1000LL)
|
|
|
|
|
// if timeout, close the connection.
|
|
|
|
|
#define SRS_PAUSED_RECV_TIMEOUT_US (int64_t)(30*60*1000*1000LL)
|
|
|
|
|
|
|
|
|
|
// the timeout to wait encoder to republish
|
|
|
|
|
// if timeout, close the connection.
|
|
|
|
|
#define SRS_REPUBLISH_SEND_TIMEOUT_US (int64_t)(3*60*1000*1000LL)
|
|
|
|
|
// if timeout, close the connection.
|
|
|
|
|
#define SRS_REPUBLISH_RECV_TIMEOUT_US (int64_t)(3*60*1000*1000LL)
|
|
|
|
|
|
|
|
|
|
// when stream is busy, for example, streaming is already
|
|
|
|
|
// publishing, when a new client to request to publish,
|
|
|
|
|
// sleep a while and close the connection.
|
|
|
|
|
#define SRS_STREAM_BUSY_SLEEP_US (int64_t)(3*1000*1000LL)
|
|
|
|
|
|
|
|
|
|
// when error, forwarder sleep for a while and retry.
|
|
|
|
|
#define SRS_FORWARDER_SLEEP_US (int64_t)(3*1000*1000LL)
|
|
|
|
|
|
|
|
|
|
// when error, encoder sleep for a while and retry.
|
|
|
|
|
#define SRS_ENCODER_SLEEP_US (int64_t)(3*1000*1000LL)
|
|
|
|
|
|
|
|
|
|
class ISrsProtocolReaderWriter;
|
|
|
|
|
class SrsBuffer;
|
|
|
|
|
class SrsPacket;
|
|
|
|
|
class SrsStream;
|
|
|
|
|
class SrsCommonMessage;
|
|
|
|
|
class SrsChunkStream;
|
|
|
|
|
class SrsAmf0Object;
|
|
|
|
|
class SrsAmf0Any;
|
|
|
|
|
class ISrsMessage;
|
|
|
|
|
// the timeout to wait for client control message,
|
|
|
|
|
// if timeout, we generally ignore and send the data to client,
|
|
|
|
|
// generally, it's the pulse time for data seding.
|
|
|
|
|
#define SRS_PULSE_TIMEOUT_US (int64_t)(200*1000LL)
|
|
|
|
|
|
|
|
|
|
// convert class name to string.
|
|
|
|
|
#define CLASS_NAME_STRING(className) #className
|
|
|
|
|