api: get_streams (#886)
## Link to GitHub Issue or related Pull Request, if one exists #0 ## Description of change MSE method of streaming video needs the dimensions up front. This new api delivers that. Also provides an easier way to determine which screens are available and a way to discover port number. ## Testing See pending changes in substream project
This commit is contained in:
@@ -67,4 +67,18 @@ namespace api {
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<std::pair<std::string, std::string>> stream_formats() {
|
||||
std::vector<std::pair<std::string, std::string>> formats;
|
||||
|
||||
#ifdef SPICE_JPEG
|
||||
formats.emplace_back("mjpeg", "/stream.mjpg");
|
||||
#endif
|
||||
|
||||
#ifdef SPICE_H264
|
||||
formats.emplace_back("h264", "/stream.h264");
|
||||
#endif
|
||||
|
||||
return formats;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user