diff options
Diffstat (limited to 'libs/mediaScan')
26 files changed, 77 insertions, 170 deletions
diff --git a/libs/mediaScan/.dep.inc b/libs/mediaScan/.dep.inc deleted file mode 100644 index 4560e55..0000000 --- a/libs/mediaScan/.dep.inc +++ /dev/null @@ -1,5 +0,0 @@ -# This code depends on make tool being used -DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES})) -ifneq (${DEPFILES},) -include ${DEPFILES} -endif diff --git a/libs/mediaScan/include/AbstractMedia.h b/libs/mediaScan/include/AbstractMedia.h index 8c87dd5..b20f9cb 100644 --- a/libs/mediaScan/include/AbstractMedia.h +++ b/libs/mediaScan/include/AbstractMedia.h @@ -4,7 +4,7 @@ * File: AbstractMedia.h * Created: 2. Juli 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/AbstractMultiFileMovie.h b/libs/mediaScan/include/AbstractMultiFileMovie.h index 6913a74..f933b75 100644 --- a/libs/mediaScan/include/AbstractMultiFileMovie.h +++ b/libs/mediaScan/include/AbstractMultiFileMovie.h @@ -4,7 +4,7 @@ * File: AbstractMultiFileMovie.h * Created: 3. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/Audio.h b/libs/mediaScan/include/Audio.h index 42611c2..fb13f49 100644 --- a/libs/mediaScan/include/Audio.h +++ b/libs/mediaScan/include/Audio.h @@ -4,7 +4,7 @@ * File: Audio.h * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/DVDImage.h b/libs/mediaScan/include/DVDImage.h index 5845d77..ce48c79 100644 --- a/libs/mediaScan/include/DVDImage.h +++ b/libs/mediaScan/include/DVDImage.h @@ -4,7 +4,7 @@ * File: DVDImage.h * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/FSMediaScanner.h b/libs/mediaScan/include/FSMediaScanner.h index 1c85b46..a40bfb7 100644 --- a/libs/mediaScan/include/FSMediaScanner.h +++ b/libs/mediaScan/include/FSMediaScanner.h @@ -4,7 +4,7 @@ * File: FSMediaScanner.h * Created: 2. Juli 2012, 13 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/LegacyVdrRecording.h b/libs/mediaScan/include/LegacyVdrRecording.h index cc46348..1f73acb 100644 --- a/libs/mediaScan/include/LegacyVdrRecording.h +++ b/libs/mediaScan/include/LegacyVdrRecording.h @@ -4,7 +4,7 @@ * File: LegacyVdrRecording.h * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/MediaFactory.h b/libs/mediaScan/include/MediaFactory.h index 2ddcaa5..da7e113 100644 --- a/libs/mediaScan/include/MediaFactory.h +++ b/libs/mediaScan/include/MediaFactory.h @@ -4,7 +4,7 @@ * File: MediaFactory.h * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/MediainfoReader.h b/libs/mediaScan/include/MediainfoReader.h index f45b5e7..5e94785 100644 --- a/libs/mediaScan/include/MediainfoReader.h +++ b/libs/mediaScan/include/MediainfoReader.h @@ -1,10 +1,27 @@ -/* - * File: MediainfoReader.h - * Author: django - * - * Created on 30. Juli 2012, 15:03 +/** + * ======================== legal notice ====================== + * + * File: MediainfoReader.h + * Created: 30. Juli 2012, 15:03 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libMediaScan: mediatypes and media scanning + * + * 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 MEDIAINFOREADER_H #define MEDIAINFOREADER_H diff --git a/libs/mediaScan/include/Movie.h b/libs/mediaScan/include/Movie.h index 5a4f60d..e01903d 100644 --- a/libs/mediaScan/include/Movie.h +++ b/libs/mediaScan/include/Movie.h @@ -4,7 +4,7 @@ * File: Movie.h * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/Picture.h b/libs/mediaScan/include/Picture.h index 669509b..0ef37bb 100644 --- a/libs/mediaScan/include/Picture.h +++ b/libs/mediaScan/include/Picture.h @@ -4,7 +4,7 @@ * File: Picture.h * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/include/VdrRecording.h b/libs/mediaScan/include/VdrRecording.h index a8ec292..8e0789b 100644 --- a/libs/mediaScan/include/VdrRecording.h +++ b/libs/mediaScan/include/VdrRecording.h @@ -4,7 +4,7 @@ * File: VdrRecording.h * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/mediaScan.cbp b/libs/mediaScan/mediaScan.cbp deleted file mode 100644 index 3ee2b08..0000000 --- a/libs/mediaScan/mediaScan.cbp +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<CodeBlocks_project_file> - <FileVersion major="1" minor="6" /> - <Project> - <Option title="CMP.libs.mediaScan" /> - <Option pch_mode="2" /> - <Option compiler="gcc" /> - <Build> - <Target title="Debug"> - <Option output="mediaScan" prefix_auto="1" extension_auto="1" /> - <Option working_dir="" /> - <Option object_output="obj/Debug/" /> - <Option type="2" /> - <Option compiler="gcc" /> - <Option createDefFile="1" /> - <Compiler> - <Add option="-Wall" /> - <Add option="-g" /> - </Compiler> - </Target> - <Target title="Release"> - <Option output="mediaScan" prefix_auto="1" extension_auto="1" /> - <Option working_dir="" /> - <Option object_output="obj/Release/" /> - <Option type="2" /> - <Option compiler="gcc" /> - <Option createDefFile="1" /> - <Compiler> - <Add option="-Wall" /> - <Add option="-O2" /> - </Compiler> - <Linker> - <Add option="-s" /> - </Linker> - </Target> - </Build> - <Compiler> - <Add option="-std=gnu++0x -fomit-frame-pointer -fPIC -pthread -Wall -Wno-parentheses -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration" /> - <Add option="-D_REENTRANT" /> - <Add option="-D_GNU_SOURCE=1" /> - <Add directory="../vdr/include" /> - <Add directory="../util/include" /> - <Add directory="../IO/include" /> - <Add directory="../networking/include" /> - <Add directory="include" /> - </Compiler> - <Unit filename="include/AbstractMedia.h" /> - <Unit filename="include/AbstractMultiFileMovie.h" /> - <Unit filename="include/Audio.h" /> - <Unit filename="include/DVDImage.h" /> - <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" /> - <Unit filename="src/AbstractMedia.cc" /> - <Unit filename="src/AbstractMultiFileMovie.cc" /> - <Unit filename="src/Audio.cc" /> - <Unit filename="src/DVDImage.cc" /> - <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" /> - <Extensions> - <code_completion /> - <envvars /> - <lib_finder disable_auto="1" /> - <debugger /> - </Extensions> - </Project> -</CodeBlocks_project_file> diff --git a/libs/mediaScan/mediaScan.depend b/libs/mediaScan/mediaScan.depend deleted file mode 100644 index c4ac310..0000000 --- a/libs/mediaScan/mediaScan.depend +++ /dev/null @@ -1 +0,0 @@ -# depslib dependency file v1.0 diff --git a/libs/mediaScan/mediaScan.layout b/libs/mediaScan/mediaScan.layout deleted file mode 100644 index e7fed61..0000000 --- a/libs/mediaScan/mediaScan.layout +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> -<CodeBlocks_layout_file> - <ActiveTarget name="Debug" /> - <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="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"> - <Cursor> - <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="src/VdrRecording.cc" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0"> - <Cursor> - <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"> - <Cursor> - <Cursor1 position="1317" topLine="18" /> - </Cursor> - </File> -</CodeBlocks_layout_file> diff --git a/libs/mediaScan/src/AbstractMedia.cc b/libs/mediaScan/src/AbstractMedia.cc index 924f01a..98c72bb 100644 --- a/libs/mediaScan/src/AbstractMedia.cc +++ b/libs/mediaScan/src/AbstractMedia.cc @@ -4,7 +4,7 @@ * File: AbstractMedia.cc * Created: 2. Juli 2012, 14 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/AbstractMultiFileMovie.cc b/libs/mediaScan/src/AbstractMultiFileMovie.cc index f679511..7ff8b10 100644 --- a/libs/mediaScan/src/AbstractMultiFileMovie.cc +++ b/libs/mediaScan/src/AbstractMultiFileMovie.cc @@ -4,7 +4,7 @@ * File: AbstractMultiFileMovie.cc * Created: 3. Juli 2012, 07 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/Audio.cc b/libs/mediaScan/src/Audio.cc index 6c90fbc..a17517f 100644 --- a/libs/mediaScan/src/Audio.cc +++ b/libs/mediaScan/src/Audio.cc @@ -4,7 +4,7 @@ * File: Audio.cc * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/DVDImage.cc b/libs/mediaScan/src/DVDImage.cc index 0d23ae1..1df6d1e 100644 --- a/libs/mediaScan/src/DVDImage.cc +++ b/libs/mediaScan/src/DVDImage.cc @@ -4,7 +4,7 @@ * File: DVDImage.cc * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/FSMediaScanner.cc b/libs/mediaScan/src/FSMediaScanner.cc index f4ac14e..2df5907 100644 --- a/libs/mediaScan/src/FSMediaScanner.cc +++ b/libs/mediaScan/src/FSMediaScanner.cc @@ -4,7 +4,7 @@ * File: FSMediaScanner.cc * Created: 2. Juli 2012, 13 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/LegacyVdrRecording.cc b/libs/mediaScan/src/LegacyVdrRecording.cc index 5ee635c..3c74b6e 100644 --- a/libs/mediaScan/src/LegacyVdrRecording.cc +++ b/libs/mediaScan/src/LegacyVdrRecording.cc @@ -4,7 +4,7 @@ * File: LegacyVdrRecording.cc * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/MediaFactory.cc b/libs/mediaScan/src/MediaFactory.cc index 4dec763..0af2fae 100644 --- a/libs/mediaScan/src/MediaFactory.cc +++ b/libs/mediaScan/src/MediaFactory.cc @@ -4,7 +4,7 @@ * File: MediaFactory.cc * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/MediainfoReader.cc b/libs/mediaScan/src/MediainfoReader.cc index cd1f3f6..e55b8d9 100644 --- a/libs/mediaScan/src/MediainfoReader.cc +++ b/libs/mediaScan/src/MediainfoReader.cc @@ -1,8 +1,26 @@ -/* - * File: MediainfoReader.cc - * Author: django - * - * Created on 30. Juli 2012, 15:03 +/** + * ======================== legal notice ====================== + * + * File: MediainfoReader.cc + * Created: 30. Juli 2012, 15:03 + * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> + * Project: libMediaScan: mediatypes and media scanning + * + * 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 <MediainfoReader.h> #include <LineReader.h> @@ -10,6 +28,10 @@ #include <pcrecpp.h> #include <vector> +static pcrecpp::RE comment("^\\s*#.*$"); +static pcrecpp::RE emptyLine("^\\s*$"); +static pcrecpp::RE entry("^\\s*(.+?)\\s*:\\s*(.+?)\\s*$"); + cMediainfoReader::cMediainfoReader(cLineReader *LineReader) : reader(LineReader) { @@ -46,24 +68,18 @@ 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; + do { + if (line && entry.FullMatch(line, &name, &value)) { + if (IsValuable(name)) { + rv = new InfoEntry(name, value); + break; } - rv = new InfoEntry(name, value); - break; } + line = reader->ReadLine(); + } while (line && !rv); return rv; } diff --git a/libs/mediaScan/src/Movie.cc b/libs/mediaScan/src/Movie.cc index a63ff19..042b397 100644 --- a/libs/mediaScan/src/Movie.cc +++ b/libs/mediaScan/src/Movie.cc @@ -4,7 +4,7 @@ * File: Movie.cc * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/Picture.cc b/libs/mediaScan/src/Picture.cc index 19a02a1..5253a78 100644 --- a/libs/mediaScan/src/Picture.cc +++ b/libs/mediaScan/src/Picture.cc @@ -4,7 +4,7 @@ * File: Picture.cc * Created: 2. Juli 2012, 15 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * diff --git a/libs/mediaScan/src/VdrRecording.cc b/libs/mediaScan/src/VdrRecording.cc index 03abccf..10b6476 100644 --- a/libs/mediaScan/src/VdrRecording.cc +++ b/libs/mediaScan/src/VdrRecording.cc @@ -4,7 +4,7 @@ * File: VdrRecording.cc * Created: 3. Juli 2012, 08 * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: libfsScan: mediatypes and filesystem scanning + * Project: libMediaScan: mediatypes and media scanning * * CMP - compound media player * |