tomcast reads mpeg transport streams over http or udp (multicast or unicast) and outputs them to chosen multicast group. Basically a simple http2multicast daemon designed to work 24/7.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

web_pages.c 1.4KB

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 struct config *config;
  30. void cmd_index(int clientsock) {
  31. send_200_ok(clientsock);
  32. send_header_textplain(clientsock);
  33. fdputs(clientsock, "\nHi from tomcast.\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", 123);
  39. // fdputsf(clientsock, "\nReconnecting %d inputs.\n", config->inputs->items);
  40. }