webrtc: allow to specify ice-servers on command line

This commit is contained in:
Kamil Trzcinski
2023-06-02 11:09:46 +02:00
parent 589c5fa602
commit e8ffe47343
6 changed files with 30 additions and 1 deletions

15
util/opts/helpers.hh Normal file
View File

@ -0,0 +1,15 @@
#pragma once
#include <string>
#include <vector>
#include <sstream>
inline std::vector<std::string> str_split(const std::string& in, const char seperator)
{
std::vector<std::string> output;
std::istringstream stream(in);
for (std::string s; std::getline(stream, s, seperator); ) {
output.push_back(s);
}
return output;
}

View File

@ -26,6 +26,7 @@ typedef struct options_s {
const char *description;
} option_t;
#define OPTION_VALUE_LIST_SEP_CHAR ';'
#define OPTION_VALUE_LIST_SEP ";"
#define OPTION_FORMAT_uint "%u"