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

add utc time format.

This commit is contained in:
winlin 2015-04-03 16:42:32 +08:00
parent 56cd373015
commit e458305f81
8 changed files with 73 additions and 20 deletions

View file

@ -294,6 +294,21 @@ bool srs_path_exists(std::string path)
return false;
}
string srs_path_dirname(string path)
{
std::string dirname = path;
size_t pos = string::npos;
if ((pos = dirname.rfind("/")) != string::npos) {
if (pos == 0) {
return "/";
}
dirname = dirname.substr(0, pos);
}
return dirname;
}
bool srs_avc_startswith_annexb(SrsStream* stream, int* pnb_start_code)
{
char* bytes = stream->data() + stream->pos();