summaryrefslogtreecommitdiff
path: root/cmps/main.cc
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-08-04 11:10:44 +0200
committergeronimo <geronimo013@gmx.de>2012-08-04 11:10:44 +0200
commite8175c7b23047fefd52f85afe05e2864b2a9bba8 (patch)
tree8dab4e287545805d173a6c8e297c1798a1a01599 /cmps/main.cc
parentc7d67f443bdfe842c2e356d4edbe345338e3e08d (diff)
downloadcmp-e8175c7b23047fefd52f85afe05e2864b2a9bba8.tar.gz
cmp-e8175c7b23047fefd52f85afe05e2864b2a9bba8.tar.bz2
created new icons to enable visual feedback on mediatype selection, changed json-parser and enabled virtual mediatype usage
Diffstat (limited to 'cmps/main.cc')
-rw-r--r--cmps/main.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/cmps/main.cc b/cmps/main.cc
index a5d2b04..e1be73c 100644
--- a/cmps/main.cc
+++ b/cmps/main.cc
@@ -29,6 +29,7 @@
#include <MediaFactory.h>
#include <MediaListHandler.h>
#include <MediaFileHandler.h>
+#include <MediaServerConfig.h>
#include <ConnectionHandler.h>
#include <CommandHandler.h>
#include <JSonListAssembler.h>
@@ -56,10 +57,23 @@ static int refreshScanner(void *opaque, cHTTPRequest &Request)
return -1;
}
+static void appID(void)
+{
+ fprintf(stderr, "\ncmps - the backend of CMP (compound media player)\n");
+}
+
+static void appInfo(void)
+{
+ appID();
+ fprintf(stderr, " is a streaming- and HTTP-server\n");
+ fprintf(stderr, " (c) 2012 - Reinhard Mantey - some rights reserved.\n");
+ fprintf(stderr, " CMP is published as open source under Creative Commons by-sa\n\n");
+}
+
static void usage(void)
{
- fprintf(stderr, "cmps - the backend of CMP (compound media player)\n");
- fprintf(stderr, " is streaming- and HTTP-server and accepts these commandline options:\n");
+ appID();
+ fprintf(stderr, " is streaming- and HTTP-server and accepts these commandline options:\n");
fprintf(stderr, "-h, --help the help, you are reading\n");
fprintf(stderr, "-d, --appDir <path> the directory, where the server may write config files\n");
fprintf(stderr, " (default is /var/lib/cmp)\n");
@@ -107,7 +121,8 @@ static void setup(int argc, char *argv[], cServerConfig &config)
int main(int argc, char** argv)
{
- cServerConfig config("/var/lib/cmp");
+ appInfo();
+ cMediaServerConfig config("/var/lib/cmp");
setup(argc, argv, config);
cFSMediaScanner *scanner = new cFSMediaScanner();
@@ -142,11 +157,13 @@ int main(int argc, char** argv)
* register/enable internal commands
*/
cCommandHandler::RegisterCallback("refresh", refreshScanner, scanner);
+ fprintf(stderr, "start searching for media at %s\n", config.DocumentRoot());
scanner->Refresh();
/*
* now start the server
*/
+ fprintf(stderr, "ok, ready for client connections.\n");
if (!server->Start()) {
fprintf(stderr, "failed to start application (3)");
exit(-3);