mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #367, support nginx-rtmp exec. 3.0.1
This commit is contained in:
parent
7de181004f
commit
c34b0c86e1
25 changed files with 519 additions and 14 deletions
|
@ -35,6 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
#include <srs_kernel_log.hpp>
|
||||
|
@ -284,6 +285,25 @@ bool srs_string_contains(string str, string flag)
|
|||
return str.find(flag) != string::npos;
|
||||
}
|
||||
|
||||
vector<string> srs_string_split(string str, string flag)
|
||||
{
|
||||
vector<string> arr;
|
||||
|
||||
size_t pos;
|
||||
string s = str;
|
||||
|
||||
while ((pos = s.find(flag)) != string::npos) {
|
||||
arr.push_back(s.substr(0, pos));
|
||||
s = s.substr(pos + 1);
|
||||
}
|
||||
|
||||
if (!s.empty()) {
|
||||
arr.push_back(s);
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
int srs_do_create_dir_recursively(string dir)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue