1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

for #319, raw api support update the global RTMP chunk_size.

This commit is contained in:
winlin 2015-09-01 21:27:04 +08:00
parent 2cfb71616e
commit c8466c36bd
5 changed files with 68 additions and 9 deletions

View file

@ -35,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif
#include <stdlib.h>
#include <sys/time.h>
#include <math.h>
#include <map>
using namespace std;
@ -1355,6 +1356,17 @@ string srs_get_peer_ip(int fd)
return ip;
}
bool srs_is_digit_number(const string& str)
{
if (str.empty()) {
return false;
}
int v = ::atoi(str.c_str());
int powv = (int)pow(10, str.length() - 1);
return v / powv >= 1 && v / powv <= 9;
}
void srs_api_dump_summaries(SrsAmf0Object* obj)
{
SrsRusage* r = srs_get_system_rusage();