mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine the rtmp consts name
This commit is contained in:
parent
a9f7f1ecfe
commit
198a7f1e9d
5 changed files with 21 additions and 21 deletions
|
@ -122,8 +122,8 @@ int SrsEdgeIngester::cycle()
|
||||||
}
|
}
|
||||||
srs_assert(client);
|
srs_assert(client);
|
||||||
|
|
||||||
client->set_recv_timeout(SRS_RECV_TIMEOUT_US);
|
client->set_recv_timeout(SRS_CONSTS_RTMP_RECV_TIMEOUT_US);
|
||||||
client->set_send_timeout(SRS_SEND_TIMEOUT_US);
|
client->set_send_timeout(SRS_CONSTS_RTMP_SEND_TIMEOUT_US);
|
||||||
|
|
||||||
SrsRequest* req = _req;
|
SrsRequest* req = _req;
|
||||||
|
|
||||||
|
@ -368,8 +368,8 @@ int SrsEdgeForwarder::start()
|
||||||
}
|
}
|
||||||
srs_assert(client);
|
srs_assert(client);
|
||||||
|
|
||||||
client->set_recv_timeout(SRS_RECV_TIMEOUT_US);
|
client->set_recv_timeout(SRS_CONSTS_RTMP_RECV_TIMEOUT_US);
|
||||||
client->set_send_timeout(SRS_SEND_TIMEOUT_US);
|
client->set_send_timeout(SRS_CONSTS_RTMP_SEND_TIMEOUT_US);
|
||||||
|
|
||||||
SrsRequest* req = _req;
|
SrsRequest* req = _req;
|
||||||
|
|
||||||
|
@ -411,7 +411,7 @@ int SrsEdgeForwarder::cycle()
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
client->set_recv_timeout(SRS_PULSE_TIMEOUT_US);
|
client->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
|
||||||
|
|
||||||
SrsPithyPrint pithy_print(SRS_STAGE_EDGE);
|
SrsPithyPrint pithy_print(SRS_STAGE_EDGE);
|
||||||
|
|
||||||
|
|
|
@ -208,8 +208,8 @@ int SrsForwarder::cycle()
|
||||||
}
|
}
|
||||||
srs_assert(client);
|
srs_assert(client);
|
||||||
|
|
||||||
client->set_recv_timeout(SRS_RECV_TIMEOUT_US);
|
client->set_recv_timeout(SRS_CONSTS_RTMP_RECV_TIMEOUT_US);
|
||||||
client->set_send_timeout(SRS_SEND_TIMEOUT_US);
|
client->set_send_timeout(SRS_CONSTS_RTMP_SEND_TIMEOUT_US);
|
||||||
|
|
||||||
if ((ret = client->handshake()) != ERROR_SUCCESS) {
|
if ((ret = client->handshake()) != ERROR_SUCCESS) {
|
||||||
srs_error("handshake with server failed. ret=%d", ret);
|
srs_error("handshake with server failed. ret=%d", ret);
|
||||||
|
@ -282,7 +282,7 @@ int SrsForwarder::forward()
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
client->set_recv_timeout(SRS_PULSE_TIMEOUT_US);
|
client->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
|
||||||
|
|
||||||
SrsPithyPrint pithy_print(SRS_STAGE_FORWARDER);
|
SrsPithyPrint pithy_print(SRS_STAGE_FORWARDER);
|
||||||
|
|
||||||
|
|
|
@ -115,8 +115,8 @@ int SrsRtmpConn::do_cycle()
|
||||||
|
|
||||||
srs_trace("RTMP client ip=%s", ip.c_str());
|
srs_trace("RTMP client ip=%s", ip.c_str());
|
||||||
|
|
||||||
rtmp->set_recv_timeout(SRS_RECV_TIMEOUT_US);
|
rtmp->set_recv_timeout(SRS_CONSTS_RTMP_RECV_TIMEOUT_US);
|
||||||
rtmp->set_send_timeout(SRS_SEND_TIMEOUT_US);
|
rtmp->set_send_timeout(SRS_CONSTS_RTMP_SEND_TIMEOUT_US);
|
||||||
|
|
||||||
if ((ret = rtmp->handshake()) != ERROR_SUCCESS) {
|
if ((ret = rtmp->handshake()) != ERROR_SUCCESS) {
|
||||||
srs_error("rtmp handshake failed. ret=%d", ret);
|
srs_error("rtmp handshake failed. ret=%d", ret);
|
||||||
|
@ -290,8 +290,8 @@ int SrsRtmpConn::stream_service_cycle()
|
||||||
srs_client_type_string(type).c_str(), req->stream.c_str(), req->duration);
|
srs_client_type_string(type).c_str(), req->stream.c_str(), req->duration);
|
||||||
|
|
||||||
// client is identified, set the timeout to service timeout.
|
// client is identified, set the timeout to service timeout.
|
||||||
rtmp->set_recv_timeout(SRS_RECV_TIMEOUT_US);
|
rtmp->set_recv_timeout(SRS_CONSTS_RTMP_RECV_TIMEOUT_US);
|
||||||
rtmp->set_send_timeout(SRS_SEND_TIMEOUT_US);
|
rtmp->set_send_timeout(SRS_CONSTS_RTMP_SEND_TIMEOUT_US);
|
||||||
|
|
||||||
// set chunk size to larger.
|
// set chunk size to larger.
|
||||||
int chunk_size = _srs_config->get_chunk_size(req->vhost);
|
int chunk_size = _srs_config->get_chunk_size(req->vhost);
|
||||||
|
@ -501,7 +501,7 @@ int SrsRtmpConn::playing(SrsSource* source)
|
||||||
SrsAutoFree(SrsConsumer, consumer);
|
SrsAutoFree(SrsConsumer, consumer);
|
||||||
srs_verbose("consumer created success.");
|
srs_verbose("consumer created success.");
|
||||||
|
|
||||||
rtmp->set_recv_timeout(SRS_PULSE_TIMEOUT_US);
|
rtmp->set_recv_timeout(SRS_CONSTS_RTMP_PULSE_TIMEOUT_US);
|
||||||
|
|
||||||
SrsPithyPrint pithy_print(SRS_STAGE_PLAY_USER);
|
SrsPithyPrint pithy_print(SRS_STAGE_PLAY_USER);
|
||||||
|
|
||||||
|
@ -962,8 +962,8 @@ int SrsRtmpConn::do_token_traverse_auth(SrsSocket* io, SrsRtmpClient* client)
|
||||||
|
|
||||||
srs_assert(client);
|
srs_assert(client);
|
||||||
|
|
||||||
client->set_recv_timeout(SRS_RECV_TIMEOUT_US);
|
client->set_recv_timeout(SRS_CONSTS_RTMP_RECV_TIMEOUT_US);
|
||||||
client->set_send_timeout(SRS_SEND_TIMEOUT_US);
|
client->set_send_timeout(SRS_CONSTS_RTMP_SEND_TIMEOUT_US);
|
||||||
|
|
||||||
if ((ret = client->handshake()) != ERROR_SUCCESS) {
|
if ((ret = client->handshake()) != ERROR_SUCCESS) {
|
||||||
srs_error("handshake with server failed. ret=%d", ret);
|
srs_error("handshake with server failed. ret=%d", ret);
|
||||||
|
|
|
@ -55,16 +55,16 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// the timeout to wait client data,
|
// the timeout to wait client data,
|
||||||
// if timeout, close the connection.
|
// if timeout, close the connection.
|
||||||
#define SRS_SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
#define SRS_CONSTS_RTMP_SEND_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
||||||
|
|
||||||
// the timeout to send data to client,
|
// the timeout to send data to client,
|
||||||
// if timeout, close the connection.
|
// if timeout, close the connection.
|
||||||
#define SRS_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
#define SRS_CONSTS_RTMP_RECV_TIMEOUT_US (int64_t)(30*1000*1000LL)
|
||||||
|
|
||||||
// the timeout to wait for client control message,
|
// the timeout to wait for client control message,
|
||||||
// if timeout, we generally ignore and send the data to client,
|
// if timeout, we generally ignore and send the data to client,
|
||||||
// generally, it's the pulse time for data seding.
|
// generally, it's the pulse time for data seding.
|
||||||
#define SRS_PULSE_TIMEOUT_US (int64_t)(200*1000LL)
|
#define SRS_CONSTS_RTMP_PULSE_TIMEOUT_US (int64_t)(200*1000LL)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* max rtmp header size:
|
* max rtmp header size:
|
||||||
|
@ -73,7 +73,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
* 4bytes timestamp header,
|
* 4bytes timestamp header,
|
||||||
* that is, 1+11+4=16bytes.
|
* that is, 1+11+4=16bytes.
|
||||||
*/
|
*/
|
||||||
#define RTMP_MAX_FMT0_HEADER_SIZE 16
|
#define SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE 16
|
||||||
/**
|
/**
|
||||||
* max rtmp header size:
|
* max rtmp header size:
|
||||||
* 1bytes basic header,
|
* 1bytes basic header,
|
||||||
|
@ -81,7 +81,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
* that is, 1+4=5bytes.
|
* that is, 1+4=5bytes.
|
||||||
*/
|
*/
|
||||||
// always use fmt0 as cache.
|
// always use fmt0 as cache.
|
||||||
//#define RTMP_MAX_FMT3_HEADER_SIZE 5
|
//#define SRS_CONSTS_RTMP_MAX_FMT3_HEADER_SIZE 5
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -100,7 +100,7 @@ private:
|
||||||
* used for type0, 11bytes(or 15bytes with extended timestamp) header.
|
* used for type0, 11bytes(or 15bytes with extended timestamp) header.
|
||||||
* or for type3, 1bytes(or 5bytes with extended timestamp) header.
|
* or for type3, 1bytes(or 5bytes with extended timestamp) header.
|
||||||
*/
|
*/
|
||||||
char out_header_cache[RTMP_MAX_FMT0_HEADER_SIZE];
|
char out_header_cache[SRS_CONSTS_RTMP_MAX_FMT0_HEADER_SIZE];
|
||||||
/**
|
/**
|
||||||
* output chunk size, default to 128, set by config.
|
* output chunk size, default to 128, set by config.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue