mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 15:46:42 +02:00
json rpc basics
This commit is contained in:
parent
1b579ed2a6
commit
6121fdceae
6 changed files with 120 additions and 73 deletions
|
@ -31,6 +31,7 @@
|
|||
#include "encoder/encoderFactory.h"
|
||||
#include "streamServer.h"
|
||||
#include "publishAvahi.h"
|
||||
#include "config.h"
|
||||
|
||||
|
||||
bool g_terminated = false;
|
||||
|
@ -53,6 +54,7 @@ int main(int argc, char* argv[])
|
|||
po::options_description desc("Allowed options");
|
||||
desc.add_options()
|
||||
("help,h", "produce help message")
|
||||
("test", "for testing")
|
||||
("version,v", "show version number")
|
||||
("port,p", po::value<size_t>(&settings.port)->default_value(settings.port), "server port")
|
||||
("sampleformat,s", po::value<string>(&sampleFormat)->default_value(settings.sampleFormat.getFormat()), "sample format")
|
||||
|
@ -67,6 +69,12 @@ int main(int argc, char* argv[])
|
|||
po::store(po::parse_command_line(argc, argv, desc), vm);
|
||||
po::notify(vm);
|
||||
|
||||
if (vm.count("test"))
|
||||
{
|
||||
Config::instance().test();
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (vm.count("help"))
|
||||
{
|
||||
cout << desc << "\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue