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/
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.

config.h 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef CONFIG_H
  2. #define CONFIG_H
  3. #include <pthread.h>
  4. #include <arpa/inet.h>
  5. #include <netinet/in.h>
  6. #include "libfuncs/list.h"
  7. #include "data.h"
  8. typedef struct {
  9. char *ident;
  10. char *pidfile;
  11. int syslog_active;
  12. char *logident;
  13. char *loghost;
  14. int logport;
  15. struct sockaddr_in server;
  16. char *server_addr;
  17. int server_port;
  18. int server_socket;
  19. pthread_t server_thread;
  20. int multicast_ttl;
  21. struct in_addr output_intf;
  22. char *global_conf;
  23. char *channels_conf;
  24. char *nit_conf;
  25. char *epg_conf;
  26. int debug;
  27. int quiet;
  28. int write_input_file;
  29. int write_output_file;
  30. int pcr_mode; // 0 - do not touch PCRs
  31. // 1 - move PCRs to their calculated place
  32. // 2 - rewrite PCRs using output bitrate
  33. // 3 - move PCRs and rewrite them
  34. uint16_t network_id; // For NIT && SDT
  35. uint16_t transport_stream_id;// For NIT
  36. char *network_name; // For NIT
  37. char *provider_name; // For SDT
  38. double output_bitrate; // Output bitrate (bps)
  39. long output_tmout; // Smooth interval miliseconds
  40. long usleep_overhead; // How much more usecs uslep(1) takes
  41. long output_packets_per_sec; // How much packets should be sent in one second
  42. time_t epg_conf_mtime; // Last change time of epg config
  43. LIST * channels; // List of channels
  44. LIST * inputs; // Input threads
  45. LIST * nit;
  46. OUTPUT * output; // Output
  47. struct {
  48. unsigned int pat; // DVB section id 0x00 (program_association_section)
  49. unsigned int pmt; // DVB section id 0x02 (program_map_section)
  50. unsigned int nit; // DVB section id 0x40 (network_information_section - actual_network)
  51. unsigned int sdt; // DVB section id 0x42 (service_description_section - actual_transport_stream)
  52. unsigned int eit; // DVB section id 0x4e (event_information_section - actual_transport_stream, present/following)
  53. unsigned int tdt; // DVB section id 0x70 (time_date_section)
  54. unsigned int tot; // DVB section id 0x73 (time_offset_section)
  55. unsigned int stats; // Local
  56. } timeouts;
  57. } CONFIG;
  58. CONFIG * config_alloc ();
  59. void config_free (CONFIG **conf);
  60. void config_load (CONFIG *conf, int argc, char **argv);
  61. int config_load_global (CONFIG *conf);
  62. int config_load_channels (CONFIG *conf);
  63. int config_load_nit (CONFIG *conf);
  64. int config_load_epg (CONFIG *conf);
  65. #endif