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:
bicarus
2026-08-22 19:38:48 -07:00
committed by GitHub
parent d51de976b1
commit 95f10ed733
15 changed files with 280 additions and 6 deletions
+14
View File
@@ -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;
}
}