dvbscan.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. dvbscan utility
  3. Copyright (C) 2006 Andrew de Quincey (adq_dvb@lidskialf.net)
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef DVBSCAN_H
  17. #define DVBSCAN_H 1
  18. #include <libdvbapi/dvbfe.h>
  19. #include <libdvbsec/dvbsec_api.h>
  20. #include <libucsi/types.h>
  21. /**
  22. * A stream which is part of a service.
  23. */
  24. struct stream
  25. {
  26. uint8_t stream_type;
  27. iso639lang_t language;
  28. struct stream *next;
  29. };
  30. /**
  31. * A service (programme) which is part of a transponder.
  32. */
  33. struct service
  34. {
  35. /**
  36. * Service identification stuff. Strings are in UTF-8.
  37. */
  38. uint16_t service_id;
  39. char *provider_name;
  40. char *service_name;
  41. /**
  42. * Pids common to the whole service.
  43. */
  44. uint16_t pmt_pid;
  45. uint16_t pcr_pid;
  46. /**
  47. * CA stuff.
  48. */
  49. uint16_t *ca_ids;
  50. uint32_t ca_ids_count;
  51. uint8_t is_scrambled;
  52. /**
  53. * BBC channel number (-1 if unknown).
  54. */
  55. int bbc_channel_number;
  56. /**
  57. * Streams composing this service.
  58. */
  59. struct stream *streams;
  60. struct stream *streams_end;
  61. /**
  62. * Next service in list.
  63. */
  64. struct service *next;
  65. };
  66. /**
  67. * A collection of multiplexed services.
  68. */
  69. struct transponder
  70. {
  71. /**
  72. * we need to have a seperate list of frequencies since the
  73. * DVB standard allows a frequency list descriptor of alternate
  74. * frequencies to be supplied.
  75. */
  76. uint32_t *frequencies;
  77. uint32_t frequency_count;
  78. /**
  79. * The rest of the tuning parameters.
  80. */
  81. struct dvbfe_parameters params;
  82. /**
  83. * DVBS specific parameters
  84. */
  85. enum dvbsec_diseqc_polarization polarization;
  86. int oribital_position;
  87. /**
  88. * Numerical IDs
  89. */
  90. uint16_t network_id;
  91. uint16_t original_network_id;
  92. uint16_t transport_stream_id;
  93. /**
  94. * Services detected on this transponder.
  95. */
  96. struct service *services;
  97. struct service *services_end;
  98. /**
  99. * Next item in list.
  100. */
  101. struct transponder *next;
  102. };
  103. extern void append_transponder(struct transponder *t, struct transponder **tlist, struct transponder **tlist_end);
  104. extern struct transponder *new_transponder(void);
  105. extern void free_transponder(struct transponder *t);
  106. extern int seen_transponder(struct transponder *t, struct transponder *checklist);
  107. extern void add_frequency(struct transponder *t, uint32_t frequency);
  108. extern struct transponder *first_transponder(struct transponder **tlist, struct transponder **tlist_end);
  109. extern int create_section_filter(int adapter, int demux, uint16_t pid, uint8_t table_id);
  110. extern void dvbscan_scan_dvb(struct dvbfe_handle *fe);
  111. extern void dvbscan_scan_atsc(struct dvbfe_handle *fe);
  112. #endif