summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeronimo <geronimo013@gmx.de>2012-08-01 15:29:31 (GMT)
committergeronimo <geronimo013@gmx.de>2012-08-01 15:29:31 (GMT)
commitcca6e883c8141c3a67c3c5b232ce0c9b18e7fd59 (patch)
tree7149351cb466316771ab0ce0bd4ea64b2ba17aa1
parent76c51473ee29a9103201618c8dbbc11fe9b7149e (diff)
downloadcmp-cca6e883c8141c3a67c3c5b232ce0c9b18e7fd59.tar.gz
cmp-cca6e883c8141c3a67c3c5b232ce0c9b18e7fd59.tar.bz2
added mediatypes for interlaced video and selective configuration of deepscan
-rw-r--r--cmps/nbproject/Makefile-Debug.mk64
-rw-r--r--cmps/nbproject/Makefile-Release.mk14
-rw-r--r--cmps/nbproject/configurations.xml34
-rw-r--r--cmps/serverlib/include/MediaServerConfig.h39
-rw-r--r--cmps/serverlib/nbproject/Makefile-Debug.mk20
-rw-r--r--cmps/serverlib/nbproject/Makefile-Release.mk20
-rw-r--r--cmps/serverlib/nbproject/configurations.xml2
-rw-r--r--cmps/serverlib/src/MediaServerConfig.cc128
-rw-r--r--cmps/tests/CredentialPersistence.cc103
-rw-r--r--cmps/tests/FScanTest.cc46
-rw-r--r--cmps/tests/MetaScanTest.cc54
-rw-r--r--libs/IO/include/CommandReader.h1
-rw-r--r--libs/IO/nbproject/Makefile-Debug.mk16
-rw-r--r--libs/IO/nbproject/Makefile-Release.mk16
-rw-r--r--libs/IO/src/CommandReader.cc42
-rw-r--r--libs/IO/src/Reader.cc4
-rw-r--r--libs/mediaScan/include/AbstractMedia.h12
-rw-r--r--libs/mediaScan/include/AbstractMultiFileMovie.h7
-rw-r--r--libs/mediaScan/include/Audio.h1
-rw-r--r--libs/mediaScan/include/DVDImage.h4
-rw-r--r--libs/mediaScan/include/LegacyVdrRecording.h4
-rw-r--r--libs/mediaScan/include/MediainfoReader.h4
-rw-r--r--libs/mediaScan/include/Movie.h2
-rw-r--r--libs/mediaScan/include/Picture.h3
-rw-r--r--libs/mediaScan/include/VdrRecording.h4
-rw-r--r--libs/mediaScan/nbproject/Makefile-Debug.mk22
-rw-r--r--libs/mediaScan/nbproject/Makefile-Release.mk22
-rw-r--r--libs/mediaScan/src/AbstractMedia.cc58
-rw-r--r--libs/mediaScan/src/AbstractMultiFileMovie.cc8
-rw-r--r--libs/mediaScan/src/Audio.cc10
-rw-r--r--libs/mediaScan/src/DVDImage.cc17
-rw-r--r--libs/mediaScan/src/FSMediaScanner.cc18
-rw-r--r--libs/mediaScan/src/LegacyVdrRecording.cc17
-rw-r--r--libs/mediaScan/src/MediaFactory.cc19
-rw-r--r--libs/mediaScan/src/MediainfoReader.cc16
-rw-r--r--libs/mediaScan/src/Movie.cc18
-rw-r--r--libs/mediaScan/src/Picture.cc11
-rw-r--r--libs/mediaScan/src/VdrRecording.cc17
-rw-r--r--libs/networking/include/ServerConfig.h2
-rw-r--r--libs/networking/nbproject/Makefile-Debug.mk36
-rw-r--r--libs/networking/nbproject/Makefile-Release.mk36
-rw-r--r--libs/networking/src/ServerConfig.cc70
-rw-r--r--libs/util/nbproject/Makefile-Debug.mk20
-rw-r--r--libs/util/nbproject/Makefile-Release.mk20
-rw-r--r--libs/vdr/nbproject/Makefile-Debug.mk22
-rw-r--r--libs/vdr/nbproject/Makefile-Release.mk22
46 files changed, 838 insertions, 287 deletions
diff --git a/cmps/nbproject/Makefile-Debug.mk b/cmps/nbproject/Makefile-Debug.mk
index 612b14e..af8aa89 100644
--- a/cmps/nbproject/Makefile-Debug.mk
+++ b/cmps/nbproject/Makefile-Debug.mk
@@ -42,12 +42,13 @@ TESTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tests
# Test Files
TESTFILES= \
- ${TESTDIR}/TestFiles/f1 \
- ${TESTDIR}/TestFiles/f3 \
- ${TESTDIR}/TestFiles/f5 \
- ${TESTDIR}/TestFiles/f2 \
- ${TESTDIR}/TestFiles/f4 \
- ${TESTDIR}/TestFiles/f6
+ ${TESTDIR}/TestFiles/codecTest \
+ ${TESTDIR}/TestFiles/connectionHandlerTest \
+ ${TESTDIR}/TestFiles/fileSystemTest \
+ ${TESTDIR}/TestFiles/fsScanTest \
+ ${TESTDIR}/TestFiles/jsonTest \
+ ${TESTDIR}/TestFiles/metaScanTest \
+ ${TESTDIR}/TestFiles/stringBuilderTest
# C Compiler Flags
CFLAGS=
@@ -63,7 +64,7 @@ FFLAGS=
ASFLAGS=
# Link Libraries and Options
-LDLIBSOPTIONS=serverlib/dist/Debug/GNU-Linux-x86/libserverlib.a ../libs/mediaScan/dist/Debug/GNU-Linux-x86/libmediascan.a ../libs/networking/dist/Debug/GNU-Linux-x86/libnetworking.a ../libs/IO/dist/Debug/GNU-Linux-x86/libio.a ../libs/util/dist/Debug/GNU-Linux-x86/libutil.a ../libs/vdr/dist/Debug/GNU-Linux-x86/libvdr.a -lpthread -lrt -lssl -lpcrecpp
+LDLIBSOPTIONS=serverlib/dist/Debug/GNU-Linux-x86/libserverlib.a ../libs/mediaScan/dist/Debug/GNU-Linux-x86/libmediascan.a ../libs/networking/dist/Debug/GNU-Linux-x86/libnetworking.a ../libs/IO/dist/Debug/GNU-Linux-x86/libio.a ../libs/util/dist/Debug/GNU-Linux-x86/libutil.a ../libs/vdr/dist/Debug/GNU-Linux-x86/libvdr.a -lpthread -lrt -lssl -lpcrecpp -lmediainfo
# Build Targets
.build-conf: ${BUILD_SUBPROJECTS}
@@ -85,7 +86,7 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps ${OBJECTFILES} ${LDLIBSOPTIONS}
-${OBJECTDIR}/main.o: main.cc
+${OBJECTDIR}/main.o: nbproject/Makefile-${CND_CONF}.mk main.cc
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -Iserverlib/include -I../libs/mediaScan/include -I../libs/networking/include -I../libs/IO/include -I../libs/util/include -I../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.cc
@@ -106,29 +107,33 @@ ${OBJECTDIR}/main.o: main.cc
# Build Test Targets
.build-tests-conf: .build-conf ${TESTFILES}
-${TESTDIR}/TestFiles/f1: ${TESTDIR}/tests/CodecTest.o ${OBJECTFILES:%.o=%_nomain.o}
+${TESTDIR}/TestFiles/codecTest: ${TESTDIR}/tests/CodecTest.o ${OBJECTFILES:%.o=%_nomain.o}
${MKDIR} -p ${TESTDIR}/TestFiles
- ${LINK.cc} -o ${TESTDIR}/TestFiles/f1 $^ ${LDLIBSOPTIONS}
+ ${LINK.cc} -o ${TESTDIR}/TestFiles/codecTest $^ ${LDLIBSOPTIONS}
-${TESTDIR}/TestFiles/f3: ${TESTDIR}/tests/ConnectionHandlerTest.o ${OBJECTFILES:%.o=%_nomain.o}
+${TESTDIR}/TestFiles/connectionHandlerTest: ${TESTDIR}/tests/ConnectionHandlerTest.o ${OBJECTFILES:%.o=%_nomain.o}
${MKDIR} -p ${TESTDIR}/TestFiles
- ${LINK.cc} -o ${TESTDIR}/TestFiles/f3 $^ ${LDLIBSOPTIONS}
+ ${LINK.cc} -o ${TESTDIR}/TestFiles/connectionHandlerTest $^ ${LDLIBSOPTIONS}
-${TESTDIR}/TestFiles/f5: ${TESTDIR}/tests/FileSystemTest.o ${OBJECTFILES:%.o=%_nomain.o}
+${TESTDIR}/TestFiles/fileSystemTest: ${TESTDIR}/tests/FileSystemTest.o ${OBJECTFILES:%.o=%_nomain.o}
${MKDIR} -p ${TESTDIR}/TestFiles
- ${LINK.cc} -o ${TESTDIR}/TestFiles/f5 $^ ${LDLIBSOPTIONS}
+ ${LINK.cc} -o ${TESTDIR}/TestFiles/fileSystemTest $^ ${LDLIBSOPTIONS}
-${TESTDIR}/TestFiles/f2: ${TESTDIR}/tests/FScanTest.o ${OBJECTFILES:%.o=%_nomain.o}
+${TESTDIR}/TestFiles/fsScanTest: ${TESTDIR}/tests/FScanTest.o ${OBJECTFILES:%.o=%_nomain.o}
${MKDIR} -p ${TESTDIR}/TestFiles
- ${LINK.cc} -o ${TESTDIR}/TestFiles/f2 $^ ${LDLIBSOPTIONS}
+ ${LINK.cc} -o ${TESTDIR}/TestFiles/fsScanTest $^ ${LDLIBSOPTIONS}
-${TESTDIR}/TestFiles/f4: ${TESTDIR}/tests/JSonTest.o ${OBJECTFILES:%.o=%_nomain.o}
+${TESTDIR}/TestFiles/jsonTest: ${TESTDIR}/tests/JSonTest.o ${OBJECTFILES:%.o=%_nomain.o}
${MKDIR} -p ${TESTDIR}/TestFiles
- ${LINK.cc} -o ${TESTDIR}/TestFiles/f4 $^ ${LDLIBSOPTIONS}
+ ${LINK.cc} -o ${TESTDIR}/TestFiles/jsonTest $^ ${LDLIBSOPTIONS}
-${TESTDIR}/TestFiles/f6: ${TESTDIR}/tests/MetaScanTest.o ${OBJECTFILES:%.o=%_nomain.o}
+${TESTDIR}/TestFiles/metaScanTest: ${TESTDIR}/tests/MetaScanTest.o ${OBJECTFILES:%.o=%_nomain.o}
${MKDIR} -p ${TESTDIR}/TestFiles
- ${LINK.cc} -o ${TESTDIR}/TestFiles/f6 $^ ${LDLIBSOPTIONS}
+ ${LINK.cc} -o ${TESTDIR}/TestFiles/metaScanTest $^ ${LDLIBSOPTIONS}
+
+${TESTDIR}/TestFiles/stringBuilderTest: ${TESTDIR}/tests/StringBuilderTest.o ${OBJECTFILES:%.o=%_nomain.o}
+ ${MKDIR} -p ${TESTDIR}/TestFiles
+ ${LINK.cc} -o ${TESTDIR}/TestFiles/stringBuilderTest $^ ${LDLIBSOPTIONS}
${TESTDIR}/tests/CodecTest.o: tests/CodecTest.cc
@@ -167,6 +172,12 @@ ${TESTDIR}/tests/MetaScanTest.o: tests/MetaScanTest.cc
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -Iserverlib/include -I../libs/mediaScan/include -I../libs/networking/include -I../libs/IO/include -I../libs/util/include -I../libs/vdr/include -I. -MMD -MP -MF $@.d -o ${TESTDIR}/tests/MetaScanTest.o tests/MetaScanTest.cc
+${TESTDIR}/tests/StringBuilderTest.o: tests/StringBuilderTest.cc
+ ${MKDIR} -p ${TESTDIR}/tests
+ ${RM} $@.d
+ $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -Iserverlib/include -I../libs/mediaScan/include -I../libs/networking/include -I../libs/IO/include -I../libs/util/include -I../libs/vdr/include -I. -MMD -MP -MF $@.d -o ${TESTDIR}/tests/StringBuilderTest.o tests/StringBuilderTest.cc
+
+
${OBJECTDIR}/main_nomain.o: ${OBJECTDIR}/main.o main.cc
${MKDIR} -p ${OBJECTDIR}
@NMOUTPUT=`${NM} ${OBJECTDIR}/main.o`; \
@@ -184,12 +195,13 @@ ${OBJECTDIR}/main_nomain.o: ${OBJECTDIR}/main.o main.cc
.test-conf:
@if [ "${TEST}" = "" ]; \
then \
- ${TESTDIR}/TestFiles/f1 || true; \
- ${TESTDIR}/TestFiles/f3 || true; \
- ${TESTDIR}/TestFiles/f5 || true; \
- ${TESTDIR}/TestFiles/f2 || true; \
- ${TESTDIR}/TestFiles/f4 || true; \
- ${TESTDIR}/TestFiles/f6 || true; \
+ ${TESTDIR}/TestFiles/codecTest || true; \
+ ${TESTDIR}/TestFiles/connectionHandlerTest || true; \
+ ${TESTDIR}/TestFiles/fileSystemTest || true; \
+ ${TESTDIR}/TestFiles/fsScanTest || true; \
+ ${TESTDIR}/TestFiles/jsonTest || true; \
+ ${TESTDIR}/TestFiles/metaScanTest || true; \
+ ${TESTDIR}/TestFiles/stringBuilderTest || true; \
else \
./${TEST} || true; \
fi
diff --git a/cmps/nbproject/Makefile-Release.mk b/cmps/nbproject/Makefile-Release.mk
index c4c3c75..4232298 100644
--- a/cmps/nbproject/Makefile-Release.mk
+++ b/cmps/nbproject/Makefile-Release.mk
@@ -47,6 +47,7 @@ TESTFILES= \
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \
+ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps \
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps
# C Compiler Flags
@@ -73,7 +74,7 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps: ${OBJECTFILES}
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps ${OBJECTFILES} ${LDLIBSOPTIONS}
-${OBJECTDIR}/main.o: main.cc
+${OBJECTDIR}/main.o: nbproject/Makefile-${CND_CONF}.mk main.cc
${MKDIR} -p ${OBJECTDIR}
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.cc
@@ -107,6 +108,10 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps: ${TESTDIR}/tests/MetaScanTest.o
${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps $^ ${LDLIBSOPTIONS}
+${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps: ${TESTDIR}/tests/StringBuilderTest.o ${OBJECTFILES:%.o=%_nomain.o}
+ ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}
+ ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps $^ ${LDLIBSOPTIONS}
+
${TESTDIR}/tests/CodecTest.o: tests/CodecTest.cc
${MKDIR} -p ${TESTDIR}/tests
@@ -144,6 +149,12 @@ ${TESTDIR}/tests/MetaScanTest.o: tests/MetaScanTest.cc
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${TESTDIR}/tests/MetaScanTest.o tests/MetaScanTest.cc
+${TESTDIR}/tests/StringBuilderTest.o: tests/StringBuilderTest.cc
+ ${MKDIR} -p ${TESTDIR}/tests
+ ${RM} $@.d
+ $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${TESTDIR}/tests/StringBuilderTest.o tests/StringBuilderTest.cc
+
+
${OBJECTDIR}/main_nomain.o: ${OBJECTDIR}/main.o main.cc
${MKDIR} -p ${OBJECTDIR}
@NMOUTPUT=`${NM} ${OBJECTDIR}/main.o`; \
@@ -167,6 +178,7 @@ ${OBJECTDIR}/main_nomain.o: ${OBJECTDIR}/main.o main.cc
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \
${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \
+ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/cmps || true; \
else \
./${TEST} || true; \
fi
diff --git a/cmps/nbproject/configurations.xml b/cmps/nbproject/configurations.xml
index ba892d1..8f12212 100644
--- a/cmps/nbproject/configurations.xml
+++ b/cmps/nbproject/configurations.xml
@@ -51,6 +51,12 @@
kind="TEST">
<itemPath>tests/MetaScanTest.cc</itemPath>
</logicalFolder>
+ <logicalFolder name="f7"
+ displayName="StringBuilderTest"
+ projectFiles="true"
+ kind="TEST">
+ <itemPath>tests/StringBuilderTest.cc</itemPath>
+ </logicalFolder>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
@@ -164,6 +170,7 @@
<linkerLibLibItem>rt</linkerLibLibItem>
<linkerLibLibItem>ssl</linkerLibLibItem>
<linkerLibLibItem>pcrecpp</linkerLibLibItem>
+ <linkerLibLibItem>mediainfo</linkerLibLibItem>
</linkerLibItems>
</linkerTool>
<requiredProjects>
@@ -241,7 +248,7 @@
</incDir>
</ccTool>
<linkerTool>
- <output>${TESTDIR}/TestFiles/f1</output>
+ <output>${TESTDIR}/TestFiles/codecTest</output>
</linkerTool>
</folder>
<folder path="TestFiles/f2">
@@ -256,7 +263,7 @@
</incDir>
</ccTool>
<linkerTool>
- <output>${TESTDIR}/TestFiles/f2</output>
+ <output>${TESTDIR}/TestFiles/fsScanTest</output>
</linkerTool>
</folder>
<folder path="TestFiles/f3">
@@ -271,7 +278,7 @@
</incDir>
</ccTool>
<linkerTool>
- <output>${TESTDIR}/TestFiles/f3</output>
+ <output>${TESTDIR}/TestFiles/connectionHandlerTest</output>
</linkerTool>
</folder>
<folder path="TestFiles/f4">
@@ -286,7 +293,7 @@
</incDir>
</ccTool>
<linkerTool>
- <output>${TESTDIR}/TestFiles/f4</output>
+ <output>${TESTDIR}/TestFiles/jsonTest</output>
</linkerTool>
</folder>
<folder path="TestFiles/f5">
@@ -301,7 +308,7 @@
</incDir>
</ccTool>
<linkerTool>
- <output>${TESTDIR}/TestFiles/f5</output>
+ <output>${TESTDIR}/TestFiles/fileSystemTest</output>
</linkerTool>
</folder>
<folder path="TestFiles/f6">
@@ -316,7 +323,22 @@
</incDir>
</ccTool>
<linkerTool>
- <output>${TESTDIR}/TestFiles/f6</output>
+ <output>${TESTDIR}/TestFiles/metaScanTest</output>
+ </linkerTool>
+ </folder>
+ <folder path="TestFiles/f7">
+ <cTool>
+ <incDir>
+ <pElem>.</pElem>
+ </incDir>
+ </cTool>
+ <ccTool>
+ <incDir>
+ <pElem>.</pElem>
+ </incDir>
+ </ccTool>
+ <linkerTool>
+ <output>${TESTDIR}/TestFiles/stringBuilderTest</output>
</linkerTool>
</folder>
</conf>
diff --git a/cmps/serverlib/include/MediaServerConfig.h b/cmps/serverlib/include/MediaServerConfig.h
new file mode 100644
index 0000000..9e07ea3
--- /dev/null
+++ b/cmps/serverlib/include/MediaServerConfig.h
@@ -0,0 +1,39 @@
+/**
+ * ======================== legal notice ======================
+ *
+ * File: MediaServerConfig.h
+ * Created: 1. August 2012, 10:58
+ * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
+ * Project: cmps - the backend (server) part of compound media player
+ *
+ * CMP - compound media player
+ *
+ * is a client/server mediaplayer intended to play any media from any workstation
+ * without the need to export or mount shares. cmps is an easy to use backend
+ * with a (ready to use) HTML-interface. Additionally the backend supports
+ * authentication via HTTP-digest authorization.
+ * cmpc is a client with vdr-like osd-menues.
+ *
+ * Copyright (c) 2012 Reinhard Mantey, some rights reserved!
+ * published under Creative Commons by-sa
+ * For details see http://creativecommons.org/licenses/by-sa/3.0/
+ *
+ * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp
+ *
+ * --------------------------------------------------------------
+ */
+#ifndef MEDIASERVERCONFIG_H
+#define MEDIASERVERCONFIG_H
+
+#include <ServerConfig.h>
+
+class cMediaServerConfig : public cServerConfig {
+public:
+ cMediaServerConfig(const char *ConfigBaseDir);
+ virtual ~cMediaServerConfig();
+
+ virtual bool Eval(cConfigReader::ConfigEntry *Entry);
+ };
+
+#endif /* MEDIASERVERCONFIG_H */
+
diff --git a/cmps/serverlib/nbproject/Makefile-Debug.mk b/cmps/serverlib/nbproject/Makefile-Debug.mk
index 9b947b0..96d3da9 100644
--- a/cmps/serverlib/nbproject/Makefile-Debug.mk
+++ b/cmps/serverlib/nbproject/Makefile-Debug.mk
@@ -36,6 +36,7 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/src/JSonListAssembler.o \
+ ${OBJECTDIR}/src/MediaServerConfig.o \
${OBJECTDIR}/src/CommandHandler.o \
${OBJECTDIR}/src/HTMLListAssembler.o \
${OBJECTDIR}/src/AbstractMediaRequestHandler.o \
@@ -70,37 +71,42 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libserverlib.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libserverlib.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libserverlib.a
-${OBJECTDIR}/src/JSonListAssembler.o: src/JSonListAssembler.cc
+${OBJECTDIR}/src/JSonListAssembler.o: nbproject/Makefile-${CND_CONF}.mk src/JSonListAssembler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/JSonListAssembler.o src/JSonListAssembler.cc
-${OBJECTDIR}/src/CommandHandler.o: src/CommandHandler.cc
+${OBJECTDIR}/src/MediaServerConfig.o: nbproject/Makefile-${CND_CONF}.mk src/MediaServerConfig.cc
+ ${MKDIR} -p ${OBJECTDIR}/src
+ ${RM} $@.d
+ $(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaServerConfig.o src/MediaServerConfig.cc
+
+${OBJECTDIR}/src/CommandHandler.o: nbproject/Makefile-${CND_CONF}.mk src/CommandHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CommandHandler.o src/CommandHandler.cc
-${OBJECTDIR}/src/HTMLListAssembler.o: src/HTMLListAssembler.cc
+${OBJECTDIR}/src/HTMLListAssembler.o: nbproject/Makefile-${CND_CONF}.mk src/HTMLListAssembler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTMLListAssembler.o src/HTMLListAssembler.cc
-${OBJECTDIR}/src/AbstractMediaRequestHandler.o: src/AbstractMediaRequestHandler.cc
+${OBJECTDIR}/src/AbstractMediaRequestHandler.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractMediaRequestHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMediaRequestHandler.o src/AbstractMediaRequestHandler.cc
-${OBJECTDIR}/src/HTTPMediaResponse.o: src/HTTPMediaResponse.cc
+${OBJECTDIR}/src/HTTPMediaResponse.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPMediaResponse.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPMediaResponse.o src/HTTPMediaResponse.cc
-${OBJECTDIR}/src/MediaListHandler.o: src/MediaListHandler.cc
+${OBJECTDIR}/src/MediaListHandler.o: nbproject/Makefile-${CND_CONF}.mk src/MediaListHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaListHandler.o src/MediaListHandler.cc
-${OBJECTDIR}/src/MediaFileHandler.o: src/MediaFileHandler.cc
+${OBJECTDIR}/src/MediaFileHandler.o: nbproject/Makefile-${CND_CONF}.mk src/MediaFileHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../../libs/mediaScan/include -I../../libs/networking/include -I../../libs/IO/include -I../../libs/util/include -I../../libs/vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaFileHandler.o src/MediaFileHandler.cc
diff --git a/cmps/serverlib/nbproject/Makefile-Release.mk b/cmps/serverlib/nbproject/Makefile-Release.mk
index 55f83a2..4ba9a41 100644
--- a/cmps/serverlib/nbproject/Makefile-Release.mk
+++ b/cmps/serverlib/nbproject/Makefile-Release.mk
@@ -36,6 +36,7 @@ OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}
# Object Files
OBJECTFILES= \
${OBJECTDIR}/src/JSonListAssembler.o \
+ ${OBJECTDIR}/src/MediaServerConfig.o \
${OBJECTDIR}/src/CommandHandler.o \
${OBJECTDIR}/src/HTMLListAssembler.o \
${OBJECTDIR}/src/AbstractMediaRequestHandler.o \
@@ -70,37 +71,42 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libserverlib.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libserverlib.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libserverlib.a
-${OBJECTDIR}/src/JSonListAssembler.o: src/JSonListAssembler.cc
+${OBJECTDIR}/src/JSonListAssembler.o: nbproject/Makefile-${CND_CONF}.mk src/JSonListAssembler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/JSonListAssembler.o src/JSonListAssembler.cc
-${OBJECTDIR}/src/CommandHandler.o: src/CommandHandler.cc
+${OBJECTDIR}/src/MediaServerConfig.o: nbproject/Makefile-${CND_CONF}.mk src/MediaServerConfig.cc
+ ${MKDIR} -p ${OBJECTDIR}/src
+ ${RM} $@.d
+ $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaServerConfig.o src/MediaServerConfig.cc
+
+${OBJECTDIR}/src/CommandHandler.o: nbproject/Makefile-${CND_CONF}.mk src/CommandHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CommandHandler.o src/CommandHandler.cc
-${OBJECTDIR}/src/HTMLListAssembler.o: src/HTMLListAssembler.cc
+${OBJECTDIR}/src/HTMLListAssembler.o: nbproject/Makefile-${CND_CONF}.mk src/HTMLListAssembler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTMLListAssembler.o src/HTMLListAssembler.cc
-${OBJECTDIR}/src/AbstractMediaRequestHandler.o: src/AbstractMediaRequestHandler.cc
+${OBJECTDIR}/src/AbstractMediaRequestHandler.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractMediaRequestHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMediaRequestHandler.o src/AbstractMediaRequestHandler.cc
-${OBJECTDIR}/src/HTTPMediaResponse.o: src/HTTPMediaResponse.cc
+${OBJECTDIR}/src/HTTPMediaResponse.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPMediaResponse.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPMediaResponse.o src/HTTPMediaResponse.cc
-${OBJECTDIR}/src/MediaListHandler.o: src/MediaListHandler.cc
+${OBJECTDIR}/src/MediaListHandler.o: nbproject/Makefile-${CND_CONF}.mk src/MediaListHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaListHandler.o src/MediaListHandler.cc
-${OBJECTDIR}/src/MediaFileHandler.o: src/MediaFileHandler.cc
+${OBJECTDIR}/src/MediaFileHandler.o: nbproject/Makefile-${CND_CONF}.mk src/MediaFileHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaFileHandler.o src/MediaFileHandler.cc
diff --git a/cmps/serverlib/nbproject/configurations.xml b/cmps/serverlib/nbproject/configurations.xml
index b37dc04..3bf0fb8 100644
--- a/cmps/serverlib/nbproject/configurations.xml
+++ b/cmps/serverlib/nbproject/configurations.xml
@@ -11,6 +11,7 @@
<itemPath>include/JSonListAssembler.h</itemPath>
<itemPath>include/MediaFileHandler.h</itemPath>
<itemPath>include/MediaListHandler.h</itemPath>
+ <itemPath>include/MediaServerConfig.h</itemPath>
</logicalFolder>
<logicalFolder name="ResourceFiles"
displayName="Resource Files"
@@ -26,6 +27,7 @@
<itemPath>src/JSonListAssembler.cc</itemPath>
<itemPath>src/MediaFileHandler.cc</itemPath>
<itemPath>src/MediaListHandler.cc</itemPath>
+ <itemPath>src/MediaServerConfig.cc</itemPath>
</logicalFolder>
<logicalFolder name="TestFiles"
displayName="Test Files"
diff --git a/cmps/serverlib/src/MediaServerConfig.cc b/cmps/serverlib/src/MediaServerConfig.cc
new file mode 100644
index 0000000..5ef3646
--- /dev/null
+++ b/cmps/serverlib/src/MediaServerConfig.cc
@@ -0,0 +1,128 @@
+/**
+ * ======================== legal notice ======================
+ *
+ * File: MediaServerConfig.cc
+ * Created: 1. August 2012, 10:58
+ * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
+ * Project: cmps - the backend (server) part of compound media player
+ *
+ * CMP - compound media player
+ *
+ * is a client/server mediaplayer intended to play any media from any workstation
+ * without the need to export or mount shares. cmps is an easy to use backend
+ * with a (ready to use) HTML-interface. Additionally the backend supports
+ * authentication via HTTP-digest authorization.
+ * cmpc is a client with vdr-like osd-menues.
+ *
+ * Copyright (c) 2012 Reinhard Mantey, some rights reserved!
+ * published under Creative Commons by-sa
+ * For details see http://creativecommons.org/licenses/by-sa/3.0/
+ *
+ * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp
+ *
+ * --------------------------------------------------------------
+ */
+#include <MediaServerConfig.h>
+#include <AbstractMedia.h>
+#include <Audio.h>
+#include <DVDImage.h>
+#include <Movie.h>
+#include <Picture.h>
+#include <LegacyVdrRecording.h>
+#include <VdrRecording.h>
+#include <pcrecpp.h>
+
+static pcrecpp::RE sequence("\\s*(\\S+)\\s*,\\s*(.+)");
+static pcrecpp::RE sequenceLast("(\\S+)\\s*");
+
+cMediaServerConfig::cMediaServerConfig(const char *ConfigBaseDir)
+ : cServerConfig(ConfigBaseDir)
+{
+}
+
+cMediaServerConfig::~cMediaServerConfig()
+{
+}
+
+bool cMediaServerConfig::Eval(cConfigReader::ConfigEntry* Entry)
+{
+ std::string name = std::get<0>(*Entry);
+
+ if (!strcmp("no-deep-scan", name.c_str())) {
+ int es[cAbstractMedia::Unknown] = {1};
+ int mx = sizeof(es) / sizeof(int);
+ const char *rawValue = std::get<1>(*Entry).c_str();
+ SetWantExtendedScan(true);
+ std::string cur, rest;
+
+ for (int i=0; i < mx; ++i) es[i] = 1;
+ while (sequence.FullMatch(rawValue, &cur, &rest)) {
+ if (!strcmp("Audio", cur.c_str())) es[cAbstractMedia::Audio] = 0;
+ else if (!strcmp("Movie", cur.c_str())) es[cAbstractMedia::Movie] = 0;
+ else if (!strcmp("DVDImage", cur.c_str())) es[cAbstractMedia::DVDImage] = 0;
+ else if (!strcmp("LegacyVdrRecording", cur.c_str())) es[cAbstractMedia::LegacyVdrRecording] = 0;
+ else if (!strcmp("VdrRecording", cur.c_str())) es[cAbstractMedia::VdrRecording] = 0;
+ else if (!strcmp("Picture", cur.c_str())) es[cAbstractMedia::Picture] = 0;
+ rawValue = rest.c_str();
+ }
+ cur = rawValue;
+ if (!strcmp("Audio", cur.c_str())) es[cAbstractMedia::Audio] = 0;
+ else if (!strcmp("Movie", cur.c_str())) es[cAbstractMedia::Movie] = 0;
+ else if (!strcmp("DVDImage", cur.c_str())) es[cAbstractMedia::DVDImage] = 0;
+ else if (!strcmp("LegacyVdrRecording", cur.c_str())) es[cAbstractMedia::LegacyVdrRecording] = 0;
+ else if (!strcmp("VdrRecording", cur.c_str())) es[cAbstractMedia::VdrRecording] = 0;
+ else if (!strcmp("Picture", cur.c_str())) es[cAbstractMedia::Picture] = 0;
+
+ for (int i=0; i < mx; ++i) {
+ switch ((cAbstractMedia::SupportedMediaType) i) {
+ case cAbstractMedia::Audio: cAudio::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::DVDImage: cDVDImage::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::LegacyVdrRecording: cLegacyVdrRecording::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::Movie: cMovie::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::Picture: cPicture::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::VdrRecording: cVdrRecording::EnableDeepScan(es[i]); break;
+ default: break;
+ }
+ }
+ return true;
+ }
+ else if (!strcmp("deep-scan", name.c_str())) {
+ int es[cAbstractMedia::Unknown] = {0};
+ int mx = sizeof(es) / sizeof(int);
+ const char *rawValue = std::get<1>(*Entry).c_str();
+ SetWantExtendedScan(true);
+ std::string cur, rest;
+
+ for (int i=0; i < mx; ++i) es[i] = 0;
+ while (sequence.FullMatch(rawValue, &cur, &rest)) {
+ if (!strcmp("Audio", cur.c_str())) es[cAbstractMedia::Audio] = 1;
+ else if (!strcmp("Movie", cur.c_str())) es[cAbstractMedia::Movie] = 1;
+ else if (!strcmp("DVDImage", cur.c_str())) es[cAbstractMedia::DVDImage] = 1;
+ else if (!strcmp("LegacyVdrRecording", cur.c_str())) es[cAbstractMedia::LegacyVdrRecording] = 1;
+ else if (!strcmp("VdrRecording", cur.c_str())) es[cAbstractMedia::VdrRecording] = 1;
+ else if (!strcmp("Picture", cur.c_str())) es[cAbstractMedia::Picture] = 1;
+ rawValue = rest.c_str();
+ }
+ cur = rawValue;
+ if (!strcmp("Audio", cur.c_str())) es[cAbstractMedia::Audio] = 1;
+ else if (!strcmp("Movie", cur.c_str())) es[cAbstractMedia::Movie] = 1;
+ else if (!strcmp("DVDImage", cur.c_str())) es[cAbstractMedia::DVDImage] = 1;
+ else if (!strcmp("LegacyVdrRecording", cur.c_str())) es[cAbstractMedia::LegacyVdrRecording] = 1;
+ else if (!strcmp("VdrRecording", cur.c_str())) es[cAbstractMedia::VdrRecording] = 1;
+ else if (!strcmp("Picture", cur.c_str())) es[cAbstractMedia::Picture] = 1;
+
+ for (int i=0; i < mx; ++i) {
+ switch ((cAbstractMedia::SupportedMediaType) i) {
+ case cAbstractMedia::Audio: cAudio::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::DVDImage: cDVDImage::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::LegacyVdrRecording: cLegacyVdrRecording::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::Movie: cMovie::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::Picture: cPicture::EnableDeepScan(es[i]); break;
+ case cAbstractMedia::VdrRecording: cVdrRecording::EnableDeepScan(es[i]); break;
+ default: break;
+ }
+ }
+ return true;
+ }
+ else return cServerConfig::Eval(Entry);
+} \ No newline at end of file
diff --git a/cmps/tests/CredentialPersistence.cc b/cmps/tests/CredentialPersistence.cc
new file mode 100644
index 0000000..8e6df4b
--- /dev/null
+++ b/cmps/tests/CredentialPersistence.cc
@@ -0,0 +1,103 @@
+/**
+ * ======================== legal notice ======================
+ *
+ * File: CredentialPersistence.cc
+ * Created: 03.07.2012, 14:16:35
+ * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a>
+ * Project: cmps - the backend (server) part of compound media player
+ *
+ * CMP - compound media player
+ *
+ * is a client/server mediaplayer intended to play any media from any workstation
+ * without the need to export or mount shares. cmps is an easy to use backend
+ * with a (ready to use) HTML-interface. Additionally the backend supports
+ * authentication via HTTP-digest authorization.
+ * cmpc is a client with vdr-like osd-menues.
+ *
+ * Copyright (c) 2012 Reinhard Mantey, some rights reserved!
+ * published under Creative Commons by-sa
+ * For details see http://creativecommons.org/licenses/by-sa/3.0/
+ *
+ * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp
+ *
+ * --------------------------------------------------------------
+ */
+#include <Principal.h>
+#include <Credentials.h>
+#include <stdlib.h>
+#include <iostream>
+
+/*
+ * Simple C++ Test Suite
+ */
+static void setupTestCredentials() {
+ Credentials.SetApplicationRealm("supportedUsers@myTestApp");
+ cPrincipal *p = new cPrincipal("Nasenbär", Credentials.ApplicationRealm());
+
+ p->CreateHash("Nasenwasser");
+ Credentials.Put(p->Name(), p);
+
+ p = new cPrincipal("Admin", Credentials.ApplicationRealm());
+ p->CreateHash("very secret");
+ Credentials.Put(p->Name(), p);
+
+ p = new cPrincipal("Sepp", Credentials.ApplicationRealm());
+ p->CreateHash("keine Ahnung");
+ Credentials.Put(p->Name(), p);
+}
+
+static void dumpCredentials() {
+ cCredentials::const_iterator principals = Credentials.begin();
+
+ while (principals != Credentials.end()) {
+ principals->second->Dump();
+ ++principals;
+ }
+
+}
+
+void test1()
+{
+ setupTestCredentials();
+ std::cout << "CredentialPersistence test 1" << std::endl;
+
+ int rv = Credentials.Store("/tmp/testCredentials.x9");
+
+ if (!rv) std::cout << "%TEST_FAILED% time=0 testname=test1 (CredentialPersistence) message=failed to write credentials" << std::endl;
+ else std::cout << "saved " << rv << " principals." << std::endl;
+
+ dumpCredentials();
+}
+
+void test2()
+{
+ std::cout << "CredentialPersistence test 2" << std::endl;
+
+ Credentials.Clear();
+
+ int rv = Credentials.Load("/tmp/testCredentials.x9");
+
+ if (!rv) std::cout << "%TEST_FAILED% time=0 testname=test2 (CredentialPersistence) message=failed to load credentials" << std::endl;
+ else std::cout << "loaded " << rv << " principals." << std::endl;
+
+ dumpCredentials();
+}
+
+int main(int argc, char** argv)
+{
+ std::cout << "%SUITE_STARTING% CredentialPersistence" << std::endl;
+ std::cout << "%SUITE_STARTED%" << std::endl;
+
+ std::cout << "%TEST_STARTED% test1 (CredentialPersistence)" << std::endl;
+ test1();
+ std::cout << "%TEST_FINISHED% time=0 test1 (CredentialPersistence)" << std::endl;
+
+ std::cout << "%TEST_STARTED% test2 (CredentialPersistence)\n" << std::endl;
+ test2();
+ std::cout << "%TEST_FINISHED% time=0 test2 (CredentialPersistence)" << std::endl;
+
+ std::cout << "%SUITE_FINISHED% time=0" << std::endl;
+
+ return (EXIT_SUCCESS);
+}
+
diff --git a/cmps/tests/FScanTest.cc b/cmps/tests/FScanTest.cc
index a426c0d..8ca4498 100644
--- a/cmps/tests/FScanTest.cc
+++ b/cmps/tests/FScanTest.cc
@@ -22,13 +22,15 @@
*
* --------------------------------------------------------------
*/
-#include <stdlib.h>
-#include <iostream>
#include <Audio.h>
#include <Movie.h>
-#include <PictuFSMediaScannerner.h>
+#include <Picture.h>
+#include <FSMediaScanner.h>
#include <MediaFactory.h>
+#include <MediaServerConfig.h>
#include <TimeMs.h>
+#include <stdlib.h>
+#include <iostream>
class FScanTest {
public:
@@ -66,30 +68,45 @@ void FScanTest::test3()
}
void FScanTest::test4()
-///< result from java pendant: FSScanner - scanning of 9970 media took 46 ms
-///< own result: found 9970 media, in 58 ms.
-///< file server (mostly recordings) found 2828 media, in 53525 ms.
-///< file server (added 18G audio) found 5698 media, in 44653 ms.
-///< file server (same files, fresh reboot) found 5698 media, in 54723 ms.
+///< result from java pendant: FSScanner - scanning of 9970 media took 46 ms
+///< own result: found 9970 media, in 58 ms.
+///< file server (mostly recordings) found 2828 media, in 53525 ms.
+///< file server (added 18G audio) found 5698 media, in 44653 ms.
+///< file server (same files, fresh reboot) found 5698 media, in 54723 ms.
+///< new own result using cFile found 10002 media, in 601 ms. (first run)
+///< new own result using cFile found 10002 media, in 177 ms. (second run)
+///< with mediascan found 10002 media, in 80570 ms.
+///< with mediascan and saving values found 10002 media, in 93675 ms.
+///< with mediascan, scanning each media found 10002 media, in 247096 ms.
+///< java - mediascan for each media scanning of 9312 media took 215037 ms. (with key file)
{
+ cMediaServerConfig config("/var/lib/cmp");
cFSMediaScanner scanner;
cAbstractMedia *media;
+ config.Load("srserver.conf");
+ config.SetAuthorizationRequired(false);
+ config.Dump();
+
std::cout << "FScanTest test 4" << std::endl;
- scanner.SetMediaFactory(new cMediaFactory("/media/video"));
+ scanner.SetMediaFactory(new cMediaFactory(config));
uint64_t start = cTimeMs::Now();
scanner.Refresh();
uint64_t end = cTimeMs::Now();
+ size_t grouped[cAbstractMedia::Unknown];
+ int mx = sizeof(grouped) / sizeof(size_t);
+ for (int i=0; i < mx; ++i) grouped[i] = 0;
for (size_t i=0; i < scanner.MediaPool().size(); ++i) {
media = (cAbstractMedia *) scanner.MediaPool()[i];
- std::cout << media->Name() << " [" << media->MimeType() << "] => " << media->AbsolutePath() << std::endl;
+ ++grouped[media->MediaType()];
+ media->Dump();
}
std::cout << std::endl << "found " << scanner.MediaPool().size() << " media, in " << end - start << " ms." << std::endl;
- const char *file2Search = "/pretty/unsupported/media/file/in/any/workstation.unknown";
+ const char *file2Search = "/pretty/unsupported/media/file/in/any/known.workstation";
// search (worst case)
start = cTimeMs::Now();
@@ -97,11 +114,18 @@ void FScanTest::test4()
end = cTimeMs::Now();
std::cout << "array search took " << end - start << " ms." << std::endl;
+
+ for (int i=0; i < mx; ++i) {
+ std::cout << cAbstractMedia::MediaType2Text(i) << " has " << grouped[i] << " members." << std::endl;
+ }
cFile::Cleanup();
}
int main(int argc, char** argv)
{
+ int MaxPossibleFileDescriptors = getdtablesize();
+
+ std::cout << "maximum of open files #" << MaxPossibleFileDescriptors << std::endl << std::endl;
uint64_t t0 = cTimeMs::Now();
std::cout << "%SUITE_STARTING% FScanTest" << std::endl;
std::cout << "%SUITE_STARTED%" << std::endl;
diff --git a/cmps/tests/MetaScanTest.cc b/cmps/tests/MetaScanTest.cc
index 918ad9f..1b57752 100644
--- a/cmps/tests/MetaScanTest.cc
+++ b/cmps/tests/MetaScanTest.cc
@@ -28,6 +28,8 @@
#include <ConfigReader.h>
#include <CommandReader.h>
#include <MediainfoReader.h>
+#include <MediaInfo/MediaInfo.h>
+#include <MediaServerConfig.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
@@ -35,8 +37,9 @@
#include <unistd.h>
#include <tr1/tuple>
-static void parseConfig(const char *FileName)
+void parseConfig(const char *FileName)
{
+#ifdef OLD_STUFF
cConfigReader *cr = new cConfigReader(new cLineReader(new cFileReader(new cFile(FileName))));
cConfigReader::ConfigEntry *ce;
@@ -46,9 +49,15 @@ static void parseConfig(const char *FileName)
}
cr->Close();
delete cr;
+#else
+ cMediaServerConfig msc("/var/lib/cmp");
+
+ msc.Load("srserver.conf");
+ msc.Dump();
+#endif
}
-static void dumpTextfile(const char *FileName)
+void dumpTextfile(const char *FileName)
{
cLineReader *lr = new cLineReader(new cFileReader(new cFile(FileName)));
const char *line;
@@ -59,32 +68,34 @@ static void dumpTextfile(const char *FileName)
delete lr;
}
-static void setupMediainfoReader(cMediainfoReader *mir)
+void setupMediainfo(void)
{
- mir->AddValuableKey("Format");
+ static const char *MetaKeys[] = {
+ "Format"
//Audio
- mir->AddValuableKey("Duration");
- mir->AddValuableKey("Album");
- mir->AddValuableKey("Track name");
- mir->AddValuableKey("Performer");
- mir->AddValuableKey("Bit rate");
+, "Duration"
+, "Album"
+, "Track name"
+, "Performer"
+, "Bit rate"
//Image
- mir->AddValuableKey("Width");
- mir->AddValuableKey("Height");
+, "Width"
+, "Height"
//Video
- mir->AddValuableKey("Display aspect ratio");
- mir->AddValuableKey("Scan type");
+, "Display aspect ratio"
+, "Scan type"
+, NULL
+ };
+ cMediainfoReader::Setup(MetaKeys);
}
-static void testMediaInfo(const char *FileName)
+void testMediaInfo(const char *FileName)
{
cCommandReader *cr = new cCommandReader("/usr/bin/mediainfo");
-// cFileReader *fr = new cFileReader(new cFile("mi.output"));
cMediainfoReader *mir = new cMediainfoReader(new cLineReader(cr));
cMediainfoReader::InfoEntry *ie;
cr->AddCommandParameter(FileName);
- setupMediainfoReader(mir);
while ((ie = mir->ReadEntry())) {
std::cout << "media info - [" << std::get<0>(*ie) << "] ==> " << std::get<1>(*ie) << std::endl;
delete ie;
@@ -98,6 +109,7 @@ void testMediaFiles(const char *FileName)
cLineReader *lr = new cLineReader(new cFileReader(new cFile(FileName)));
const char *line;
+ setupMediainfo();
while ((line = lr->ReadLine())) {
std::cout << std::endl << "media-test-file: " << line << std::endl;
testMediaInfo(line);
@@ -112,7 +124,7 @@ enum PipeFileDescriptors {
WRITE_FD = 1
};
-static void testCommandReader()
+void testCommandReader()
{
cCommandReader *cr = new cCommandReader("/bin/ls");
cLineReader *lr = new cLineReader(cr);
@@ -129,7 +141,9 @@ static void testCommandReader()
int main()
{
-// testMediaInfo("blah");
+ char buf[256];
+
+ std::cout << "working directory is: " << getcwd(buf, sizeof(buf)) << std::endl;
dumpTextfile("srclient.conf");
std::cout << std::endl << "===========================================" << std::endl << std::endl;
@@ -138,8 +152,8 @@ int main()
std::cout << std::endl << "===========================================" << std::endl << std::endl;
testCommandReader();
- std::cout << std::endl << "===========================================" << std::endl << std::endl;
- testMediaFiles("testMedia.files");
+// std::cout << std::endl << "===========================================" << std::endl << std::endl;
+// testMediaFiles("testMedia.txt");
cFile::Cleanup();
return 0;
diff --git a/libs/IO/include/CommandReader.h b/libs/IO/include/CommandReader.h
index e54a64c..63ee7c1 100644
--- a/libs/IO/include/CommandReader.h
+++ b/libs/IO/include/CommandReader.h
@@ -43,6 +43,7 @@ protected:
private:
pid_t pid;
std::vector<std::string> args;
+ static int fdMax;
};
#endif /* COMMANDREADER_H */
diff --git a/libs/IO/nbproject/Makefile-Debug.mk b/libs/IO/nbproject/Makefile-Debug.mk
index 36615b9..322f887 100644
--- a/libs/IO/nbproject/Makefile-Debug.mk
+++ b/libs/IO/nbproject/Makefile-Debug.mk
@@ -71,42 +71,42 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libio.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libio.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libio.a
-${OBJECTDIR}/src/CommandReader.o: src/CommandReader.cc
+${OBJECTDIR}/src/CommandReader.o: nbproject/Makefile-${CND_CONF}.mk src/CommandReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CommandReader.o src/CommandReader.cc
-${OBJECTDIR}/src/FileRepresentation.o: src/FileRepresentation.cc
+${OBJECTDIR}/src/FileRepresentation.o: nbproject/Makefile-${CND_CONF}.mk src/FileRepresentation.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileRepresentation.o src/FileRepresentation.cc
-${OBJECTDIR}/src/LineReader.o: src/LineReader.cc
+${OBJECTDIR}/src/LineReader.o: nbproject/Makefile-${CND_CONF}.mk src/LineReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LineReader.o src/LineReader.cc
-${OBJECTDIR}/src/File.o: src/File.cc
+${OBJECTDIR}/src/File.o: nbproject/Makefile-${CND_CONF}.mk src/File.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/File.o src/File.cc
-${OBJECTDIR}/src/Reader.o: src/Reader.cc
+${OBJECTDIR}/src/Reader.o: nbproject/Makefile-${CND_CONF}.mk src/Reader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Reader.o src/Reader.cc
-${OBJECTDIR}/src/ConfigReader.o: src/ConfigReader.cc
+${OBJECTDIR}/src/ConfigReader.o: nbproject/Makefile-${CND_CONF}.mk src/ConfigReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ConfigReader.o src/ConfigReader.cc
-${OBJECTDIR}/src/FileReader.o: src/FileReader.cc
+${OBJECTDIR}/src/FileReader.o: nbproject/Makefile-${CND_CONF}.mk src/FileReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileReader.o src/FileReader.cc
-${OBJECTDIR}/src/FileSystem.o: src/FileSystem.cc
+${OBJECTDIR}/src/FileSystem.o: nbproject/Makefile-${CND_CONF}.mk src/FileSystem.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileSystem.o src/FileSystem.cc
diff --git a/libs/IO/nbproject/Makefile-Release.mk b/libs/IO/nbproject/Makefile-Release.mk
index 29ba2ae..3017cbd 100644
--- a/libs/IO/nbproject/Makefile-Release.mk
+++ b/libs/IO/nbproject/Makefile-Release.mk
@@ -71,42 +71,42 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libio.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libio.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libio.a
-${OBJECTDIR}/src/CommandReader.o: src/CommandReader.cc
+${OBJECTDIR}/src/CommandReader.o: nbproject/Makefile-${CND_CONF}.mk src/CommandReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CommandReader.o src/CommandReader.cc
-${OBJECTDIR}/src/FileRepresentation.o: src/FileRepresentation.cc
+${OBJECTDIR}/src/FileRepresentation.o: nbproject/Makefile-${CND_CONF}.mk src/FileRepresentation.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileRepresentation.o src/FileRepresentation.cc
-${OBJECTDIR}/src/LineReader.o: src/LineReader.cc
+${OBJECTDIR}/src/LineReader.o: nbproject/Makefile-${CND_CONF}.mk src/LineReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LineReader.o src/LineReader.cc
-${OBJECTDIR}/src/File.o: src/File.cc
+${OBJECTDIR}/src/File.o: nbproject/Makefile-${CND_CONF}.mk src/File.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/File.o src/File.cc
-${OBJECTDIR}/src/Reader.o: src/Reader.cc
+${OBJECTDIR}/src/Reader.o: nbproject/Makefile-${CND_CONF}.mk src/Reader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Reader.o src/Reader.cc
-${OBJECTDIR}/src/ConfigReader.o: src/ConfigReader.cc
+${OBJECTDIR}/src/ConfigReader.o: nbproject/Makefile-${CND_CONF}.mk src/ConfigReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ConfigReader.o src/ConfigReader.cc
-${OBJECTDIR}/src/FileReader.o: src/FileReader.cc
+${OBJECTDIR}/src/FileReader.o: nbproject/Makefile-${CND_CONF}.mk src/FileReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileReader.o src/FileReader.cc
-${OBJECTDIR}/src/FileSystem.o: src/FileSystem.cc
+${OBJECTDIR}/src/FileSystem.o: nbproject/Makefile-${CND_CONF}.mk src/FileSystem.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileSystem.o src/FileSystem.cc
diff --git a/libs/IO/src/CommandReader.cc b/libs/IO/src/CommandReader.cc
index 6b67511..0bc6109 100644
--- a/libs/IO/src/CommandReader.cc
+++ b/libs/IO/src/CommandReader.cc
@@ -28,6 +28,8 @@
#include <errno.h>
#include <wait.h>
+int cCommandReader::fdMax = 0;
+
cCommandReader::cCommandReader(const char *cmd)
: pid(-1)
{
@@ -46,27 +48,28 @@ void cCommandReader::AddCommandParameter(const char* Param)
void cCommandReader::Close(void)
{
- int status;
+ int status = 0;
+ if (!fdMax) fdMax = getdtablesize();
+ if (fd > 0 && fd < fdMax) {
+ close(fd);
+ isyslog("closed fd #%d", fd);
+ }
+ fd = -1;
if (pid != waitpid(pid, &status, 0)) {
esyslog("ERROR: failed to wait for child #%d - error #%d", pid, errno);
}
else {
isyslog("child exit status: %d", WEXITSTATUS(status));
}
- pid = fd = -1;
+ pid = -1;
}
bool cCommandReader::Open(void)
{
enum { FDRead, FDWrite };
- int parent2Child[2];
- int child2Parent[2];
+ int child2Parent[2] = {0};
- if (pipe(parent2Child)) {
- esyslog("ERROR: failed to create parent2Child-pipe #%d", errno);
- return false;
- }
if (pipe(child2Parent)) {
esyslog("ERROR: failed to create child2Parent-pipe #%d", errno);
return false;
@@ -74,6 +77,8 @@ bool cCommandReader::Open(void)
switch ((pid = fork())) {
case -1:
esyslog("fork failed");
+ close(child2Parent[0]);
+ close(child2Parent[1]);
return false;
case 0: { /* child */
@@ -83,10 +88,6 @@ bool cCommandReader::Open(void)
cmdArgs[i] = args[i].c_str();
}
cmdArgs[args.size()] = 0;
- if (dup2(parent2Child[FDRead], STDIN_FILENO) < 0) {
- esyslog("ERROR: failed to create parents stdin #%d", errno);
- exit(-1);
- }
if (dup2(child2Parent[FDWrite], STDOUT_FILENO) < 0) {
esyslog("ERROR: failed to create childs stdout #%d", errno);
exit(-1);
@@ -95,26 +96,27 @@ bool cCommandReader::Open(void)
esyslog("ERROR: failed to create childs stderr #%d", errno);
exit(-1);
}
- if (close(parent2Child[FDWrite])) {
- esyslog("ERROR: failed to close parents write-end of the pipe #%d", errno);
- exit(-1);
- }
if (close(child2Parent[FDRead])) {
esyslog("ERROR: failed to close childs read-end of the pipe #%d", errno);
exit(-1);
}
execv(args[0].c_str(), (char *const*) cmdArgs);
-
- esyslog("should never be reached!");
+ esyslog("should never be reached! #1");
exit(-1);
} break;
default: { /* parent */
- isyslog("child process #%d started ...", pid);
+ if (close(child2Parent[FDWrite])) {
+ esyslog("ERROR: failed to close write end from parent side!");
+ exit(-1);
+ }
+ isyslog("child process #%d started ... fd %d", pid, child2Parent[FDRead]);
fd = child2Parent[FDRead];
-
return true;
}
}
+ esyslog("should never be reached! #2");
+ close(child2Parent[0]);
+ close(child2Parent[1]);
return false;
}
diff --git a/libs/IO/src/Reader.cc b/libs/IO/src/Reader.cc
index cbead31..8ac49c7 100644
--- a/libs/IO/src/Reader.cc
+++ b/libs/IO/src/Reader.cc
@@ -33,6 +33,10 @@ cReader::cReader()
cReader::~cReader()
{
+ if (fd > 0) {
+ close(fd);
+ fd = -1;
+ }
}
int cReader::Read(char* buf, int bufSize)
diff --git a/libs/mediaScan/include/AbstractMedia.h b/libs/mediaScan/include/AbstractMedia.h
index 18dd18d..6dbf673 100644
--- a/libs/mediaScan/include/AbstractMedia.h
+++ b/libs/mediaScan/include/AbstractMedia.h
@@ -26,6 +26,7 @@
#define ABSTRACTMEDIA_H
#include <File.h>
+#include <MediainfoReader.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <vector>
@@ -41,18 +42,24 @@ public:
Invalid,
Audio,
Movie,
+ IMovie,
DVDImage,
+ IDVDImage,
LegacyVdrRecording,
+ ILegacyVdrRecording,
VdrRecording,
+ IVdrRecording,
Picture,
Unknown
} SupportedMediaType;
virtual ~cAbstractMedia();
+ virtual void AddMeta(cMediainfoReader::InfoEntry *Entry);
SupportedMediaType MediaType(void) const { return mediaType; }
const char *MimeType(void) const { return mimeType; }
const char *AbsolutePath(void) const;
+ virtual const char *KeyFile(void) const;
ulong LastModified(void) const;
const char *LogicalPath(void) const { return logicalPath; }
virtual const char *Name(void) const;
@@ -65,12 +72,14 @@ public:
virtual size_t ReadChunk(char *buf, size_t bufSize);
///< used to hide the differences between single- and multi-file media.
virtual void Reset(void);
+ void Dump(void) const;
static const char *MediaType2Text(int Type);
protected:
cAbstractMedia(const cFile &File, const char *Mime, SupportedMediaType Type);
+ void SetMediaType(int NewType);
void SetMimeType(const char *MimeType);
- const cFile &KeyPath(void) { return keyPath; }
+ const cFile &KeyPath(void) const { return keyPath; }
int fd;
private:
@@ -79,6 +88,7 @@ private:
char *uri;
char *logicalPath;
cFile keyPath;
+ std::vector<cMediainfoReader::InfoEntry *> meta;
};
#endif /* ABSTRACTMEDIA_H */
diff --git a/libs/mediaScan/include/AbstractMultiFileMovie.h b/libs/mediaScan/include/AbstractMultiFileMovie.h
index f933b75..41f6c2d 100644
--- a/libs/mediaScan/include/AbstractMultiFileMovie.h
+++ b/libs/mediaScan/include/AbstractMultiFileMovie.h
@@ -32,8 +32,9 @@ public:
virtual ~cAbstractMultiFileMovie();
virtual size_t ReadChunk(char *buf, size_t bufSize);
+ virtual const char *KeyFile(void) const;
virtual const char *Name(void) const { return name; }
- virtual const char *FirstFile(void) = 0;
+ virtual const char *FirstFile(void) const = 0;
virtual const char *NextFile(void) = 0;
virtual size_t Size(void) const { return size; }
@@ -42,10 +43,10 @@ protected:
virtual void Reset(void);
void SetName(char *Name);
void SetSize(size_t Size);
- bool checkBuffer(void);
+ bool checkBuffer(void) const;
int movieFiles;
int curFileNo;
- char *buf;
+ mutable char *buf;
int bufSize;
private:
diff --git a/libs/mediaScan/include/Audio.h b/libs/mediaScan/include/Audio.h
index fb13f49..3dc8faa 100644
--- a/libs/mediaScan/include/Audio.h
+++ b/libs/mediaScan/include/Audio.h
@@ -33,6 +33,7 @@ public:
virtual ~cAudio();
virtual bool NeedsFurtherScan(void) const;
+ static void EnableDeepScan(bool DoScan);
private:
static const char *ContentType(const char *Extension);
diff --git a/libs/mediaScan/include/DVDImage.h b/libs/mediaScan/include/DVDImage.h
index ce48c79..315e5d1 100644
--- a/libs/mediaScan/include/DVDImage.h
+++ b/libs/mediaScan/include/DVDImage.h
@@ -33,10 +33,12 @@ public:
virtual ~cDVDImage();
virtual const char *Name(void) const;
- virtual const char *FirstFile(void);
+ virtual const char *FirstFile(void) const;
virtual const char *NextFile(void);
virtual void Refresh(void);
virtual size_t Size(void) const;
+ virtual bool NeedsFurtherScan(void) const;
+ static void EnableDeepScan(bool DoScan);
private:
int mainMovie;
diff --git a/libs/mediaScan/include/LegacyVdrRecording.h b/libs/mediaScan/include/LegacyVdrRecording.h
index 1f73acb..0f10394 100644
--- a/libs/mediaScan/include/LegacyVdrRecording.h
+++ b/libs/mediaScan/include/LegacyVdrRecording.h
@@ -32,9 +32,11 @@ public:
cLegacyVdrRecording(const cFile &File);
virtual ~cLegacyVdrRecording();
- virtual const char *FirstFile(void);
+ virtual const char *FirstFile(void) const;
virtual const char *NextFile(void);
virtual void Refresh(void);
+ virtual bool NeedsFurtherScan(void) const;
+ static void EnableDeepScan(bool DoScan);
};
#endif /* LEGACYVDRRECORDING_H */
diff --git a/libs/mediaScan/include/MediainfoReader.h b/libs/mediaScan/include/MediainfoReader.h
index 5e94785..4a6522f 100644
--- a/libs/mediaScan/include/MediainfoReader.h
+++ b/libs/mediaScan/include/MediainfoReader.h
@@ -37,14 +37,14 @@ public:
cMediainfoReader(cLineReader *LineReader);
virtual ~cMediainfoReader();
- void AddValuableKey(const char *Key);
void Close(void);
bool IsValuable(std::string &key);
InfoEntry *ReadEntry(void);
+ static void Setup(const char *keys[]);
private:
cLineReader *reader;
- std::vector<std::string> valuableKeys;
+ static std::vector<std::string> valuableKeys;
};
#endif /* MEDIAINFOREADER_H */
diff --git a/libs/mediaScan/include/Movie.h b/libs/mediaScan/include/Movie.h
index e01903d..36355b3 100644
--- a/libs/mediaScan/include/Movie.h
+++ b/libs/mediaScan/include/Movie.h
@@ -32,7 +32,9 @@ public:
cMovie(const cFile &File, const char *Mime, SupportedMediaType Type = cAbstractMedia::Movie);
virtual ~cMovie();
+ virtual void AddMeta(cMediainfoReader::InfoEntry *Entry);
virtual bool NeedsFurtherScan(void) const;
+ static void EnableDeepScan(bool DoScan);
private:
static const char *ContentType(const char *Extension);
diff --git a/libs/mediaScan/include/Picture.h b/libs/mediaScan/include/Picture.h
index 0ef37bb..ea96313 100644
--- a/libs/mediaScan/include/Picture.h
+++ b/libs/mediaScan/include/Picture.h
@@ -32,6 +32,9 @@ public:
cPicture(const cFile &File, const char *Mime);
virtual ~cPicture();
+ virtual bool NeedsFurtherScan(void) const;
+ static void EnableDeepScan(bool DoScan);
+
private:
static const char *ContentType(const char *Extension);
static SupportedExtension knownExtensions[];
diff --git a/libs/mediaScan/include/VdrRecording.h b/libs/mediaScan/include/VdrRecording.h
index 8e0789b..7c997ad 100644
--- a/libs/mediaScan/include/VdrRecording.h
+++ b/libs/mediaScan/include/VdrRecording.h
@@ -32,9 +32,11 @@ public:
cVdrRecording(const cFile &File);
virtual ~cVdrRecording();
- virtual const char *FirstFile(void);
+ virtual const char *FirstFile(void) const;
virtual const char *NextFile(void);
virtual void Refresh(void);
+ virtual bool NeedsFurtherScan(void) const;
+ static void EnableDeepScan(bool DoScan);
};
#endif /* VDRRECORDING_H */
diff --git a/libs/mediaScan/nbproject/Makefile-Debug.mk b/libs/mediaScan/nbproject/Makefile-Debug.mk
index 57923a8..04e2cd3 100644
--- a/libs/mediaScan/nbproject/Makefile-Debug.mk
+++ b/libs/mediaScan/nbproject/Makefile-Debug.mk
@@ -74,57 +74,57 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a
-${OBJECTDIR}/src/Picture.o: src/Picture.cc
+${OBJECTDIR}/src/Picture.o: nbproject/Makefile-${CND_CONF}.mk src/Picture.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Picture.o src/Picture.cc
-${OBJECTDIR}/src/Audio.o: src/Audio.cc
+${OBJECTDIR}/src/Audio.o: nbproject/Makefile-${CND_CONF}.mk src/Audio.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Audio.o src/Audio.cc
-${OBJECTDIR}/src/DVDImage.o: src/DVDImage.cc
+${OBJECTDIR}/src/DVDImage.o: nbproject/Makefile-${CND_CONF}.mk src/DVDImage.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/DVDImage.o src/DVDImage.cc
-${OBJECTDIR}/src/VdrRecording.o: src/VdrRecording.cc
+${OBJECTDIR}/src/VdrRecording.o: nbproject/Makefile-${CND_CONF}.mk src/VdrRecording.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/VdrRecording.o src/VdrRecording.cc
-${OBJECTDIR}/src/MediaFactory.o: src/MediaFactory.cc
+${OBJECTDIR}/src/MediaFactory.o: nbproject/Makefile-${CND_CONF}.mk src/MediaFactory.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaFactory.o src/MediaFactory.cc
-${OBJECTDIR}/src/LegacyVdrRecording.o: src/LegacyVdrRecording.cc
+${OBJECTDIR}/src/LegacyVdrRecording.o: nbproject/Makefile-${CND_CONF}.mk src/LegacyVdrRecording.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LegacyVdrRecording.o src/LegacyVdrRecording.cc
-${OBJECTDIR}/src/MediainfoReader.o: src/MediainfoReader.cc
+${OBJECTDIR}/src/MediainfoReader.o: nbproject/Makefile-${CND_CONF}.mk src/MediainfoReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediainfoReader.o src/MediainfoReader.cc
-${OBJECTDIR}/src/FSMediaScanner.o: src/FSMediaScanner.cc
+${OBJECTDIR}/src/FSMediaScanner.o: nbproject/Makefile-${CND_CONF}.mk src/FSMediaScanner.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FSMediaScanner.o src/FSMediaScanner.cc
-${OBJECTDIR}/src/AbstractMultiFileMovie.o: src/AbstractMultiFileMovie.cc
+${OBJECTDIR}/src/AbstractMultiFileMovie.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractMultiFileMovie.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMultiFileMovie.o src/AbstractMultiFileMovie.cc
-${OBJECTDIR}/src/AbstractMedia.o: src/AbstractMedia.cc
+${OBJECTDIR}/src/AbstractMedia.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractMedia.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMedia.o src/AbstractMedia.cc
-${OBJECTDIR}/src/Movie.o: src/Movie.cc
+${OBJECTDIR}/src/Movie.o: nbproject/Makefile-${CND_CONF}.mk src/Movie.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_REENTRANT -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iinclude -I../networking/include -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Movie.o src/Movie.cc
diff --git a/libs/mediaScan/nbproject/Makefile-Release.mk b/libs/mediaScan/nbproject/Makefile-Release.mk
index 2b0a333..81f99bb 100644
--- a/libs/mediaScan/nbproject/Makefile-Release.mk
+++ b/libs/mediaScan/nbproject/Makefile-Release.mk
@@ -74,57 +74,57 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a
-${OBJECTDIR}/src/Picture.o: src/Picture.cc
+${OBJECTDIR}/src/Picture.o: nbproject/Makefile-${CND_CONF}.mk src/Picture.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Picture.o src/Picture.cc
-${OBJECTDIR}/src/Audio.o: src/Audio.cc
+${OBJECTDIR}/src/Audio.o: nbproject/Makefile-${CND_CONF}.mk src/Audio.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Audio.o src/Audio.cc
-${OBJECTDIR}/src/DVDImage.o: src/DVDImage.cc
+${OBJECTDIR}/src/DVDImage.o: nbproject/Makefile-${CND_CONF}.mk src/DVDImage.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/DVDImage.o src/DVDImage.cc
-${OBJECTDIR}/src/VdrRecording.o: src/VdrRecording.cc
+${OBJECTDIR}/src/VdrRecording.o: nbproject/Makefile-${CND_CONF}.mk src/VdrRecording.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/VdrRecording.o src/VdrRecording.cc
-${OBJECTDIR}/src/MediaFactory.o: src/MediaFactory.cc
+${OBJECTDIR}/src/MediaFactory.o: nbproject/Makefile-${CND_CONF}.mk src/MediaFactory.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediaFactory.o src/MediaFactory.cc
-${OBJECTDIR}/src/LegacyVdrRecording.o: src/LegacyVdrRecording.cc
+${OBJECTDIR}/src/LegacyVdrRecording.o: nbproject/Makefile-${CND_CONF}.mk src/LegacyVdrRecording.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LegacyVdrRecording.o src/LegacyVdrRecording.cc
-${OBJECTDIR}/src/MediainfoReader.o: src/MediainfoReader.cc
+${OBJECTDIR}/src/MediainfoReader.o: nbproject/Makefile-${CND_CONF}.mk src/MediainfoReader.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MediainfoReader.o src/MediainfoReader.cc
-${OBJECTDIR}/src/FSMediaScanner.o: src/FSMediaScanner.cc
+${OBJECTDIR}/src/FSMediaScanner.o: nbproject/Makefile-${CND_CONF}.mk src/FSMediaScanner.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FSMediaScanner.o src/FSMediaScanner.cc
-${OBJECTDIR}/src/AbstractMultiFileMovie.o: src/AbstractMultiFileMovie.cc
+${OBJECTDIR}/src/AbstractMultiFileMovie.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractMultiFileMovie.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMultiFileMovie.o src/AbstractMultiFileMovie.cc
-${OBJECTDIR}/src/AbstractMedia.o: src/AbstractMedia.cc
+${OBJECTDIR}/src/AbstractMedia.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractMedia.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractMedia.o src/AbstractMedia.cc
-${OBJECTDIR}/src/Movie.o: src/Movie.cc
+${OBJECTDIR}/src/Movie.o: nbproject/Makefile-${CND_CONF}.mk src/Movie.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Movie.o src/Movie.cc
diff --git a/libs/mediaScan/src/AbstractMedia.cc b/libs/mediaScan/src/AbstractMedia.cc
index 98c72bb..2cc85c5 100644
--- a/libs/mediaScan/src/AbstractMedia.cc
+++ b/libs/mediaScan/src/AbstractMedia.cc
@@ -34,6 +34,8 @@
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
+#include <tuple>
+#include <iostream>
cAbstractMedia::cAbstractMedia(const cFile &File, const char *Mime, SupportedMediaType Type)
: fd(-1)
@@ -54,6 +56,27 @@ cAbstractMedia::~cAbstractMedia()
free(logicalPath);
}
+void cAbstractMedia::AddMeta(cMediainfoReader::InfoEntry* Entry)
+{
+ meta.push_back(Entry);
+}
+
+void cAbstractMedia::Dump(void) const
+{
+ std::cout << MediaType2Text(mediaType) << " [" << mimeType << "] - ( " << Name() << " ) => " << logicalPath << std::endl;
+ std::cout << "\tkey-file: " << KeyFile() << std::endl;
+ for (size_t i=0; i < meta.size(); ++i) {
+ cMediainfoReader::InfoEntry *ie = meta[i];
+
+ std::cout << "\tmeta - [" << std::get<0>(*ie) << "] => " << std::get<1>(*ie) << std::endl;
+ }
+}
+
+const char *cAbstractMedia::KeyFile(void) const
+{
+ return keyPath.AbsolutePath();
+}
+
const char *cAbstractMedia::Name(void) const
{
return keyPath.Name();
@@ -94,6 +117,19 @@ void cAbstractMedia::Reset(void)
}
}
+void cAbstractMedia::SetMediaType(int NewType)
+{
+ switch (NewType) {
+ case IMovie:
+ case IDVDImage:
+ case ILegacyVdrRecording:
+ case IVdrRecording:
+ if (mediaType == (NewType - 1)) mediaType = (SupportedMediaType) NewType;
+ break;
+ default: break;
+ }
+}
+
size_t cAbstractMedia::Size(void) const
{
return keyPath.Size();
@@ -101,15 +137,19 @@ size_t cAbstractMedia::Size(void) const
const char *cAbstractMedia::MediaType2Text(int Type)
{
- switch(Type) {
- case Audio: return TO_STRING(Audio);
- case Movie: return TO_STRING(Movie);
- case DVDImage: return TO_STRING(DVDImage);
- case LegacyVdrRecording: return TO_STRING(LegacyVdrRecording);
- case VdrRecording: return TO_STRING(VdrRecording);
- case Picture: return TO_STRING(Picture);
- default: return TO_STRING(Invalid);
- }
+ switch (Type) {
+ case Audio: return TO_STRING(Audio);
+ case Movie: return TO_STRING(Movie);
+ case IMovie: return TO_STRING(IMovie);
+ case DVDImage: return TO_STRING(DVDImage);
+ case IDVDImage: return TO_STRING(IDVDImage);
+ case LegacyVdrRecording: return TO_STRING(LegacyVdrRecording);
+ case ILegacyVdrRecording: return TO_STRING(ILegacyVdrRecording);
+ case VdrRecording: return TO_STRING(VdrRecording);
+ case IVdrRecording: return TO_STRING(IVdrRecording);
+ case Picture: return TO_STRING(Picture);
+ default: return TO_STRING(Invalid);
+ }
}
bool cAbstractMedia::NeedsFurtherScan(void) const
diff --git a/libs/mediaScan/src/AbstractMultiFileMovie.cc b/libs/mediaScan/src/AbstractMultiFileMovie.cc
index 7ff8b10..ee7121c 100644
--- a/libs/mediaScan/src/AbstractMultiFileMovie.cc
+++ b/libs/mediaScan/src/AbstractMultiFileMovie.cc
@@ -45,7 +45,7 @@ cAbstractMultiFileMovie::~cAbstractMultiFileMovie()
free(buf);
}
-bool cAbstractMultiFileMovie::checkBuffer()
+bool cAbstractMultiFileMovie::checkBuffer(void) const
{
if (!buf && bufSize) {
buf = (char *) malloc(bufSize);
@@ -53,12 +53,18 @@ bool cAbstractMultiFileMovie::checkBuffer()
return buf != NULL;
}
+const char *cAbstractMultiFileMovie::KeyFile(void) const
+{
+ return FirstFile();
+}
+
size_t cAbstractMultiFileMovie::ReadChunk(char* Buf, size_t bufSize)
{
long rv = 0;
const char *path = NULL;
if (fd < 1) {
+ curFileNo = 1;
path = FirstFile();
fd = open(path, O_RDONLY | O_LARGEFILE);
if (fd < 1) {
diff --git a/libs/mediaScan/src/Audio.cc b/libs/mediaScan/src/Audio.cc
index a17517f..fdaae7e 100644
--- a/libs/mediaScan/src/Audio.cc
+++ b/libs/mediaScan/src/Audio.cc
@@ -26,6 +26,8 @@
#include <stddef.h>
#include <string.h>
+static bool deepScanEnabled = false;
+
SupportedExtension cAudio::knownExtensions[] = {
{ "aac", "audio/aac" },
{ "aif", "audio/x-aiff" },
@@ -55,6 +57,11 @@ cAudio::~cAudio()
{
}
+void cAudio::EnableDeepScan(bool DoScan)
+{
+ deepScanEnabled = DoScan;
+}
+
const char *cAudio::ContentType(const char* Extension)
{
for (SupportedExtension *p = knownExtensions; p && p->extension; ++p) {
@@ -65,6 +72,5 @@ const char *cAudio::ContentType(const char* Extension)
bool cAudio::NeedsFurtherScan(void) const
{
-//TODO: common meta data: artist, title
- return true;
+ return deepScanEnabled;
}
diff --git a/libs/mediaScan/src/DVDImage.cc b/libs/mediaScan/src/DVDImage.cc
index 1df6d1e..0ddcdac 100644
--- a/libs/mediaScan/src/DVDImage.cc
+++ b/libs/mediaScan/src/DVDImage.cc
@@ -30,6 +30,8 @@
#include "File.h"
#define FILE_MASK "VIDEO_TS/VTS_%02d_%d.VOB"
+static bool deepScanEnabled = true;
+
cDVDImage::cDVDImage(const cFile &File)
: cAbstractMultiFileMovie(File, "video/mpeg", DVDImage)
{
@@ -50,6 +52,16 @@ size_t cDVDImage::Size(void) const
return cAbstractMedia::Size();
}
+void cDVDImage::EnableDeepScan(bool DoScan)
+{
+ deepScanEnabled = DoScan;
+}
+
+bool cDVDImage::NeedsFurtherScan(void) const
+{
+ return deepScanEnabled;
+}
+
void cDVDImage::Refresh(void)
{
size_t maxSize = 0;
@@ -82,12 +94,11 @@ void cDVDImage::Refresh(void)
SetSize(total);
}
-const char *cDVDImage::FirstFile(void)
+const char *cDVDImage::FirstFile(void) const
{
if (!checkBuffer()) return NULL;
- curFileNo = 1;
- sprintf(buf, FILE_MASK, mainMovie, curFileNo);
+ sprintf(buf, FILE_MASK, mainMovie, 1);
cFile *tmp = new cFile(KeyPath(), buf);
const char *rv = NULL;
diff --git a/libs/mediaScan/src/FSMediaScanner.cc b/libs/mediaScan/src/FSMediaScanner.cc
index 2df5907..a635f17 100644
--- a/libs/mediaScan/src/FSMediaScanner.cc
+++ b/libs/mediaScan/src/FSMediaScanner.cc
@@ -35,6 +35,23 @@
#include <errno.h>
#include <util.h>
+static const char *MetaKeys[] = {
+ "Format"
+// Audio
+, "Duration"
+, "Album"
+, "Track name"
+, "Performer"
+, "Bit rate"
+// Image
+, "Width"
+, "Height"
+// Video
+, "Display aspect ratio"
+, "Scan type"
+, NULL
+ };
+
void freeMediaCallback(void *elem)
{
delete (cAbstractMedia *)elem;
@@ -82,6 +99,7 @@ void cFSMediaScanner::Refresh()
pool.clear();
categories.clear();
+ cMediainfoReader::Setup(MetaKeys);
mediaFactory->Scan4Media(pool);
cAbstractMedia::SupportedMediaType ot = cAbstractMedia::Invalid;
cAbstractMedia *m;
diff --git a/libs/mediaScan/src/LegacyVdrRecording.cc b/libs/mediaScan/src/LegacyVdrRecording.cc
index 3c74b6e..2b4d7af 100644
--- a/libs/mediaScan/src/LegacyVdrRecording.cc
+++ b/libs/mediaScan/src/LegacyVdrRecording.cc
@@ -31,6 +31,8 @@
#define FILE_MASK "%03d.vdr"
+static bool deepScanEnabled = true;
+
cLegacyVdrRecording::cLegacyVdrRecording(const cFile &File)
: cAbstractMultiFileMovie(File, "video/mpeg", LegacyVdrRecording)
{
@@ -48,6 +50,16 @@ cLegacyVdrRecording::~cLegacyVdrRecording()
{
}
+void cLegacyVdrRecording::EnableDeepScan(bool DoScan)
+{
+ deepScanEnabled = DoScan;
+}
+
+bool cLegacyVdrRecording::NeedsFurtherScan(void) const
+{
+ return deepScanEnabled;
+}
+
void cLegacyVdrRecording::Refresh(void)
{
size_t total = 0;
@@ -70,11 +82,10 @@ void cLegacyVdrRecording::Refresh(void)
SetSize(total);
}
-const char *cLegacyVdrRecording::FirstFile(void)
+const char *cLegacyVdrRecording::FirstFile(void) const
{
if (!checkBuffer()) return NULL;
- curFileNo = 1;
- sprintf(buf, FILE_MASK, curFileNo);
+ sprintf(buf, FILE_MASK, 1);
cFile *tmp = new cFile(KeyPath(), buf);
const char *rv = NULL;
diff --git a/libs/mediaScan/src/MediaFactory.cc b/libs/mediaScan/src/MediaFactory.cc
index 0af2fae..1a61dc8 100644
--- a/libs/mediaScan/src/MediaFactory.cc
+++ b/libs/mediaScan/src/MediaFactory.cc
@@ -23,6 +23,9 @@
* --------------------------------------------------------------
*/
#include <MediaFactory.h>
+#include <MediainfoReader.h>
+#include <LineReader.h>
+#include <CommandReader.h>
#include <Audio.h>
#include <Movie.h>
#include <Picture.h>
@@ -70,7 +73,6 @@ int cMediaFactory::createMedia(void *opaque, cFile *Parent, const char *Name)
int cMediaFactory::CreateMedia(const cFile *Parent, const char *Name)
{
-// cManagedVector *pool = (cManagedVector *) opaque;
cFile *curFile = new cFile(*Parent, Name);
const char *mimeType = NULL;
cAbstractMedia *rv = NULL;
@@ -126,7 +128,10 @@ int cMediaFactory::CreateMedia(const cFile *Parent, const char *Name)
}
delete curFile;
if (rv) {
- if (config.WantExtendedScan() && rv->NeedsFurtherScan()) Scan4MetaData(rv);
+ if (config.WantExtendedScan() && rv->NeedsFurtherScan()) {
+ rv->Refresh();
+ Scan4MetaData(rv);
+ }
mediaPool->push_back(rv);
return 0;
}
@@ -144,5 +149,13 @@ void cMediaFactory::Scan4Media(cManagedVector& pool)
void cMediaFactory::Scan4MetaData(cAbstractMedia* media)
{
- //TODO:
+ cCommandReader *cr = new cCommandReader("/usr/bin/mediainfo");
+ cMediainfoReader *mir = new cMediainfoReader(new cLineReader(cr));
+ cMediainfoReader::InfoEntry *ie;
+
+ cr->AddCommandParameter(media->KeyFile());
+ while ((ie = mir->ReadEntry())) {
+ media->AddMeta(ie);
+ }
+ delete mir;
}
diff --git a/libs/mediaScan/src/MediainfoReader.cc b/libs/mediaScan/src/MediainfoReader.cc
index 388c1c3..1668cbf 100644
--- a/libs/mediaScan/src/MediainfoReader.cc
+++ b/libs/mediaScan/src/MediainfoReader.cc
@@ -31,6 +31,8 @@
static pcrecpp::RE comment("^\\s*#.*$");
static pcrecpp::RE emptyLine("^\\s*$");
static pcrecpp::RE entry("^\\s*(.+?)\\s*:\\s*(.+?)\\s*$");
+std::vector<std::string> cMediainfoReader::valuableKeys;
+
cMediainfoReader::cMediainfoReader(cLineReader *LineReader)
: reader(LineReader)
@@ -42,11 +44,6 @@ cMediainfoReader::~cMediainfoReader()
Close();
}
-void cMediainfoReader::AddValuableKey(const char* Key)
-{
- valuableKeys.push_back(Key);
-}
-
void cMediainfoReader::Close(void)
{
if (reader) {
@@ -80,7 +77,14 @@ cMediainfoReader::InfoEntry *cMediainfoReader::ReadEntry()
}
line = reader->ReadLine();
} while (line && !rv);
-
+
return rv;
}
+void cMediainfoReader::Setup(const char* keys[])
+{
+ valuableKeys.clear();
+ for (const char **p = keys; p && *p; ++p) {
+ valuableKeys.push_back(*p);
+ }
+} \ No newline at end of file
diff --git a/libs/mediaScan/src/Movie.cc b/libs/mediaScan/src/Movie.cc
index 042b397..d161dfe 100644
--- a/libs/mediaScan/src/Movie.cc
+++ b/libs/mediaScan/src/Movie.cc
@@ -26,6 +26,8 @@
#include <stddef.h>
#include <string.h>
+static bool deepScanEnabled = true;
+
SupportedExtension cMovie::knownExtensions[] = {
{ "asd", "video/x-ms-asf" },
{ "asf", "video/x-ms-asf" },
@@ -60,8 +62,20 @@ const char *cMovie::ContentType(const char* Extension)
return NULL;
}
+void cMovie::AddMeta(cMediainfoReader::InfoEntry *Entry)
+{
+ if (!strcmp("Scan type", std::get<0>(*Entry).c_str())) {
+ if (!strcmp("Interlaced", std::get<1>(*Entry).c_str())) SetMediaType(MediaType() + 1);
+ }
+ cAbstractMedia::AddMeta(Entry);
+}
+
+void cMovie::EnableDeepScan(bool DoScan)
+{
+ deepScanEnabled = DoScan;
+}
+
bool cMovie::NeedsFurtherScan(void) const
{
-//TODO: common meta data: width, height, interlaced
- return true;
+ return deepScanEnabled;
}
diff --git a/libs/mediaScan/src/Picture.cc b/libs/mediaScan/src/Picture.cc
index 5253a78..0401401 100644
--- a/libs/mediaScan/src/Picture.cc
+++ b/libs/mediaScan/src/Picture.cc
@@ -26,6 +26,8 @@
#include <stddef.h>
#include <string.h>
+static bool deepScanEnabled = false;
+
SupportedExtension cPicture::knownExtensions[] = {
{ "bmp", "image/x-windows-bmp" },
{ "gif", "image/gif" },
@@ -67,3 +69,12 @@ const char *cPicture::ContentType(const char* Extension)
return NULL;
}
+void cPicture::EnableDeepScan(bool DoScan)
+{
+ deepScanEnabled = DoScan;
+}
+
+bool cPicture::NeedsFurtherScan(void) const
+{
+ return deepScanEnabled;
+}
diff --git a/libs/mediaScan/src/VdrRecording.cc b/libs/mediaScan/src/VdrRecording.cc
index 10b6476..bf1eaab 100644
--- a/libs/mediaScan/src/VdrRecording.cc
+++ b/libs/mediaScan/src/VdrRecording.cc
@@ -30,6 +30,8 @@
#include <stdio.h>
#define FILE_MASK "/%05d.ts"
+static bool deepScanEnabled = true;
+
cVdrRecording::cVdrRecording(const cFile &File)
: cAbstractMultiFileMovie(File, "video/mpeg", VdrRecording)
{
@@ -47,6 +49,16 @@ cVdrRecording::~cVdrRecording()
{
}
+void cVdrRecording::EnableDeepScan(bool DoScan)
+{
+ deepScanEnabled = DoScan;
+}
+
+bool cVdrRecording::NeedsFurtherScan(void) const
+{
+ return deepScanEnabled;
+}
+
void cVdrRecording::Refresh(void)
{
size_t total = 0;
@@ -69,11 +81,10 @@ void cVdrRecording::Refresh(void)
SetSize(total);
}
-const char *cVdrRecording::FirstFile(void)
+const char *cVdrRecording::FirstFile(void) const
{
if (!checkBuffer()) return NULL;
- curFileNo = 1;
- sprintf(buf, FILE_MASK, curFileNo);
+ sprintf(buf, FILE_MASK, 1);
cFile *tmp = new cFile(KeyPath(), buf);
const char *rv = NULL;
diff --git a/libs/networking/include/ServerConfig.h b/libs/networking/include/ServerConfig.h
index 98f96d7..a2b90d4 100644
--- a/libs/networking/include/ServerConfig.h
+++ b/libs/networking/include/ServerConfig.h
@@ -28,6 +28,7 @@
#include <Persistable.h>
#include <ServerSocket.h>
#include <Authorization.h>
+#include <ConfigReader.h>
class cServerConfig : public cPersistable {
public:
@@ -42,6 +43,7 @@ public:
const char *MediaInfo(void) const { return mediaInfo; }
const char *FFMpeg(void) const { return ffmpeg; }
void Dump(void);
+ virtual bool Eval(cConfigReader::ConfigEntry *Entry);
virtual int Load(const char *FileName);
virtual int Store(const char *FileName);
void SetAppIcon(const char *AppIcon);
diff --git a/libs/networking/nbproject/Makefile-Debug.mk b/libs/networking/nbproject/Makefile-Debug.mk
index 8c52867..7c60a25 100644
--- a/libs/networking/nbproject/Makefile-Debug.mk
+++ b/libs/networking/nbproject/Makefile-Debug.mk
@@ -81,92 +81,92 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libnetworking.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libnetworking.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libnetworking.a
-${OBJECTDIR}/src/HTTPRequest.o: src/HTTPRequest.cc
+${OBJECTDIR}/src/HTTPRequest.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPRequest.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPRequest.o src/HTTPRequest.cc
-${OBJECTDIR}/src/ServerSocket.o: src/ServerSocket.cc
+${OBJECTDIR}/src/ServerSocket.o: nbproject/Makefile-${CND_CONF}.mk src/ServerSocket.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ServerSocket.o src/ServerSocket.cc
-${OBJECTDIR}/src/HTTPAuthorizationRequest.o: src/HTTPAuthorizationRequest.cc
+${OBJECTDIR}/src/HTTPAuthorizationRequest.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPAuthorizationRequest.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPAuthorizationRequest.o src/HTTPAuthorizationRequest.cc
-${OBJECTDIR}/src/Principal.o: src/Principal.cc
+${OBJECTDIR}/src/Principal.o: nbproject/Makefile-${CND_CONF}.mk src/Principal.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Principal.o src/Principal.cc
-${OBJECTDIR}/src/Authorization.o: src/Authorization.cc
+${OBJECTDIR}/src/Authorization.o: nbproject/Makefile-${CND_CONF}.mk src/Authorization.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Authorization.o src/Authorization.cc
-${OBJECTDIR}/src/ServerConfig.o: src/ServerConfig.cc
+${OBJECTDIR}/src/ServerConfig.o: nbproject/Makefile-${CND_CONF}.mk src/ServerConfig.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ServerConfig.o src/ServerConfig.cc
-${OBJECTDIR}/src/HTTPServer.o: src/HTTPServer.cc
+${OBJECTDIR}/src/HTTPServer.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPServer.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPServer.o src/HTTPServer.cc
-${OBJECTDIR}/src/ConnectionPoint.o: src/ConnectionPoint.cc
+${OBJECTDIR}/src/ConnectionPoint.o: nbproject/Makefile-${CND_CONF}.mk src/ConnectionPoint.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ConnectionPoint.o src/ConnectionPoint.cc
-${OBJECTDIR}/src/HTTPResponse.o: src/HTTPResponse.cc
+${OBJECTDIR}/src/HTTPResponse.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPResponse.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPResponse.o src/HTTPResponse.cc
-${OBJECTDIR}/src/ConnectionHandler.o: src/ConnectionHandler.cc
+${OBJECTDIR}/src/ConnectionHandler.o: nbproject/Makefile-${CND_CONF}.mk src/ConnectionHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ConnectionHandler.o src/ConnectionHandler.cc
-${OBJECTDIR}/src/Credentials.o: src/Credentials.cc
+${OBJECTDIR}/src/Credentials.o: nbproject/Makefile-${CND_CONF}.mk src/Credentials.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Credentials.o src/Credentials.cc
-${OBJECTDIR}/src/HTTPRequestHandler.o: src/HTTPRequestHandler.cc
+${OBJECTDIR}/src/HTTPRequestHandler.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPRequestHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPRequestHandler.o src/HTTPRequestHandler.cc
-${OBJECTDIR}/src/HTTPMessage.o: src/HTTPMessage.cc
+${OBJECTDIR}/src/HTTPMessage.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPMessage.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPMessage.o src/HTTPMessage.cc
-${OBJECTDIR}/src/HTTPFileResponse.o: src/HTTPFileResponse.cc
+${OBJECTDIR}/src/HTTPFileResponse.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPFileResponse.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPFileResponse.o src/HTTPFileResponse.cc
-${OBJECTDIR}/src/HTTPParser.o: src/HTTPParser.cc
+${OBJECTDIR}/src/HTTPParser.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPParser.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPParser.o src/HTTPParser.cc
-${OBJECTDIR}/src/ClientSocket.o: src/ClientSocket.cc
+${OBJECTDIR}/src/ClientSocket.o: nbproject/Makefile-${CND_CONF}.mk src/ClientSocket.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ClientSocket.o src/ClientSocket.cc
-${OBJECTDIR}/src/AbstractSocket.o: src/AbstractSocket.cc
+${OBJECTDIR}/src/AbstractSocket.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractSocket.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractSocket.o src/AbstractSocket.cc
-${OBJECTDIR}/src/HTTPStatus.o: src/HTTPStatus.cc
+${OBJECTDIR}/src/HTTPStatus.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPStatus.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../IO/include -I../util/include -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPStatus.o src/HTTPStatus.cc
diff --git a/libs/networking/nbproject/Makefile-Release.mk b/libs/networking/nbproject/Makefile-Release.mk
index 50a2158..0f3eee8 100644
--- a/libs/networking/nbproject/Makefile-Release.mk
+++ b/libs/networking/nbproject/Makefile-Release.mk
@@ -81,92 +81,92 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libnetworking.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libnetworking.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libnetworking.a
-${OBJECTDIR}/src/HTTPRequest.o: src/HTTPRequest.cc
+${OBJECTDIR}/src/HTTPRequest.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPRequest.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPRequest.o src/HTTPRequest.cc
-${OBJECTDIR}/src/ServerSocket.o: src/ServerSocket.cc
+${OBJECTDIR}/src/ServerSocket.o: nbproject/Makefile-${CND_CONF}.mk src/ServerSocket.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ServerSocket.o src/ServerSocket.cc
-${OBJECTDIR}/src/HTTPAuthorizationRequest.o: src/HTTPAuthorizationRequest.cc
+${OBJECTDIR}/src/HTTPAuthorizationRequest.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPAuthorizationRequest.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPAuthorizationRequest.o src/HTTPAuthorizationRequest.cc
-${OBJECTDIR}/src/Principal.o: src/Principal.cc
+${OBJECTDIR}/src/Principal.o: nbproject/Makefile-${CND_CONF}.mk src/Principal.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Principal.o src/Principal.cc
-${OBJECTDIR}/src/Authorization.o: src/Authorization.cc
+${OBJECTDIR}/src/Authorization.o: nbproject/Makefile-${CND_CONF}.mk src/Authorization.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Authorization.o src/Authorization.cc
-${OBJECTDIR}/src/ServerConfig.o: src/ServerConfig.cc
+${OBJECTDIR}/src/ServerConfig.o: nbproject/Makefile-${CND_CONF}.mk src/ServerConfig.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ServerConfig.o src/ServerConfig.cc
-${OBJECTDIR}/src/HTTPServer.o: src/HTTPServer.cc
+${OBJECTDIR}/src/HTTPServer.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPServer.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPServer.o src/HTTPServer.cc
-${OBJECTDIR}/src/ConnectionPoint.o: src/ConnectionPoint.cc
+${OBJECTDIR}/src/ConnectionPoint.o: nbproject/Makefile-${CND_CONF}.mk src/ConnectionPoint.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ConnectionPoint.o src/ConnectionPoint.cc
-${OBJECTDIR}/src/HTTPResponse.o: src/HTTPResponse.cc
+${OBJECTDIR}/src/HTTPResponse.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPResponse.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPResponse.o src/HTTPResponse.cc
-${OBJECTDIR}/src/ConnectionHandler.o: src/ConnectionHandler.cc
+${OBJECTDIR}/src/ConnectionHandler.o: nbproject/Makefile-${CND_CONF}.mk src/ConnectionHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ConnectionHandler.o src/ConnectionHandler.cc
-${OBJECTDIR}/src/Credentials.o: src/Credentials.cc
+${OBJECTDIR}/src/Credentials.o: nbproject/Makefile-${CND_CONF}.mk src/Credentials.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Credentials.o src/Credentials.cc
-${OBJECTDIR}/src/HTTPRequestHandler.o: src/HTTPRequestHandler.cc
+${OBJECTDIR}/src/HTTPRequestHandler.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPRequestHandler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPRequestHandler.o src/HTTPRequestHandler.cc
-${OBJECTDIR}/src/HTTPMessage.o: src/HTTPMessage.cc
+${OBJECTDIR}/src/HTTPMessage.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPMessage.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPMessage.o src/HTTPMessage.cc
-${OBJECTDIR}/src/HTTPFileResponse.o: src/HTTPFileResponse.cc
+${OBJECTDIR}/src/HTTPFileResponse.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPFileResponse.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPFileResponse.o src/HTTPFileResponse.cc
-${OBJECTDIR}/src/HTTPParser.o: src/HTTPParser.cc
+${OBJECTDIR}/src/HTTPParser.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPParser.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPParser.o src/HTTPParser.cc
-${OBJECTDIR}/src/ClientSocket.o: src/ClientSocket.cc
+${OBJECTDIR}/src/ClientSocket.o: nbproject/Makefile-${CND_CONF}.mk src/ClientSocket.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ClientSocket.o src/ClientSocket.cc
-${OBJECTDIR}/src/AbstractSocket.o: src/AbstractSocket.cc
+${OBJECTDIR}/src/AbstractSocket.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractSocket.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractSocket.o src/AbstractSocket.cc
-${OBJECTDIR}/src/HTTPStatus.o: src/HTTPStatus.cc
+${OBJECTDIR}/src/HTTPStatus.o: nbproject/Makefile-${CND_CONF}.mk src/HTTPStatus.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/HTTPStatus.o src/HTTPStatus.cc
diff --git a/libs/networking/src/ServerConfig.cc b/libs/networking/src/ServerConfig.cc
index 29e12d9..b5f1969 100644
--- a/libs/networking/src/ServerConfig.cc
+++ b/libs/networking/src/ServerConfig.cc
@@ -121,38 +121,7 @@ int cServerConfig::Load(const char* FileName)
int numberOfEntries = 0;
while ((ce = cr->ReadEntry())) {
- std::string name = std::get<0>(*ce);
-
- if (!strcmp("media-root", name.c_str())) {
- SetDocumentRoot(std::get<1>(*ce).c_str());
- ++numberOfEntries;
- }
- else if (!strcmp("favicon", name.c_str())) {
- SetAppIcon(std::get<1>(*ce).c_str());
- ++numberOfEntries;
- }
- else if (!strcmp("cmps-port", name.c_str())) {
- SetPort(atoi(std::get<1>(*ce).c_str()));
- ++numberOfEntries;
- }
-#ifdef NOT_YET
- else if (!strcmp("want-auth", name.c_str())) {
- SetAuthorizationRequired(!strcasecmp("true", std::get<1>(*ce).c_str()));
- ++numberOfEntries;
- }
-#endif
- else if (!strcmp("want-meta", name.c_str())) {
- SetWantExtendedScan(!strcasecmp("true", std::get<1>(*ce).c_str()));
- ++numberOfEntries;
- }
- else if (!strcmp("mediainfo", name.c_str())) {
- SetMediaInfo(std::get<1>(*ce).c_str());
- ++numberOfEntries;
- }
- else if (!strcmp("ffmpeg", name.c_str())) {
- SetFFMpeg(std::get<1>(*ce).c_str());
- ++numberOfEntries;
- }
+ if (Eval(ce)) ++numberOfEntries;
delete ce;
}
cr->Close();
@@ -161,6 +130,43 @@ int cServerConfig::Load(const char* FileName)
return numberOfEntries > 0;
}
+bool cServerConfig::Eval(cConfigReader::ConfigEntry *Entry)
+{
+ std::string name = std::get<0>(*Entry);
+
+ if (!strcmp("media-root", name.c_str())) {
+ SetDocumentRoot(std::get<1>(*Entry).c_str());
+ return true;
+ }
+ else if (!strcmp("favicon", name.c_str())) {
+ SetAppIcon(std::get<1>(*Entry).c_str());
+ return true;
+ }
+ else if (!strcmp("cmps-port", name.c_str())) {
+ SetPort(atoi(std::get<1>(*Entry).c_str()));
+ return true;
+ }
+#ifdef NOT_YET
+ else if (!strcmp("want-auth", name.c_str())) {
+ SetAuthorizationRequired(!strcasecmp("true", std::get<1>(*ce).c_str()));
+ return true;
+ }
+#endif
+ else if (!strcmp("want-meta", name.c_str())) {
+ SetWantExtendedScan(!strcasecmp("true", std::get<1>(*Entry).c_str()));
+ return true;
+ }
+ else if (!strcmp("mediainfo", name.c_str())) {
+ SetMediaInfo(std::get<1>(*Entry).c_str());
+ return true;
+ }
+ else if (!strcmp("ffmpeg", name.c_str())) {
+ SetFFMpeg(std::get<1>(*Entry).c_str());
+ return true;
+ }
+ return false;
+}
+
int cServerConfig::Store(const char* FileName)
{
//TODO:
diff --git a/libs/util/nbproject/Makefile-Debug.mk b/libs/util/nbproject/Makefile-Debug.mk
index 2149f0d..fd4c1bd 100644
--- a/libs/util/nbproject/Makefile-Debug.mk
+++ b/libs/util/nbproject/Makefile-Debug.mk
@@ -73,52 +73,52 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libutil.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libutil.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libutil.a
-${OBJECTDIR}/src/JSonWriter.o: src/JSonWriter.cc
+${OBJECTDIR}/src/JSonWriter.o: nbproject/Makefile-${CND_CONF}.mk src/JSonWriter.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/JSonWriter.o src/JSonWriter.cc
-${OBJECTDIR}/src/StringBuilder.o: src/StringBuilder.cc
+${OBJECTDIR}/src/StringBuilder.o: nbproject/Makefile-${CND_CONF}.mk src/StringBuilder.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/StringBuilder.o src/StringBuilder.cc
-${OBJECTDIR}/src/MD5Calculator.o: src/MD5Calculator.cc
+${OBJECTDIR}/src/MD5Calculator.o: nbproject/Makefile-${CND_CONF}.mk src/MD5Calculator.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MD5Calculator.o src/MD5Calculator.cc
-${OBJECTDIR}/src/AbstractListAssembler.o: src/AbstractListAssembler.cc
+${OBJECTDIR}/src/AbstractListAssembler.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractListAssembler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractListAssembler.o src/AbstractListAssembler.cc
-${OBJECTDIR}/src/ManagedMap.o: src/ManagedMap.cc
+${OBJECTDIR}/src/ManagedMap.o: nbproject/Makefile-${CND_CONF}.mk src/ManagedMap.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ManagedMap.o src/ManagedMap.cc
-${OBJECTDIR}/src/Codec.o: src/Codec.cc
+${OBJECTDIR}/src/Codec.o: nbproject/Makefile-${CND_CONF}.mk src/Codec.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Codec.o src/Codec.cc
-${OBJECTDIR}/src/Url.o: src/Url.cc
+${OBJECTDIR}/src/Url.o: nbproject/Makefile-${CND_CONF}.mk src/Url.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Url.o src/Url.cc
-${OBJECTDIR}/src/ManagedVector.o: src/ManagedVector.cc
+${OBJECTDIR}/src/ManagedVector.o: nbproject/Makefile-${CND_CONF}.mk src/ManagedVector.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ManagedVector.o src/ManagedVector.cc
-${OBJECTDIR}/src/NamedValue.o: src/NamedValue.cc
+${OBJECTDIR}/src/NamedValue.o: nbproject/Makefile-${CND_CONF}.mk src/NamedValue.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/NamedValue.o src/NamedValue.cc
-${OBJECTDIR}/src/util.o: src/util.cc
+${OBJECTDIR}/src/util.o: nbproject/Makefile-${CND_CONF}.mk src/util.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I../vdr/include -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/util.o src/util.cc
diff --git a/libs/util/nbproject/Makefile-Release.mk b/libs/util/nbproject/Makefile-Release.mk
index 42ca655..b19aab0 100644
--- a/libs/util/nbproject/Makefile-Release.mk
+++ b/libs/util/nbproject/Makefile-Release.mk
@@ -73,52 +73,52 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libutil.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libutil.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libutil.a
-${OBJECTDIR}/src/JSonWriter.o: src/JSonWriter.cc
+${OBJECTDIR}/src/JSonWriter.o: nbproject/Makefile-${CND_CONF}.mk src/JSonWriter.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/JSonWriter.o src/JSonWriter.cc
-${OBJECTDIR}/src/StringBuilder.o: src/StringBuilder.cc
+${OBJECTDIR}/src/StringBuilder.o: nbproject/Makefile-${CND_CONF}.mk src/StringBuilder.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/StringBuilder.o src/StringBuilder.cc
-${OBJECTDIR}/src/MD5Calculator.o: src/MD5Calculator.cc
+${OBJECTDIR}/src/MD5Calculator.o: nbproject/Makefile-${CND_CONF}.mk src/MD5Calculator.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/MD5Calculator.o src/MD5Calculator.cc
-${OBJECTDIR}/src/AbstractListAssembler.o: src/AbstractListAssembler.cc
+${OBJECTDIR}/src/AbstractListAssembler.o: nbproject/Makefile-${CND_CONF}.mk src/AbstractListAssembler.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/AbstractListAssembler.o src/AbstractListAssembler.cc
-${OBJECTDIR}/src/ManagedMap.o: src/ManagedMap.cc
+${OBJECTDIR}/src/ManagedMap.o: nbproject/Makefile-${CND_CONF}.mk src/ManagedMap.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ManagedMap.o src/ManagedMap.cc
-${OBJECTDIR}/src/Codec.o: src/Codec.cc
+${OBJECTDIR}/src/Codec.o: nbproject/Makefile-${CND_CONF}.mk src/Codec.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Codec.o src/Codec.cc
-${OBJECTDIR}/src/Url.o: src/Url.cc
+${OBJECTDIR}/src/Url.o: nbproject/Makefile-${CND_CONF}.mk src/Url.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Url.o src/Url.cc
-${OBJECTDIR}/src/ManagedVector.o: src/ManagedVector.cc
+${OBJECTDIR}/src/ManagedVector.o: nbproject/Makefile-${CND_CONF}.mk src/ManagedVector.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ManagedVector.o src/ManagedVector.cc
-${OBJECTDIR}/src/NamedValue.o: src/NamedValue.cc
+${OBJECTDIR}/src/NamedValue.o: nbproject/Makefile-${CND_CONF}.mk src/NamedValue.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/NamedValue.o src/NamedValue.cc
-${OBJECTDIR}/src/util.o: src/util.cc
+${OBJECTDIR}/src/util.o: nbproject/Makefile-${CND_CONF}.mk src/util.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/util.o src/util.cc
diff --git a/libs/vdr/nbproject/Makefile-Debug.mk b/libs/vdr/nbproject/Makefile-Debug.mk
index e32e3d1..1830f8c 100644
--- a/libs/vdr/nbproject/Makefile-Debug.mk
+++ b/libs/vdr/nbproject/Makefile-Debug.mk
@@ -74,57 +74,57 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libvdr.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libvdr.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libvdr.a
-${OBJECTDIR}/src/TimeMs.o: src/TimeMs.cc
+${OBJECTDIR}/src/TimeMs.o: nbproject/Makefile-${CND_CONF}.mk src/TimeMs.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/TimeMs.o src/TimeMs.cc
-${OBJECTDIR}/src/StringList.o: src/StringList.cc
+${OBJECTDIR}/src/StringList.o: nbproject/Makefile-${CND_CONF}.mk src/StringList.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/StringList.o src/StringList.cc
-${OBJECTDIR}/src/Thread.o: src/Thread.cc
+${OBJECTDIR}/src/Thread.o: nbproject/Makefile-${CND_CONF}.mk src/Thread.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Thread.o src/Thread.cc
-${OBJECTDIR}/src/String.o: src/String.cc
+${OBJECTDIR}/src/String.o: nbproject/Makefile-${CND_CONF}.mk src/String.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/String.o src/String.cc
-${OBJECTDIR}/src/i18n.o: src/i18n.cc
+${OBJECTDIR}/src/i18n.o: nbproject/Makefile-${CND_CONF}.mk src/i18n.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/i18n.o src/i18n.cc
-${OBJECTDIR}/src/Logging.o: src/Logging.cc
+${OBJECTDIR}/src/Logging.o: nbproject/Makefile-${CND_CONF}.mk src/Logging.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Logging.o src/Logging.cc
-${OBJECTDIR}/src/ReadDir.o: src/ReadDir.cc
+${OBJECTDIR}/src/ReadDir.o: nbproject/Makefile-${CND_CONF}.mk src/ReadDir.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ReadDir.o src/ReadDir.cc
-${OBJECTDIR}/src/CondWait.o: src/CondWait.cc
+${OBJECTDIR}/src/CondWait.o: nbproject/Makefile-${CND_CONF}.mk src/CondWait.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CondWait.o src/CondWait.cc
-${OBJECTDIR}/src/FileNameList.o: src/FileNameList.cc
+${OBJECTDIR}/src/FileNameList.o: nbproject/Makefile-${CND_CONF}.mk src/FileNameList.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileNameList.o src/FileNameList.cc
-${OBJECTDIR}/src/Mutex.o: src/Mutex.cc
+${OBJECTDIR}/src/Mutex.o: nbproject/Makefile-${CND_CONF}.mk src/Mutex.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Mutex.o src/Mutex.cc
-${OBJECTDIR}/src/CharsetConv.o: src/CharsetConv.cc
+${OBJECTDIR}/src/CharsetConv.o: nbproject/Makefile-${CND_CONF}.mk src/CharsetConv.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -g -Wall -DLOCDIR=/usr/share/locale -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/include/freetype2 -I/usr/include/fribidi -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CharsetConv.o src/CharsetConv.cc
diff --git a/libs/vdr/nbproject/Makefile-Release.mk b/libs/vdr/nbproject/Makefile-Release.mk
index f539b5a..43dd354 100644
--- a/libs/vdr/nbproject/Makefile-Release.mk
+++ b/libs/vdr/nbproject/Makefile-Release.mk
@@ -74,57 +74,57 @@ ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libvdr.a: ${OBJECTFILES}
${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libvdr.a ${OBJECTFILES}
$(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libvdr.a
-${OBJECTDIR}/src/TimeMs.o: src/TimeMs.cc
+${OBJECTDIR}/src/TimeMs.o: nbproject/Makefile-${CND_CONF}.mk src/TimeMs.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/TimeMs.o src/TimeMs.cc
-${OBJECTDIR}/src/StringList.o: src/StringList.cc
+${OBJECTDIR}/src/StringList.o: nbproject/Makefile-${CND_CONF}.mk src/StringList.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/StringList.o src/StringList.cc
-${OBJECTDIR}/src/Thread.o: src/Thread.cc
+${OBJECTDIR}/src/Thread.o: nbproject/Makefile-${CND_CONF}.mk src/Thread.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Thread.o src/Thread.cc
-${OBJECTDIR}/src/String.o: src/String.cc
+${OBJECTDIR}/src/String.o: nbproject/Makefile-${CND_CONF}.mk src/String.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/String.o src/String.cc
-${OBJECTDIR}/src/i18n.o: src/i18n.cc
+${OBJECTDIR}/src/i18n.o: nbproject/Makefile-${CND_CONF}.mk src/i18n.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/i18n.o src/i18n.cc
-${OBJECTDIR}/src/Logging.o: src/Logging.cc
+${OBJECTDIR}/src/Logging.o: nbproject/Makefile-${CND_CONF}.mk src/Logging.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Logging.o src/Logging.cc
-${OBJECTDIR}/src/ReadDir.o: src/ReadDir.cc
+${OBJECTDIR}/src/ReadDir.o: nbproject/Makefile-${CND_CONF}.mk src/ReadDir.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/ReadDir.o src/ReadDir.cc
-${OBJECTDIR}/src/CondWait.o: src/CondWait.cc
+${OBJECTDIR}/src/CondWait.o: nbproject/Makefile-${CND_CONF}.mk src/CondWait.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CondWait.o src/CondWait.cc
-${OBJECTDIR}/src/FileNameList.o: src/FileNameList.cc
+${OBJECTDIR}/src/FileNameList.o: nbproject/Makefile-${CND_CONF}.mk src/FileNameList.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/FileNameList.o src/FileNameList.cc
-${OBJECTDIR}/src/Mutex.o: src/Mutex.cc
+${OBJECTDIR}/src/Mutex.o: nbproject/Makefile-${CND_CONF}.mk src/Mutex.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/Mutex.o src/Mutex.cc
-${OBJECTDIR}/src/CharsetConv.o: src/CharsetConv.cc
+${OBJECTDIR}/src/CharsetConv.o: nbproject/Makefile-${CND_CONF}.mk src/CharsetConv.cc
${MKDIR} -p ${OBJECTDIR}/src
${RM} $@.d
$(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/CharsetConv.o src/CharsetConv.cc