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/

web_pages.c 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * mptsd internal web pages
  3. * Copyright (C) 2010-2011 Unix Solutions Ltd.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2
  7. * as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  17. */
  18. #include <stdlib.h>
  19. #include <string.h>
  20. #include <sys/types.h>
  21. #include <sys/stat.h>
  22. #include <fcntl.h>
  23. #include <unistd.h>
  24. #include "libfuncs/io.h"
  25. #include "libfuncs/log.h"
  26. #include "libfuncs/list.h"
  27. #include "libfuncs/http_response.h"
  28. #include "config.h"
  29. extern CONFIG *config;
  30. void cmd_index(int clientsock) {
  31. send_200_ok(clientsock);
  32. send_header_textplain(clientsock);
  33. fdputs(clientsock, "\nHi from mptsd.\n");
  34. }
  35. void cmd_reconnect(int clientsock) {
  36. send_200_ok(clientsock);
  37. send_header_textplain(clientsock);
  38. fdputsf(clientsock, "\nReconnecting %d inputs.\n", config->inputs->items);
  39. }