From c4b5cf39f03f336cba4d35373e4266fbf22dcc3b Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 13 Dec 2012 08:31:24 +0100 Subject: [PATCH] Added non-detected connector/protocol capabilities, to be updated with an autodetected version later. --- src/controller.cpp | 3 +++ src/controller_capabilities.cpp | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/src/controller.cpp b/src/controller.cpp index d6003c44..a904cf75 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -375,6 +375,9 @@ int main(int argc, char ** argv){ if (Request.isMember("streams")){ Controller::CheckStreams(Request["streams"], Controller::Storage["streams"]); } + if (Request.isMember("capabilities")){ + Controller::checkCapable(Response["capabilities"]); + } if (Request.isMember("save")){ Controller::WriteFile("config.json", Controller::Storage.toString()); Controller::Log("CONF", "Config written to file on request through API"); diff --git a/src/controller_capabilities.cpp b/src/controller_capabilities.cpp index d63d046a..c51fb5e7 100644 --- a/src/controller_capabilities.cpp +++ b/src/controller_capabilities.cpp @@ -148,6 +148,45 @@ namespace Controller { capa["load"]["fifteen"] = (long long int)(onemin * 100); } } + + //list available protocols and report about them + capa["connectors"]["RTMP"]["desc"] = "Enables the RTMP protocol which is used by Adobe Flash Player."; + capa["connectors"]["RTMP"]["deps"] = ""; + capa["connectors"]["RTMP"]["optional"]["port"]["name"] = "TCP port"; + capa["connectors"]["RTMP"]["optional"]["port"]["help"] = "TCP port to listen on - default if unprovided is 1935"; + capa["connectors"]["RTMP"]["optional"]["port"]["type"] = "uint"; + capa["connectors"]["RTMP"]["optional"]["interface"]["name"] = "Interface"; + capa["connectors"]["RTMP"]["optional"]["interface"]["help"] = "Address of the interface to listen on - default if unprovided is all interfaces"; + capa["connectors"]["RTMP"]["optional"]["interface"]["type"] = "str"; + capa["connectors"]["RTMP"]["optional"]["username"]["name"] = "Username"; + capa["connectors"]["RTMP"]["optional"]["username"]["help"] = "Username to drop privileges to - default if unprovided means do not drop privileges"; + capa["connectors"]["RTMP"]["optional"]["username"]["type"] = "str"; + capa["connectors"]["HTTP"]["desc"] = "Enables the generic HTTP listener, required by all other HTTP protocols. Needs other HTTP protocols enabled to do much of anything."; + capa["connectors"]["HTTP"]["deps"] = ""; + capa["connectors"]["HTTP"]["optional"]["port"]["name"] = "TCP port"; + capa["connectors"]["HTTP"]["optional"]["port"]["help"] = "TCP port to listen on - default if unprovided is 8080"; + capa["connectors"]["HTTP"]["optional"]["port"]["type"] = "uint"; + capa["connectors"]["HTTP"]["optional"]["interface"]["name"] = "Interface"; + capa["connectors"]["HTTP"]["optional"]["interface"]["help"] = "Address of the interface to listen on - default if unprovided is all interfaces"; + capa["connectors"]["HTTP"]["optional"]["interface"]["type"] = "str"; + capa["connectors"]["HTTP"]["optional"]["username"]["name"] = "Username"; + capa["connectors"]["HTTP"]["optional"]["username"]["help"] = "Username to drop privileges to - default if unprovided means do not drop privileges"; + capa["connectors"]["HTTP"]["optional"]["username"]["type"] = "str"; + capa["connectors"]["HTTPProgressive"]["desc"] = "Enables HTTP protocol progressive streaming."; + capa["connectors"]["HTTPProgressive"]["deps"] = "HTTP"; + capa["connectors"]["HTTPProgressive"]["optional"]["username"]["name"] = "Username"; + capa["connectors"]["HTTPProgressive"]["optional"]["username"]["help"] = "Username to drop privileges to - default if unprovided means do not drop privileges"; + capa["connectors"]["HTTPProgressive"]["optional"]["username"]["type"] = "str"; + capa["connectors"]["HTTPDynamic"]["desc"] = "Enables HTTP protocol Adobe-specific dynamic streaming (aka HDS)."; + capa["connectors"]["HTTPDynamic"]["deps"] = "HTTP"; + capa["connectors"]["HTTPDynamic"]["optional"]["username"]["name"] = "Username"; + capa["connectors"]["HTTPDynamic"]["optional"]["username"]["help"] = "Username to drop privileges to - default if unprovided means do not drop privileges"; + capa["connectors"]["HTTPDynamic"]["optional"]["username"]["type"] = "str"; + capa["connectors"]["HTTPSmooth"]["desc"] = "Enables HTTP protocol MicroSoft-specific smooth streaming through silverlight."; + capa["connectors"]["HTTPSmooth"]["deps"] = "HTTP"; + capa["connectors"]["HTTPSmooth"]["optional"]["username"]["name"] = "Username"; + capa["connectors"]["HTTPSmooth"]["optional"]["username"]["help"] = "Username to drop privileges to - default if unprovided means do not drop privileges"; + capa["connectors"]["HTTPSmooth"]["optional"]["username"]["type"] = "str"; } }