No Description
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.

defines.h 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef DEFINES_H
  2. # define DEFINES_H
  3. #undef DEBUG
  4. //#define DEBUG 1
  5. #define VERSION_ID "1.00"
  6. #define BUILD_ID GIT_BUILD_ID
  7. #define SERVER_SIGNATURE "tsiproxy"
  8. #define COPYRIGHT "Copyright (c) 2020 Georgi Chorbadzhiiyski <georgi@unixsol.net>"
  9. /*
  10. This define is used to compensate for servers clock drift.
  11. It allows to watch URLs which otherwise will be active after
  12. upto URL_START_TOLERANCE seconds in the future. If the server
  13. clock is more than URL_START_TOLERANCE late or the URL is
  14. generated too far in the future, the client will get
  15. not-active video.
  16. */
  17. #define URL_START_TOLERANCE 180
  18. /*
  19. This define is used to set after how many seconds with no
  20. traffic the client will be disconnected.
  21. */
  22. #define NO_TRAFFIC_SECONDS 30
  23. /*
  24. How many seconds after start of connection NEW message will be logged.
  25. The check is > NO_LOG_START_SECONDS
  26. */
  27. #define NO_LOG_START_SECONDS 3
  28. /*
  29. How many seconds minimum should LOG{} be emitted.
  30. The check is > NO_LOG_END_SECONDS
  31. */
  32. #define NO_LOG_END_SECONDS 3
  33. /* How much miliseconds to wait for connection to be established with config server */
  34. #define CONFIG_CONNECT_TIMEOUT 10*1000
  35. #define CONFIG_LOAD_TIMEOUT 60
  36. /* How much to wait for connection to be established with channel source (miliseconds) */
  37. #define PROXY_CONNECT_TIMEOUT 1000
  38. /*
  39. The total time it takes to return no-signal is equal to
  40. PROXY_CONNECT_RETRIES * PROXY_RETRY_TIMEOUT
  41. */
  42. /* How many times to try to connect to channel */
  43. #define PROXY_CONNECT_RETRIES 5
  44. /* Seconds to sleep between retries (miliseconds) */
  45. #define PROXY_RETRY_TIMEOUT 1000
  46. #define FRAME_PACKET_SIZE 1316
  47. #define NEW_DURATION_WEIGHT 0.5
  48. #define TIME_ADJUSTMENT_FACTOR 0.8
  49. #define MAX_PLAYOUT_BUFFER_DURATION 0.1 // (seconds)
  50. #define PCR_PERIOD_VARIATION_RATIO 0.5
  51. #define unused(x) (void)x
  52. #define BUF 1536
  53. #endif