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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. CC = $(CROSS)$(TARGET)gcc
  2. STRIP = $(CROSS)$(TARGET)strip
  3. BUILD_ID = $(shell date +%F_%R)
  4. GIT_VER = $(shell git describe --tags --dirty --always)
  5. CFLAGS = -ggdb -Wall -Wextra -Wshadow -Wformat-security -Wno-strict-aliasing -O2 -D_GNU_SOURCE -DBUILD_ID=\"$(BUILD_ID)\" -DGIT_VER=\"$(GIT_VER)\"
  6. RM = /bin/rm -f
  7. Q = @
  8. LIBS = -lpthread -lm -lrt
  9. FUNCS_DIR = libfuncs
  10. FUNCS_LIB = $(FUNCS_DIR)/libfuncs.a
  11. TSFUNCS_DIR = libtsfuncs
  12. TSFUNCS_LIB = $(TSFUNCS_DIR)/libtsfuncs.a
  13. mptsd_OBJS = $(FUNCS_LIB) $(TSFUNCS_LIB) \
  14. iniparser.o inidict.o pidref.o data.o config.o \
  15. sleep.o network.o \
  16. input.o \
  17. output_psi.o output_mix.o output_write.o \
  18. web_pages.o web_server.o \
  19. mptsd.o
  20. PROGS = mptsd
  21. CLEAN_OBJS = $(PROGS) $(mptsd_OBJS) *~
  22. all: $(PROGS)
  23. $(FUNCS_LIB):
  24. $(Q)echo " MAKE $(FUNCS_LIB)"
  25. $(Q)$(MAKE) -s -C $(FUNCS_DIR)
  26. $(TSFUNCS_LIB):
  27. $(Q)echo " MAKE $(TSFUNCS_LIB)"
  28. $(Q)$(MAKE) -s -C $(TSFUNCS_DIR)
  29. mptsd: $(mptsd_OBJS)
  30. $(Q)echo " LINK mptsd"
  31. $(Q)$(CC) $(CFLAGS) $(mptsd_OBJS) $(LIBS) -o mptsd
  32. %.o: %.c data.h
  33. $(Q)echo " CC mptsd $<"
  34. $(Q)$(CC) $(CFLAGS) -c $<
  35. strip:
  36. $(Q)echo " STRIP $(PROGS)"
  37. $(Q)$(STRIP) $(PROGS)
  38. clean:
  39. $(Q)echo " RM $(CLEAN_OBJS)"
  40. $(Q)$(RM) $(CLEAN_OBJS)
  41. distclean: clean
  42. $(Q)$(MAKE) -s -C $(TSFUNCS_DIR) clean
  43. $(Q)$(MAKE) -s -C $(FUNCS_DIR) clean