[dvblast-devel] [PATCH 1/4] Move config definitions from dvblast.h to config.h

Georgi Chorbadzhiyski gf at unixsol.org
Fri Aug 24 00:38:50 CEST 2012


---
 Makefile  |  2 +-
 config.h  | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 dvblast.h | 19 +------------------
 3 files changed, 48 insertions(+), 19 deletions(-)
 create mode 100644 config.h

diff --git a/Makefile b/Makefile
index fdac634..2bb0096 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ all: dvblast dvblastctl
 
 .PHONY: clean install uninstall dist
 
-%.o: %.c Makefile dvblast.h en50221.h comm.h asi.h mrtg-cnt.h
+%.o: %.c Makefile config.h dvblast.h en50221.h comm.h asi.h mrtg-cnt.h
 	@echo "CC      $<"
 	$(Q)$(CROSS)$(CC) $(CFLAGS) -c $<
 
diff --git a/config.h b/config.h
new file mode 100644
index 0000000..1b8a9d2
--- /dev/null
+++ b/config.h
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * config.h
+ *****************************************************************************
+ * Copyright (C) 2004, 2008-2011 VideoLAN
+ *
+ * Authors: Christophe Massiot <massiot at via.ecp.fr>
+ *          Andy Gatward <a.j.gatward at reading.ac.uk>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _DVBLAST_CONFIG_H_
+#define _DVBLAST_CONFIG_H_
+
+#define HAVE_CLOCK_NANOSLEEP
+#define HAVE_ICONV
+
+#define DEFAULT_PORT 3001
+#define TS_SIZE 188
+#define MAX_PIDS 8192
+#define DEFAULT_IPV4_MTU 1500
+#define DEFAULT_IPV6_MTU 1280
+#define PADDING_PID 8191
+#define WATCHDOG_WAIT 10000000LL
+#define MAX_ERRORS 1000
+#define DEFAULT_VERBOSITY 4
+#define MAX_POLL_TIMEOUT 100000 /* 100 ms */
+#define DEFAULT_OUTPUT_LATENCY 200000 /* 200 ms */
+#define DEFAULT_MAX_RETENTION 40000 /* 40 ms */
+#define MAX_EIT_RETENTION 500000 /* 500 ms */
+#define DEFAULT_FRONTEND_TIMEOUT 30000000 /* 30 s */
+#define EXIT_STATUS_FRONTEND_TIMEOUT 100
+
+#endif
diff --git a/dvblast.h b/dvblast.h
index 752878b..ca89b12 100644
--- a/dvblast.h
+++ b/dvblast.h
@@ -24,24 +24,7 @@
 #include <netdb.h>
 #include <sys/socket.h>
 
-#define HAVE_CLOCK_NANOSLEEP
-#define HAVE_ICONV
-
-#define DEFAULT_PORT 3001
-#define TS_SIZE 188
-#define MAX_PIDS 8192
-#define DEFAULT_IPV4_MTU 1500
-#define DEFAULT_IPV6_MTU 1280
-#define PADDING_PID 8191
-#define WATCHDOG_WAIT 10000000LL
-#define MAX_ERRORS 1000
-#define DEFAULT_VERBOSITY 4
-#define MAX_POLL_TIMEOUT 100000 /* 100 ms */
-#define DEFAULT_OUTPUT_LATENCY 200000 /* 200 ms */
-#define DEFAULT_MAX_RETENTION 40000 /* 40 ms */
-#define MAX_EIT_RETENTION 500000 /* 500 ms */
-#define DEFAULT_FRONTEND_TIMEOUT 30000000 /* 30 s */
-#define EXIT_STATUS_FRONTEND_TIMEOUT 100
+#include "config.h"
 
 /*****************************************************************************
  * Output configuration flags (for output_t -> i_config) - bit values
-- 
1.7.11.1



More information about the dvblast-devel mailing list