MjpegServer: Add ability to set compression, etc in code (#1229)

This allows code to set the stream compression, resolution, and FPS used if
not specified in HTTP parameters by the client.
This commit is contained in:
Peter Johnson
2018-07-27 23:00:15 -07:00
committed by GitHub
parent 9398278250
commit 932308b497
6 changed files with 160 additions and 13 deletions

View File

@@ -78,6 +78,10 @@ class PropertyContainer {
}
return ndx;
}
template <typename NewFunc>
int CreateProperty(wpi::StringRef name, NewFunc newFunc) {
return CreateOrUpdateProperty(name, newFunc, [](PropertyImpl&) {});
}
// Create an "empty" property. This is called by GetPropertyIndex to create
// properties that don't exist (as GetPropertyIndex can't fail).