summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command/audio.cpp5
-rw-r--r--command/audio.h10
-rw-r--r--command/decoder.cpp16
-rw-r--r--command/decoder.h16
-rw-r--r--command/marks.cpp11
-rw-r--r--command/marks.h9
-rw-r--r--command/pes2es.cpp4
-rw-r--r--command/pes2es.h4
-rw-r--r--command/queue.cpp8
-rw-r--r--command/queue.h7
-rw-r--r--command/streaminfo.cpp3
-rw-r--r--command/streaminfo.h4
-rw-r--r--command/ts2pkt.cpp8
-rw-r--r--command/ts2pkt.h8
-rw-r--r--command/video.cpp11
-rw-r--r--command/video.h13
-rw-r--r--plugin/markad.cpp5
-rw-r--r--plugin/markad.h6
-rw-r--r--plugin/menu.cpp4
-rw-r--r--plugin/menu.h3
-rw-r--r--plugin/setup.h1
21 files changed, 76 insertions, 80 deletions
diff --git a/command/audio.cpp b/command/audio.cpp
index 3882de2..a5fc357 100644
--- a/command/audio.cpp
+++ b/command/audio.cpp
@@ -6,6 +6,11 @@
* $Id$
*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "audio.h"
cMarkAdAudio::cMarkAdAudio(MarkAdContext *maContext)
diff --git a/command/audio.h b/command/audio.h
index 5249a5a..bb751ae 100644
--- a/command/audio.h
+++ b/command/audio.h
@@ -8,18 +8,8 @@
#ifndef __audio_h_
#define __audio_h_
-#include <netinet/in.h> // for htonl
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "global.h"
-extern "C"
-{
-#include "debug.h"
-}
-
#if 0
#include "audio_gain_analysis.h"
#endif
diff --git a/command/decoder.cpp b/command/decoder.cpp
index 6b01404..4d94950 100644
--- a/command/decoder.cpp
+++ b/command/decoder.cpp
@@ -5,6 +5,22 @@
*
*/
+#define __STDC_CONSTANT_MACROS
+
+#include <stdint.h>
+#include <sched.h>
+#include <sys/types.h>
+#include <string.h>
+#include <cstdlib>
+
+#ifndef DECLARE_ALIGNED
+#define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
+#endif
+
+#ifndef CPU_COUNT
+#define CPU_COUNT(i) 1 // very crude ;)
+#endif
+
#include "decoder.h"
cMarkAdDecoder::cMarkAdDecoder(bool useH264, bool useMP2, bool hasAC3)
diff --git a/command/decoder.h b/command/decoder.h
index 8f05108..12b398e 100644
--- a/command/decoder.h
+++ b/command/decoder.h
@@ -8,22 +8,6 @@
#ifndef __decoder_h_
#define __decoder_h_
-#define __STDC_CONSTANT_MACROS
-
-#include <stdint.h>
-#include <sched.h>
-#include <sys/types.h>
-#include <string.h>
-#include <cstdlib>
-
-#ifndef DECLARE_ALIGNED
-#define DECLARE_ALIGNED(n,t,v) t v __attribute__ ((aligned (n)))
-#endif
-
-#ifndef CPU_COUNT
-#define CPU_COUNT(i) 1 // very crude ;)
-#endif
-
#ifndef uchar
typedef unsigned char uchar;
#endif
diff --git a/command/marks.cpp b/command/marks.cpp
index 929589b..5cf8530 100644
--- a/command/marks.cpp
+++ b/command/marks.cpp
@@ -5,8 +5,19 @@
*
*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <math.h>
+#include <string.h>
+#include <stdint.h>
+#include <fcntl.h>
+
#include "marks.h"
+
clMark::clMark(int Type, int Position, const char *Comment)
{
type=Type;
diff --git a/command/marks.h b/command/marks.h
index a65df34..06c1235 100644
--- a/command/marks.h
+++ b/command/marks.h
@@ -8,15 +8,6 @@
#ifndef __marks_h_
#define __marks_h_
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <math.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <stdint.h>
-#include <fcntl.h>
-
class clMark
{
private:
diff --git a/command/pes2es.cpp b/command/pes2es.cpp
index 6adbc26..d0287d0 100644
--- a/command/pes2es.cpp
+++ b/command/pes2es.cpp
@@ -5,6 +5,10 @@
*
*/
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "pes2es.h"
cMarkAdPES2ES::cMarkAdPES2ES(const char *QueueName, int QueueSize)
diff --git a/command/pes2es.h b/command/pes2es.h
index 5eb2614..c2c08e6 100644
--- a/command/pes2es.h
+++ b/command/pes2es.h
@@ -12,10 +12,6 @@
typedef unsigned char uchar;
#endif
-#include <inttypes.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "global.h"
#include "queue.h"
diff --git a/command/queue.cpp b/command/queue.cpp
index a50e925..3c9413c 100644
--- a/command/queue.cpp
+++ b/command/queue.cpp
@@ -5,6 +5,14 @@
*
*/
+#include <stdlib.h>
+#include <string.h>
+
+extern "C"
+{
+#include "debug.h"
+}
+
#include "queue.h"
cMarkAdPaketQueue::cMarkAdPaketQueue(const char *Name, int Size)
diff --git a/command/queue.h b/command/queue.h
index 20cac32..a24014d 100644
--- a/command/queue.h
+++ b/command/queue.h
@@ -8,19 +8,12 @@
#ifndef __queue_h_
#define __queue_h_
-#include <stdlib.h>
#include <stdint.h>
-#include <string.h>
#ifndef uchar
typedef unsigned char uchar;
#endif
-extern "C"
-{
-#include "debug.h"
-}
-
class cMarkAdPaketQueue
{
struct MP2HDR
diff --git a/command/streaminfo.cpp b/command/streaminfo.cpp
index 566bb45..877eddd 100644
--- a/command/streaminfo.cpp
+++ b/command/streaminfo.cpp
@@ -4,6 +4,9 @@
* See the README file for copyright information and how to reach the author.
*
*/
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
#include "streaminfo.h"
diff --git a/command/streaminfo.h b/command/streaminfo.h
index 762ac8f..7b5ba71 100644
--- a/command/streaminfo.h
+++ b/command/streaminfo.h
@@ -8,10 +8,6 @@
#ifndef __streaminfo_h_
#define __streaminfo_h_
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-
#include "global.h"
class cMarkAdStreamInfo
diff --git a/command/ts2pkt.cpp b/command/ts2pkt.cpp
index c286257..583cf1b 100644
--- a/command/ts2pkt.cpp
+++ b/command/ts2pkt.cpp
@@ -5,6 +5,14 @@
*
*/
+#include <stdlib.h>
+#include <string.h>
+
+extern "C"
+{
+#include "debug.h"
+}
+
#include "ts2pkt.h"
cMarkAdTS2Pkt::cMarkAdTS2Pkt(const char *QueueName, int QueueSize)
diff --git a/command/ts2pkt.h b/command/ts2pkt.h
index 122bc5c..6dbcd13 100644
--- a/command/ts2pkt.h
+++ b/command/ts2pkt.h
@@ -8,11 +8,6 @@
#ifndef __ts2pkt_h_
#define __ts2pkt_h_
-extern "C"
-{
-#include "debug.h"
-}
-
#ifndef TS_SIZE
#define TS_SIZE 188
#endif
@@ -21,9 +16,6 @@ extern "C"
typedef unsigned char uchar;
#endif
-#include <stdlib.h>
-#include <string.h>
-
#include "global.h"
#include "queue.h"
diff --git a/command/video.cpp b/command/video.cpp
index 03ecba5..3072542 100644
--- a/command/video.cpp
+++ b/command/video.cpp
@@ -5,6 +5,17 @@
*
*/
+#include <time.h>
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+extern "C"
+{
+#include "debug.h"
+}
+
#include "video.h"
cMarkAdLogo::cMarkAdLogo(MarkAdContext *maContext)
diff --git a/command/video.h b/command/video.h
index 446a61b..1a03d97 100644
--- a/command/video.h
+++ b/command/video.h
@@ -8,19 +8,8 @@
#ifndef __video_h_
#define __video_h_
-#include <time.h>
-#include <math.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
#include "global.h"
-extern "C"
-{
-#include "debug.h"
-}
-
#define LOGO_MAXHEIGHT 170
#define LOGO_MAXWIDTH 480
@@ -28,7 +17,7 @@ extern "C"
#define LOGO_DEFWIDTH 192
#define LOGO_DEFHDWIDTH 288
-#define LOGO_VMAXCOUNT 3 // count of IFrames for detection of "logo invisible"
+#define LOGO_VMAXCOUNT 3 // count of IFrames for detection of "logo visible"
#define LOGO_IMAXCOUNT 5 // count of IFrames for detection of "logo invisible"
#define LOGO_VMARK 0.5 // percantage of pixels for visible
#define LOGO_IMARK 0.15 // percentage of pixels for invisible
diff --git a/plugin/markad.cpp b/plugin/markad.cpp
index 7a03526..fad83a7 100644
--- a/plugin/markad.cpp
+++ b/plugin/markad.cpp
@@ -5,10 +5,15 @@
*
*/
+#include <unistd.h>
+#include <getopt.h>
#include <vdr/plugin.h>
#include "markad.h"
+#define DEF_BINDIR "/usr/bin"
+#define DEF_LOGODIR "/var/lib/markad"
+
cPluginMarkAd::cPluginMarkAd(void)
{
// Initialize any member variables here.
diff --git a/plugin/markad.h b/plugin/markad.h
index b7fe929..997fb39 100644
--- a/plugin/markad.h
+++ b/plugin/markad.h
@@ -8,17 +8,11 @@
#ifndef __markad_h_
#define __markad_h_
-#include <unistd.h>
-#include <getopt.h>
-
#include "version.h"
#include "status.h"
#include "menu.h"
#include "setup.h"
-#define DEF_BINDIR "/usr/bin"
-#define DEF_LOGODIR "/var/lib/markad"
-
extern const char *VERSION;
static const char *DESCRIPTION = trNOOP("Mark advertisements");
static const char *MAINMENUENTRY = trNOOP("markad status");
diff --git a/plugin/menu.cpp b/plugin/menu.cpp
index 9a8ffc1..c63cfa0 100644
--- a/plugin/menu.cpp
+++ b/plugin/menu.cpp
@@ -5,6 +5,10 @@
*
*/
+#include <signal.h>
+#include <vdr/menu.h>
+#include <vdr/font.h>
+
#include "menu.h"
cOsdMarkAd::cOsdMarkAd(struct recs *Entry)
diff --git a/plugin/menu.h b/plugin/menu.h
index 39f09ef..5ab90b2 100644
--- a/plugin/menu.h
+++ b/plugin/menu.h
@@ -7,9 +7,6 @@
#ifndef __menu_h_
#define __menu_h_
-#include <signal.h>
-#include <vdr/menu.h>
-#include <vdr/font.h>
#include "status.h"
class cOsdMarkAd : public cOsdItem
diff --git a/plugin/setup.h b/plugin/setup.h
index 9eb8119..0e217f7 100644
--- a/plugin/setup.h
+++ b/plugin/setup.h
@@ -8,7 +8,6 @@
#define __setup_h_
#include <vdr/menuitems.h>
-#include "status.h"
struct setup
{