dvb_dr_13818.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * dvb_dr_13818.h -- header for descriptor tag for 0x02~0x12(13818-1) 0x13~0x1a(13818-6)
  3. *
  4. * Copyright (C) 2006 SunMedia Co, chengdu
  5. * Author anlzhao@sunmedia.com.cn
  6. *
  7. * The source code in this file is written by anlzhao referring to
  8. * 13818 and owned by SunMedia Coporation. Application interface
  9. * for the MPEG 2 "conditional access" descriptor decoder.This descriptor's
  10. * definition can be found in ISO/IEC 13818-1 section 2.6.16. and 13818-6.
  11. *
  12. * BUGS:
  13. *
  14. */
  15. #ifndef _DVB_DR_13818_H_
  16. #define _DVB_DR_13818_H_
  17. #include <types.h>
  18. #include "dvb_dr.h"
  19. /*
  20. * struct dvbpsi_ca_dr_s(0x09)
  21. * brief "conditional access" descriptor structure.
  22. * This structure is used to store a decoded "conditional access"
  23. * descriptor. (ISO/IEC 13818-1 section 2.6.16).
  24. *
  25. */
  26. typedef struct dvbpsi_ca_dr_s
  27. {
  28. UINT16 i_ca_system_id; /* CA_system_ID */
  29. UINT16 i_ca_pid; /* CA_PID */
  30. UINT8 i_private_length; /* length of the i_private_data array */
  31. UINT8 i_private_data[256];/* private_data_byte */
  32. } dvbpsi_ca_dr_t;
  33. /*
  34. * struct dvbpsi_iso639_dr_s(0x0a)
  35. * brief "ISO 639 language" descriptor structure
  36. * This structure is used to store a decoded "ISO 639 language"
  37. * descriptor. (ISO/IEC 13818-1 section 2.6.18).
  38. */
  39. typedef struct dvbpsi_iso639_dr_s
  40. {
  41. UINT8 i_code_count; /* length of the i_iso_639_code array */
  42. UINT8 i_iso_639_code[64][3];/* ISO_639_language_code */
  43. UINT8 i_audio_type[64]; /* audio_type */
  44. } dvbpsi_iso639_dr_t;
  45. #ifdef CONFIG_DTMB_SYSTEM
  46. /*
  47. * struct dvbpsi_DRA_audio_dr_s(0xa0)
  48. * brief "DRA audio stream" descriptor structure
  49. * This structure is used to store a decoded "DRA audio stream"
  50. * descriptor.
  51. */
  52. typedef struct dvbpsi_DRA_audio_dr_s
  53. {
  54. UINT8 text_flag;
  55. UINT8 text_length;
  56. UINT8 *text;
  57. UINT8 language_flag;
  58. UINT8 language[4];
  59. } dvbpsi_DRA_audio_dr_t;
  60. #endif
  61. /*
  62. * brief "conditional access(0x09)" descriptor decoder.
  63. * @pu8Descriptor: Pointer to the descriptor buffer
  64. * @n16Len: The total descriptor length
  65. * return a pointer to a new "conditional access" descriptor structure which
  66. * contains the decoded data.
  67. */
  68. dvbpsi_ca_dr_t *dvbpsi_DecodeCADr(UINT8 *pu8Descriptor, INT16 n16Len);
  69. /*
  70. * brief "ISO 639 language(0x0a)" descriptor decoder.
  71. * @pu8Descriptor: Pointer to the descriptor buffer
  72. * @n16Len: The total descriptor length
  73. * return a pointer to a new "ISO 639 language" descriptor structure which
  74. * contains the decoded data.
  75. */
  76. dvbpsi_iso639_dr_t *dvbpsi_DecodeISO639Dr(UINT8 *pu8Descriptor, INT16 n16Len, dvbsi_special_spec eFollowSpecialSpec);
  77. #ifdef CONFIG_DTMB_SYSTEM
  78. dvbpsi_DRA_audio_dr_t *dvbpsi_DecodeDRAAudioDr(UINT8 * pu8Descriptor, INT16 n16Len);
  79. UINT32 dvbpsi_DecodeDRARegistrationDr(UINT8 * pu8Descriptor, INT16 n16Len);
  80. #else
  81. /*
  82. * content protection descriptor decoder for Nordig.
  83. * @pu8Descriptor: Pointer to the descriptor buffer
  84. * @n16Len: The total descriptor length
  85. * Return value of content protection level
  86. * which contains the decoded data.
  87. */
  88. int dvbpsi_DecodeCPDr(UINT8 * pu8Descriptor, INT16 n16Len);
  89. #endif
  90. #endif //#ifndef _DVB_DR_13818_H_