mptsd reads mpegts streams from udp/multicast or http and combines them into one multiple program stream that is suitable for outputting to DVB-C modulator. Tested with Dektec DTE-3114 Quad QAM Modulator and used in production in small DVB-C networks. https://georgi.unixsol.org/programs/mptsd/

Makefile 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. CC? = $(CROSS)$(TARGET)gcc
  2. STRIP = $(CROSS)$(TARGET)strip
  3. VERSION="v1.1"
  4. ifndef REPRODUCIBLE_BUILD
  5. BUILD_ID = $(shell date +%F_%R)
  6. GIT_VER = $(shell git describe --tags --dirty --always 2>/dev/null)
  7. endif
  8. CFLAGS ?= -ggdb -O2
  9. CFLAGS += -Wall -Wextra -Wshadow -Wformat-security -Wno-strict-aliasing -D_GNU_SOURCE -DBUILD_ID=\"$(BUILD_ID)\"
  10. ifneq "$(GIT_VER)" ""
  11. CFLAGS += -DGIT_VER=\"$(GIT_VER)\"
  12. else
  13. CFLAGS += -DGIT_VER=\"$(VERSION)\"
  14. endif
  15. RM = /bin/rm -f
  16. Q = @
  17. uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
  18. ifeq ($(uname_S),Darwin)
  19. LIBS = -lpthread -lm
  20. else
  21. LIBS = -lpthread -lm -lrt
  22. endif
  23. FUNCS_DIR = libfuncs
  24. FUNCS_LIB = $(FUNCS_DIR)/libfuncs.a
  25. TSFUNCS_DIR = libtsfuncs
  26. TSFUNCS_LIB = $(TSFUNCS_DIR)/libtsfuncs.a
  27. mptsd_OBJS = $(FUNCS_LIB) $(TSFUNCS_LIB) \
  28. iniparser.o inidict.o pidref.o data.o config.o \
  29. sleep.o network.o \
  30. input.o \
  31. output_psi.o output_mix.o output_write.o \
  32. web_pages.o web_server.o \
  33. mptsd.o
  34. PROGS = mptsd
  35. CLEAN_OBJS = $(PROGS) $(mptsd_OBJS) *~
  36. all: $(PROGS)
  37. $(FUNCS_LIB):
  38. $(Q)echo " MAKE $(FUNCS_LIB)"
  39. $(Q)$(MAKE) -s -C $(FUNCS_DIR)
  40. $(TSFUNCS_LIB):
  41. $(Q)echo " MAKE $(TSFUNCS_LIB)"
  42. $(Q)$(MAKE) -s -C $(TSFUNCS_DIR)
  43. mptsd: $(mptsd_OBJS)
  44. $(Q)echo " LINK mptsd"
  45. $(Q)$(CC) $(CFLAGS) $(mptsd_OBJS) $(LIBS) -o mptsd
  46. %.o: %.c data.h
  47. $(Q)echo " CC mptsd $<"
  48. $(Q)$(CC) $(CFLAGS) -c $<
  49. strip:
  50. $(Q)echo " STRIP $(PROGS)"
  51. $(Q)$(STRIP) $(PROGS)
  52. clean:
  53. $(Q)echo " RM $(CLEAN_OBJS)"
  54. $(Q)$(RM) $(CLEAN_OBJS)
  55. distclean: clean
  56. $(Q)$(MAKE) -s -C $(TSFUNCS_DIR) clean
  57. $(Q)$(MAKE) -s -C $(FUNCS_DIR) clean