diff options
author | geronimo <geronimo013@gmx.de> | 2012-07-30 17:51:05 +0200 |
---|---|---|
committer | geronimo <geronimo013@gmx.de> | 2012-07-30 17:51:05 +0200 |
commit | ad667186c0c45cfca9d3f153faec7ce35545b238 (patch) | |
tree | db5ab8a2bb22c418bc8a233db3c4955ed16957c5 /libs | |
parent | 41922cdaf9c8db57c6b51f090eefe95b0008a0fb (diff) | |
download | cmp-ad667186c0c45cfca9d3f153faec7ce35545b238.tar.gz cmp-ad667186c0c45cfca9d3f153faec7ce35545b238.tar.bz2 |
created more readers
Diffstat (limited to 'libs')
-rw-r--r-- | libs/IO/IO.layout | 37 | ||||
-rw-r--r-- | libs/IO/include/ConfigReader.h | 14 | ||||
-rw-r--r-- | libs/IO/src/ConfigReader.cc | 14 | ||||
-rw-r--r-- | libs/mediaScan/include/MediainfoReader.h | 34 | ||||
-rw-r--r-- | libs/mediaScan/mediaScan.cbp | 2 | ||||
-rw-r--r-- | libs/mediaScan/mediaScan.layout | 28 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/Makefile-Debug.mk | 18 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/Makefile-Release.mk | 18 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/Makefile-impl.mk | 2 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/Makefile-variables.mk | 16 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/Package-Debug.bash | 12 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/Package-Release.bash | 12 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/configurations.xml | 2 | ||||
-rw-r--r-- | libs/mediaScan/nbproject/project.xml | 2 | ||||
-rw-r--r-- | libs/mediaScan/src/MediainfoReader.cc | 69 | ||||
-rw-r--r-- | libs/networking/networking.layout | 28 | ||||
-rw-r--r-- | libs/networking/src/ServerConfig.cc | 14 | ||||
-rw-r--r-- | libs/util/util.layout | 34 | ||||
-rw-r--r-- | libs/vdr/vdr.layout | 16 |
19 files changed, 258 insertions, 114 deletions
diff --git a/libs/IO/IO.layout b/libs/IO/IO.layout index 4af9097..05f76d8 100644 --- a/libs/IO/IO.layout +++ b/libs/IO/IO.layout @@ -1,9 +1,24 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/FileReader.cc" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/CommandReader.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="737" topLine="0" /> + <Cursor1 position="0" topLine="0" /> + </Cursor> + </File> + <File name="src/LineReader.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="854" topLine="0" /> + </Cursor> + </File> + <File name="src/FileRepresentation.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="1846" topLine="0" /> + </Cursor> + </File> + <File name="src/CommandReader.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="3381" topLine="0" /> </Cursor> </File> <File name="src/ConfigReader.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -11,29 +26,29 @@ <Cursor1 position="459" topLine="0" /> </Cursor> </File> - <File name="src/File.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/File.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="1130" topLine="0" /> </Cursor> </File> - <File name="include/ConfigReader.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/FileReader.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="475" topLine="0" /> + <Cursor1 position="737" topLine="0" /> </Cursor> </File> - <File name="src/FileRepresentation.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/Reader.cc" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1846" topLine="0" /> + <Cursor1 position="1176" topLine="0" /> </Cursor> </File> - <File name="src/LineReader.cc" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/File.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="854" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/File.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ConfigReader.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="475" topLine="0" /> </Cursor> </File> </CodeBlocks_layout_file> diff --git a/libs/IO/include/ConfigReader.h b/libs/IO/include/ConfigReader.h index 6d0cd30..909d6a8 100644 --- a/libs/IO/include/ConfigReader.h +++ b/libs/IO/include/ConfigReader.h @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ConfigReader.h * Created: 28. Juli 2012, 18:41 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libIO: classes for files, filesystem and input/output - * + * * 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 CONFIGREADER_H @@ -37,7 +37,7 @@ public: virtual ~cConfigReader(); void Close(void); - ConfigEntry *ReadValue(void); + ConfigEntry *ReadEntry(void); private: cLineReader *reader; diff --git a/libs/IO/src/ConfigReader.cc b/libs/IO/src/ConfigReader.cc index 152c908..2b31343 100644 --- a/libs/IO/src/ConfigReader.cc +++ b/libs/IO/src/ConfigReader.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ConfigReader.cc * Created: 28. Juli 2012, 18:41 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libIO: classes for files, filesystem and input/output - * + * * 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 <ConfigReader.h> @@ -45,7 +45,7 @@ void cConfigReader::Close(void) } } -cConfigReader::ConfigEntry *cConfigReader::ReadValue() +cConfigReader::ConfigEntry *cConfigReader::ReadEntry() { if (!reader) return NULL; const char *line = reader->ReadLine(); diff --git a/libs/mediaScan/include/MediainfoReader.h b/libs/mediaScan/include/MediainfoReader.h new file mode 100644 index 0000000..f45b5e7 --- /dev/null +++ b/libs/mediaScan/include/MediainfoReader.h @@ -0,0 +1,34 @@ +/* + * File: MediainfoReader.h + * Author: django + * + * Created on 30. Juli 2012, 15:03 + */ + +#ifndef MEDIAINFOREADER_H +#define MEDIAINFOREADER_H + +#include <tuple> +#include <string> +#include <vector> + +class cLineReader; +class cMediainfoReader { +public: + typedef std::tuple <std::string, std::string> InfoEntry; + + cMediainfoReader(cLineReader *LineReader); + virtual ~cMediainfoReader(); + + void AddValuableKey(const char *Key); + void Close(void); + bool IsValuable(std::string &key); + InfoEntry *ReadEntry(void); + +private: + cLineReader *reader; + std::vector<std::string> valuableKeys; + }; + +#endif /* MEDIAINFOREADER_H */ + diff --git a/libs/mediaScan/mediaScan.cbp b/libs/mediaScan/mediaScan.cbp index 6d4d7ec..3ee2b08 100644 --- a/libs/mediaScan/mediaScan.cbp +++ b/libs/mediaScan/mediaScan.cbp @@ -51,6 +51,7 @@ <Unit filename="include/FSMediaScanner.h" /> <Unit filename="include/LegacyVdrRecording.h" /> <Unit filename="include/MediaFactory.h" /> + <Unit filename="include/MediainfoReader.h" /> <Unit filename="include/Movie.h" /> <Unit filename="include/Picture.h" /> <Unit filename="include/VdrRecording.h" /> @@ -61,6 +62,7 @@ <Unit filename="src/FSMediaScanner.cc" /> <Unit filename="src/LegacyVdrRecording.cc" /> <Unit filename="src/MediaFactory.cc" /> + <Unit filename="src/MediainfoReader.cc" /> <Unit filename="src/Movie.cc" /> <Unit filename="src/Picture.cc" /> <Unit filename="src/VdrRecording.cc" /> diff --git a/libs/mediaScan/mediaScan.layout b/libs/mediaScan/mediaScan.layout index 4398ab3..e7fed61 100644 --- a/libs/mediaScan/mediaScan.layout +++ b/libs/mediaScan/mediaScan.layout @@ -1,9 +1,19 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/MediainfoReader.h" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1404" topLine="0" /> + <Cursor1 position="459" topLine="0" /> + </Cursor> + </File> + <File name="include/AbstractMedia.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="1008" topLine="0" /> + </Cursor> + </File> + <File name="src/MediainfoReader.cc" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="1061" topLine="0" /> </Cursor> </File> <File name="src/LegacyVdrRecording.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -11,14 +21,19 @@ <Cursor1 position="1450" topLine="0" /> </Cursor> </File> + <File name="include/MediaFactory.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="1670" topLine="0" /> + </Cursor> + </File> <File name="src/AbstractMedia.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="1453" topLine="0" /> </Cursor> </File> - <File name="include/MediaFactory.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1670" topLine="0" /> + <Cursor1 position="1404" topLine="0" /> </Cursor> </File> <File name="src/MediaFactory.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -26,9 +41,4 @@ <Cursor1 position="1317" topLine="18" /> </Cursor> </File> - <File name="include/AbstractMedia.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="1008" topLine="0" /> - </Cursor> - </File> </CodeBlocks_layout_file> diff --git a/libs/mediaScan/nbproject/Makefile-Debug.mk b/libs/mediaScan/nbproject/Makefile-Debug.mk index 1e0062b..57923a8 100644 --- a/libs/mediaScan/nbproject/Makefile-Debug.mk +++ b/libs/mediaScan/nbproject/Makefile-Debug.mk @@ -41,6 +41,7 @@ OBJECTFILES= \ ${OBJECTDIR}/src/VdrRecording.o \ ${OBJECTDIR}/src/MediaFactory.o \ ${OBJECTDIR}/src/LegacyVdrRecording.o \ + ${OBJECTDIR}/src/MediainfoReader.o \ ${OBJECTDIR}/src/FSMediaScanner.o \ ${OBJECTDIR}/src/AbstractMultiFileMovie.o \ ${OBJECTDIR}/src/AbstractMedia.o \ @@ -65,13 +66,13 @@ LDLIBSOPTIONS= # Build Targets .build-conf: ${BUILD_SUBPROJECTS} - "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a -${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a: ${OBJECTFILES} +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a: ${OBJECTFILES} ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a - ${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a ${OBJECTFILES} - $(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a + ${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 ${MKDIR} -p ${OBJECTDIR}/src @@ -103,6 +104,11 @@ ${OBJECTDIR}/src/LegacyVdrRecording.o: src/LegacyVdrRecording.cc ${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 + ${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 ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d @@ -133,7 +139,7 @@ ${OBJECTDIR}/src/Movie.o: src/Movie.cc # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r ${CND_BUILDDIR}/${CND_CONF} - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a # Subprojects .clean-subprojects: diff --git a/libs/mediaScan/nbproject/Makefile-Release.mk b/libs/mediaScan/nbproject/Makefile-Release.mk index bc8c6a9..2b0a333 100644 --- a/libs/mediaScan/nbproject/Makefile-Release.mk +++ b/libs/mediaScan/nbproject/Makefile-Release.mk @@ -41,6 +41,7 @@ OBJECTFILES= \ ${OBJECTDIR}/src/VdrRecording.o \ ${OBJECTDIR}/src/MediaFactory.o \ ${OBJECTDIR}/src/LegacyVdrRecording.o \ + ${OBJECTDIR}/src/MediainfoReader.o \ ${OBJECTDIR}/src/FSMediaScanner.o \ ${OBJECTDIR}/src/AbstractMultiFileMovie.o \ ${OBJECTDIR}/src/AbstractMedia.o \ @@ -65,13 +66,13 @@ LDLIBSOPTIONS= # Build Targets .build-conf: ${BUILD_SUBPROJECTS} - "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a -${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a: ${OBJECTFILES} +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a: ${OBJECTFILES} ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a - ${AR} -rv ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a ${OBJECTFILES} - $(RANLIB) ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a + ${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 ${MKDIR} -p ${OBJECTDIR}/src @@ -103,6 +104,11 @@ ${OBJECTDIR}/src/LegacyVdrRecording.o: src/LegacyVdrRecording.cc ${RM} $@.d $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/src/LegacyVdrRecording.o src/LegacyVdrRecording.cc +${OBJECTDIR}/src/MediainfoReader.o: 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 ${MKDIR} -p ${OBJECTDIR}/src ${RM} $@.d @@ -129,7 +135,7 @@ ${OBJECTDIR}/src/Movie.o: src/Movie.cc # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r ${CND_BUILDDIR}/${CND_CONF} - ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a + ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a # Subprojects .clean-subprojects: diff --git a/libs/mediaScan/nbproject/Makefile-impl.mk b/libs/mediaScan/nbproject/Makefile-impl.mk index 1d398f7..84fe472 100644 --- a/libs/mediaScan/nbproject/Makefile-impl.mk +++ b/libs/mediaScan/nbproject/Makefile-impl.mk @@ -24,7 +24,7 @@ CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} # Project Name -PROJECTNAME=fsScan +PROJECTNAME=mediaScan # Active Configuration DEFAULTCONF=Debug diff --git a/libs/mediaScan/nbproject/Makefile-variables.mk b/libs/mediaScan/nbproject/Makefile-variables.mk index e22487e..0b0bf57 100644 --- a/libs/mediaScan/nbproject/Makefile-variables.mk +++ b/libs/mediaScan/nbproject/Makefile-variables.mk @@ -9,19 +9,19 @@ CND_DISTDIR=dist # Debug configuration CND_PLATFORM_Debug=GNU-Linux-x86 CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux-x86 -CND_ARTIFACT_NAME_Debug=libfsscan.a -CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/libfsscan.a +CND_ARTIFACT_NAME_Debug=libmediascan.a +CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux-x86/libmediascan.a CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux-x86/package -CND_PACKAGE_NAME_Debug=fsScan.tar -CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/fsScan.tar +CND_PACKAGE_NAME_Debug=mediaScan.tar +CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux-x86/package/mediaScan.tar # Release configuration CND_PLATFORM_Release=GNU-Linux-x86 CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux-x86 -CND_ARTIFACT_NAME_Release=libfsscan.a -CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/libfsscan.a +CND_ARTIFACT_NAME_Release=libmediascan.a +CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux-x86/libmediascan.a CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux-x86/package -CND_PACKAGE_NAME_Release=fsScan.tar -CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/fsScan.tar +CND_PACKAGE_NAME_Release=mediaScan.tar +CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux-x86/package/mediaScan.tar # # include compiler specific variables # diff --git a/libs/mediaScan/nbproject/Package-Debug.bash b/libs/mediaScan/nbproject/Package-Debug.bash index 2a9c453..a76f06a 100644 --- a/libs/mediaScan/nbproject/Package-Debug.bash +++ b/libs/mediaScan/nbproject/Package-Debug.bash @@ -12,9 +12,9 @@ CND_DISTDIR=dist CND_BUILDDIR=build NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging TMPDIRNAME=tmp-packaging -OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a -OUTPUT_BASENAME=libfsscan.a -PACKAGE_TOP_DIR=fsScan/ +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a +OUTPUT_BASENAME=libmediascan.a +PACKAGE_TOP_DIR=mediaScan/ # Functions function checkReturnCode @@ -59,15 +59,15 @@ mkdir -p ${NBTMPDIR} # Copy files and create directories and links cd "${TOP}" -makeDirectory "${NBTMPDIR}/fsScan/lib" +makeDirectory "${NBTMPDIR}/mediaScan/lib" copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}lib/${OUTPUT_BASENAME}" 0644 # Generate tar file cd "${TOP}" -rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/fsScan.tar +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/mediaScan.tar cd ${NBTMPDIR} -tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/fsScan.tar * +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/mediaScan.tar * checkReturnCode # Cleanup diff --git a/libs/mediaScan/nbproject/Package-Release.bash b/libs/mediaScan/nbproject/Package-Release.bash index d996196..bcbe0fc 100644 --- a/libs/mediaScan/nbproject/Package-Release.bash +++ b/libs/mediaScan/nbproject/Package-Release.bash @@ -12,9 +12,9 @@ CND_DISTDIR=dist CND_BUILDDIR=build NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging TMPDIRNAME=tmp-packaging -OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libfsscan.a -OUTPUT_BASENAME=libfsscan.a -PACKAGE_TOP_DIR=fsScan/ +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/libmediascan.a +OUTPUT_BASENAME=libmediascan.a +PACKAGE_TOP_DIR=mediaScan/ # Functions function checkReturnCode @@ -59,15 +59,15 @@ mkdir -p ${NBTMPDIR} # Copy files and create directories and links cd "${TOP}" -makeDirectory "${NBTMPDIR}/fsScan/lib" +makeDirectory "${NBTMPDIR}/mediaScan/lib" copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}lib/${OUTPUT_BASENAME}" 0644 # Generate tar file cd "${TOP}" -rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/fsScan.tar +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/mediaScan.tar cd ${NBTMPDIR} -tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/fsScan.tar * +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/mediaScan.tar * checkReturnCode # Cleanup diff --git a/libs/mediaScan/nbproject/configurations.xml b/libs/mediaScan/nbproject/configurations.xml index 9984a4c..733c5d2 100644 --- a/libs/mediaScan/nbproject/configurations.xml +++ b/libs/mediaScan/nbproject/configurations.xml @@ -11,6 +11,7 @@ <itemPath>include/FSMediaScanner.h</itemPath> <itemPath>include/LegacyVdrRecording.h</itemPath> <itemPath>include/MediaFactory.h</itemPath> + <itemPath>include/MediainfoReader.h</itemPath> <itemPath>include/Movie.h</itemPath> <itemPath>include/Picture.h</itemPath> <itemPath>include/VdrRecording.h</itemPath> @@ -29,6 +30,7 @@ <itemPath>src/FSMediaScanner.cc</itemPath> <itemPath>src/LegacyVdrRecording.cc</itemPath> <itemPath>src/MediaFactory.cc</itemPath> + <itemPath>src/MediainfoReader.cc</itemPath> <itemPath>src/Movie.cc</itemPath> <itemPath>src/Picture.cc</itemPath> <itemPath>src/VdrRecording.cc</itemPath> diff --git a/libs/mediaScan/nbproject/project.xml b/libs/mediaScan/nbproject/project.xml index f749866..f0742a0 100644 --- a/libs/mediaScan/nbproject/project.xml +++ b/libs/mediaScan/nbproject/project.xml @@ -3,7 +3,7 @@ <type>org.netbeans.modules.cnd.makeproject</type> <configuration> <data xmlns="http://www.netbeans.org/ns/make-project/1"> - <name>fsScan</name> + <name>mediaScan</name> <c-extensions/> <cpp-extensions>cc</cpp-extensions> <header-extensions>h</header-extensions> diff --git a/libs/mediaScan/src/MediainfoReader.cc b/libs/mediaScan/src/MediainfoReader.cc new file mode 100644 index 0000000..cd1f3f6 --- /dev/null +++ b/libs/mediaScan/src/MediainfoReader.cc @@ -0,0 +1,69 @@ +/* + * File: MediainfoReader.cc + * Author: django + * + * Created on 30. Juli 2012, 15:03 + */ +#include <MediainfoReader.h> +#include <LineReader.h> +#include <stddef.h> +#include <pcrecpp.h> +#include <vector> + +cMediainfoReader::cMediainfoReader(cLineReader *LineReader) + : reader(LineReader) +{ +} + +cMediainfoReader::~cMediainfoReader() +{ + Close(); +} + +void cMediainfoReader::AddValuableKey(const char* Key) +{ + valuableKeys.push_back(Key); +} + +void cMediainfoReader::Close(void) +{ + if (reader) { + delete reader; + reader = NULL; + } +} + +bool cMediainfoReader::IsValuable(std::string &key) +{ + for (size_t i=0; i < valuableKeys.size(); ++i) { + if (!strcmp(key.c_str(), valuableKeys[i].c_str())) + return true; + } + return false; +} + +cMediainfoReader::InfoEntry *cMediainfoReader::ReadEntry() +{ + if (!reader) return NULL; + const char *line = reader->ReadLine(); + static pcrecpp::RE comment("^\\s*#.*$"); + static pcrecpp::RE emptyLine("^\\s*$"); + static pcrecpp::RE entry("^\\s*(.+?)\\s*:\\s*(.+?)\\s*$"); + std::string name, value; + InfoEntry *rv = NULL; + + while (line && (comment.FullMatch(line) || emptyLine.FullMatch(line))) + line = reader->ReadLine(); + while (line && !entry.FullMatch(line, &name, &value)) + line = reader->ReadLine(); + while (line && entry.FullMatch(line, &name, &value)) { + if (!IsValuable(name)) { + line = reader->ReadLine(); + continue; + } + rv = new InfoEntry(name, value); + break; + } + return rv; +} + diff --git a/libs/networking/networking.layout b/libs/networking/networking.layout index 9cd0301..e4e1faa 100644 --- a/libs/networking/networking.layout +++ b/libs/networking/networking.layout @@ -1,49 +1,49 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/ServerConfig.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1670" topLine="0" /> </Cursor> </File> - <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/HTTPResponse.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/ConnectionHandler.cc" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="12222" topLine="271" /> </Cursor> </File> - <File name="include/ServerConfig.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/HTTPFileResponse.cc" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1684" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/HTTPMessage.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/ConnectionPoint.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/HTTPMessage.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/ConnectionHandler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/HTTPMessage.cc" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1551" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/HTTPResponse.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ConnectionHandler.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/ServerConfig.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ServerConfig.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1670" topLine="0" /> + <Cursor1 position="1684" topLine="0" /> </Cursor> </File> <File name="src/ConnectionPoint.cc" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> diff --git a/libs/networking/src/ServerConfig.cc b/libs/networking/src/ServerConfig.cc index fec6107..8fb7f0f 100644 --- a/libs/networking/src/ServerConfig.cc +++ b/libs/networking/src/ServerConfig.cc @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== - * + * * File: ServerConfig.cc * Created: 8. Juli 2012, 06 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> * Project: libnetworking: classes for tcp/ip sockets and http-protocol handling - * + * * 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 <ServerConfig.h> @@ -120,7 +120,7 @@ int cServerConfig::Load(const char* FileName) cConfigReader::ConfigEntry *ce; int numberOfEntries = 0; - while ((ce = cr->ReadValue())) { + while ((ce = cr->ReadEntry())) { std::string name = std::get<0>(*ce); if (!strcmp("media-root", name.c_str())) { diff --git a/libs/util/util.layout b/libs/util/util.layout index c12bb95..c2c66a9 100644 --- a/libs/util/util.layout +++ b/libs/util/util.layout @@ -1,29 +1,24 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="src/ManagedMap.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="include/ManagedMap.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/ManagedVector.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/StringBuilder.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <Cursor1 position="1953" topLine="59" /> - </Cursor> - </File> - <File name="include/Codec.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/StringBuilder.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1385" topLine="0" /> + <Cursor1 position="1959" topLine="0" /> </Cursor> </File> - <File name="src/Codec.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/ManagedMap.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1327" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> <File name="include/JSonWriter.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -31,19 +26,19 @@ <Cursor1 position="1532" topLine="0" /> </Cursor> </File> - <File name="src/AbstractListAssembler.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/Codec.h" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1385" topLine="0" /> </Cursor> </File> - <File name="include/ManagedVector.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/Codec.cc" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="1327" topLine="0" /> </Cursor> </File> - <File name="include/StringBuilder.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/StringBuilder.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1959" topLine="0" /> + <Cursor1 position="1953" topLine="59" /> </Cursor> </File> <File name="src/JSonWriter.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -51,4 +46,9 @@ <Cursor1 position="1655" topLine="3" /> </Cursor> </File> + <File name="include/ManagedMap.h" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <Cursor> + <Cursor1 position="0" topLine="0" /> + </Cursor> + </File> </CodeBlocks_layout_file> diff --git a/libs/vdr/vdr.layout b/libs/vdr/vdr.layout index 3827c1a..2e909c1 100644 --- a/libs/vdr/vdr.layout +++ b/libs/vdr/vdr.layout @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <CodeBlocks_layout_file> <ActiveTarget name="Debug" /> - <File name="include/Thread.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> </File> - <File name="src/i18n.cc" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/Thread.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> <Cursor1 position="0" topLine="0" /> </Cursor> @@ -21,14 +21,14 @@ <Cursor1 position="5244" topLine="0" /> </Cursor> </File> - <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="include/Logging.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="3680" topLine="57" /> + <Cursor1 position="1690" topLine="0" /> </Cursor> </File> - <File name="include/Logging.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="1690" topLine="0" /> + <Cursor1 position="0" topLine="0" /> </Cursor> </File> <File name="src/TimeMs.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> @@ -36,9 +36,9 @@ <Cursor1 position="2160" topLine="0" /> </Cursor> </File> - <File name="src/Thread.cc" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> + <File name="src/CharsetConv.cc" open="0" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> <Cursor> - <Cursor1 position="0" topLine="0" /> + <Cursor1 position="3680" topLine="57" /> </Cursor> </File> </CodeBlocks_layout_file> |