kb_dc_var.h
上传用户:fy98168
上传日期:2015-06-26
资源大小:13771k
文件大小:2k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef KB_DC_VAR_H
  2. #define KB_DC_VAR_H
  3. #define DSMCC_NAME_DESCRIPTOR_TAG 2
  4. // dsmccMessageHeader structure
  5. typedef struct dsmccMessage{
  6. unsigned char protocalDisminator;
  7. unsigned char dsmccType;
  8. unsigned short messageId;
  9. unsigned int transactionId;
  10. unsigned char reserved;
  11. unsigned char adaptationLength;
  12. unsigned short messageLength;
  13. }DSMCCMessage;
  14. // DownloadInfoIndication() head structure
  15. typedef struct diiHead{
  16. unsigned int downloadId;
  17. unsigned short blockSize;
  18. unsigned char windowSize;
  19. unsigned char ackperiod;
  20. unsigned int tCDownloadWindow;
  21. unsigned int tCDownloadScenario;
  22. unsigned char*compatibilityDescriptor;
  23. unsigned short numberOfModules;
  24. }DIIHead;
  25. // dsmccModule attribures of DII
  26. typedef struct dsmccModuleInfo{
  27. unsigned short moduleId;
  28. unsigned int moduleSize;
  29. unsigned char moduleVersion;
  30. unsigned char moduleInfoLength;
  31. unsigned char*moduleInfoBytes;//descriptions bytes
  32. }ModuleInfo;
  33. typedef struct dsmccGroupInfo{
  34. unsigned int groupId;
  35. unsigned int groupSize;
  36. char*GroupCompatibility;
  37. unsigned short GroupInfoLength;
  38. unsigned char *GroupInfoBytes;//descriptions bytes
  39. }GroupInfo;
  40. // DSI head ,not include dsmccMessageHeader structure
  41. typedef struct dsmccDSIHead{
  42. unsigned char*serverid;
  43. unsigned char*compatibilityDescriptor;
  44. unsigned short privateDataLength;
  45. unsigned char*privateDataBytes;
  46. }DSIHead;
  47. //general descriptor
  48. typedef struct
  49. {
  50. int tag;
  51. int len;
  52. unsigned char *descriptor;
  53. }Descriptor;
  54. /*// transport packet structure
  55. typedef struct
  56. {
  57. unsigned char sync_byte;
  58. unsigned short transport_error_indicator:1;
  59. unsigned short payload_unit_start_indicator:1;
  60. unsigned short transport_priority:1;
  61. unsigned short pid:13;
  62. unsigned char transport_scrambling_control:2;
  63. unsigned char adaptation_field_control:2;
  64. unsigned char continuity_counter:4;
  65. unsigned char *pData_byte;
  66. }TSPacket;
  67. typedef struct _TSPacket_List
  68. {
  69. TSPacket tsPacket;
  70. struct _TSPacket_List *pNext;
  71. }TSPacket_List;*/
  72. // DSMCCDownloadDataHeader structure
  73. typedef struct 
  74. {
  75. char protocolDiscriminator;
  76. char dsmccType;
  77. unsigned short messageId;
  78. unsigned long downloadId;
  79. int reserved;
  80. int adaptationLength;
  81. unsigned short messageLength;
  82. }DSMCCDownloadData;
  83. // DownloadDataBlock structure,but exclude the dsmccDownloadDataHeader() structure
  84. typedef struct 
  85. {
  86. unsigned int moduleID;
  87. unsigned char moduleVersion;
  88. unsigned char reserved;
  89. unsigned int blockNumber;
  90. }DDBHead;
  91. #endif