mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 22:40:18 +00:00
capabilities: Use std::quoted to escape quotes in strings
This commit is contained in:
12
src/host.cpp
12
src/host.cpp
@@ -342,8 +342,8 @@ void print_capabilities(struct module *root, bool use_vidcap)
|
||||
for (int i = 0; i < count; ++i) {
|
||||
cout << "[capability][device][v2] {"
|
||||
"\"purpose\":\"video_disp\", "
|
||||
"\"type\":\"" << devices[i].id << "\", "
|
||||
"\"name\":\"" << devices[i].name << "\", "
|
||||
"\"type\":" << std::quoted(devices[i].id) << ", "
|
||||
"\"name\":" << std::quoted(devices[i].name) << ", "
|
||||
"\"repeatable\":\"" << devices[i].repeatable << "\"}\n";
|
||||
}
|
||||
deleter ? deleter(devices) : free(devices);
|
||||
@@ -361,8 +361,8 @@ void print_capabilities(struct module *root, bool use_vidcap)
|
||||
for (int i = 0; i < count; ++i) {
|
||||
cout << "[capability][device][v2] {"
|
||||
"\"purpose\":\"audio_cap\", "
|
||||
"\"type\":\"" << devices[i].id << "\", "
|
||||
"\"name\":\"" << devices[i].name << "\"}\n";
|
||||
"\"type\":" << std::quoted(devices[i].id) << ", "
|
||||
"\"name\":" << std::quoted(devices[i].name) << "}\n";
|
||||
}
|
||||
free(devices);
|
||||
}
|
||||
@@ -379,8 +379,8 @@ void print_capabilities(struct module *root, bool use_vidcap)
|
||||
for (int i = 0; i < count; ++i) {
|
||||
cout << "[capability][device][v2] {"
|
||||
"\"purpose\":\"audio_play\", "
|
||||
"\"type\":\"" << devices[i].id << "\", "
|
||||
"\"name\":\"" << devices[i].name << "\"}\n";
|
||||
"\"type\":" << std::quoted(devices[i].id) << ", "
|
||||
"\"name\":" << std::quoted(devices[i].name) << "}\n";
|
||||
}
|
||||
free(devices);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user